Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Good day. 

I am wrestling a simple network (maze-type) problem and I hope someone can assist.

Given a standard x-y framework with several nodes whose locations are known, I would like to visit each node by starting from the origin, (0,0), and returning to that same point, A. (see attached)

However, I am permitted only to move horizontally and vertically within the maze.

Given that restriction, is there a routine that allows me to visit all locations, B, C, D, and E, such that the rectilinear distance is a minimum?

If there is a solution to this problem, can the distance also be given and order of visits specified?

Thanks for reading!

MaplePrimes_Path.mw

I have created a simple piecewise function to represent the radius r(x) of a circular cylinder of length 2a and radius b with ellipsoidal end caps of length e << a and e << b to get a smooth transition of r(x) at the two ends for use in slender body theory. The piecewise function does not behave as I had expected, and this is the first time that I have used a piecewise function. What am I doing wrong? The attached (I hope) Maple worksheet shows both my expected behavior and the actual behaviort. Any help will be greatly appreciated. Thanks.

Neill Smith

Piecewise_Cylinder_Geom.mw

 

how to draw these 3 lines and then project them on the plans Oxy,Oxz,Oyz;
3 given lines a := [3*t-7, -2*t+4, 3*t+4]; b := [m+1, 2*m-9, -m-12];c:={x = -200/29-2*t, y = 114/29+3*t, z = 119/29+4*t}, how to show these lines and the projections on the 3 planes ? Thank you.

I solve a system of equations, and am having difficulty 1) understanding what I"m seeing, 2) using the results.
 

Download substitution_help.mw

 

At (21), I get the solution to the system of equations.  I then want to use substitute a value for xC1 that supports the solution, and plug it into the other variables that are solved in terms of it.  However, I can't figure out how to do this.  I keep getting errors like:

Error, invalid input: eval expects its 2nd argument, eqns, to be of type {integer, equation, set(equation)}, but received {Rsrc = .9640102828*xC1^2+0.2570694087e-2*(140625.*xC1^4-151321.*xC1^2)^(1/2), xC2 = -0.1333333333e-2*(281250.*xC1^3+750.*xC1*(140625.*xC1^4-151321.*xC1^2)^(1/2)+51018750.*xC1^2+136050.*(140625.*xC1^4-151321.*xC1^2)^(1/2)-151321.*xC1)/(375.*xC1^2+(140625.*xC1^4-151321.*xC1^2)^(1/2)), xC1 <= -363.3194071}

please see attached file.

I assume I'm getting 2 solutions.  I'm picking the first one and trying to then solve for the other variables once I pick a value for xC1.

 

Thank you,

substitution_help.mw

Hello,

 

I have a complex transfer function.  I've defined everyting as "real" via:

assum := Rsrc::real, C1::real, Lp::real, C2::real, f::real, RL::real, 0 < Rsrc, 0 < C1, 0 < Lp, 0 < C2, 0 < RL, 0 < f

I'm expecting simplify to reduce the following transfer function so that the denominator is real, but I can't get it to do it:


I have every variable defined as real, so I am not sure why it won't simplify this expression.

 

Thank you

 

 

Dear Users! Hope everything fine here. For any vales of M and N I generated the system of equation.

for j from 2 while j <= N do
for i while i <= M do

omega[2]*(2-b[1])*u[i, j]+(2*b[1]*omega[2]-b[2]*omega[2]-omega[2]+1)*u[i, j-1]-omega[2]*(sum((b[l+2]-2*b[l+1]+b[l])*u[i, j-l-1], l = 1 .. j-2))
end do end do

But I want to convert it into matrix for example if N = 3 and M = 4, I need the following form

I am waiting for your response.

Hello everyone !,


I would like to generate two random complex vectors (x1 and x2) several time and I want to check how these two vectors (j iteration) close to their previous values (j-1 iteration): abs (x1(j)-x1(j-1)) < 10^-4 and abs (x2(j)-x2(j-1)) < 10^-4. Therefore, I want that my program stop when this criteria is satisfied for x1 and x2 simultaneously.

I know how to check that for one element of the vector but not all the elements of the vector.
code:
Comp.vect.mw

Quantum Mechanics for Chemistry

J. F. Ogilvie

 

            This interactive electronic textbook, freely available from the Maple Application Centre [https://www.maplesoft.com/applications/view.aspx?SID=154768] in the form of three Maple worksheets comprises three extensive chapters, on model systems, atoms and molecules in turn.  As quantum mechanics is neither a chemical theory nor even a physical theory but a collection of methods, numbering at least thirteen, or algorithms, for calculations on systems of an atomic scale, it is appropriate that computer software combining both strong arithmetical and symbolic capabilities, i.e. Maple, be applied to implement this material.  The book includes calculations involving five of the known methods, and provides many examples and exercises for a reader to enhance understanding of the principles and practice. For the first and third chapters, a readable text as .pdf is also provided but the extent of the second chapter precludes this possibility.

            The objective of this textbook is to demonstrate how the principles of the varied methods become implemented in practical calculations. The chapter on model systems includes treatments of several oscillators that might serve as prototypical of features of diatomic molecules.  The chapter on atoms includes the most extensive treatment available on solutions of Schroedinger's equation for the hydrogen atom, in all four systems of coordinates in which the variables are separable, and also in momentum space.  The chapter on molecules includes an introduction to transparent quantum-chemical calculations, which enables a reader to understand each stage of a calculation on a simple atomic or molecular system leading to a self-consistent field and even to Moeller-Plesset perturbation theory of second order and application of density functionals, which can provide an excellent basis for a subsequent use of opaque numerical programs for calculation of molecular structures and properties.

            This textbook contains, with permission, contributions from several eminent chemists, mathematicians and physicists, acknowledged in the particular locations, that complement the explanatory descriptive text as a profound introduction to quantum mechanics in a context of chemical education.

Hi!

I see that from Maple 2018 there is a command to compute the so called Radial Basis Function Interpolation:

https://www.maplesoft.com/support/help/Maple/view.aspx?path=Interpolation%2FRadialBasisFunctionInterpolation

I am trying to implement that code in Maple 2015, but it returns the error

Error, (in h) bad index into Vector

Displaying the vectors computed with the procedure, they seem correct, but the function that I want to return seems to fail (it is a summatory).

Attached the maple file

RBF_Interpolation.mw

I will appreciate any suggestion. Many thanks in advance for your comments!

BR,

GGM

 How to insert legends in the surfdata?

plots:-surfdata({Mat1}, ll1 .. ul1, ll2 .. ul2, dimension = 2, colorscheme = ["Blue", "Green", "Yellow", "Red"], axes = boxed, axesfont = [TIMES, BOLD, 16], axis = [thickness = 2], labelfont = [TIMES, BOLD, 16], labels = ["R", "Ma"])

 

 

 

 

Now I have a Matrix say  

 

Now I have another matrix say 

Now my second matrix has to be appended below the previous matrix the number of coulmns will the same in each case.

Again if create a new matrix I will ask it to append below the already appended new matrix and so on 

 

and lastly I want to export the matrix to excel.

 

 

If someone can help your work will be 100% acknowledged

 

I alpologize for any inconvince caused kind help

Dear, I am a newby using Maple and encounter following issue: when I multiply a vector with 2 elements and units [m] with e.g. 6 [m] using the *~ for an element by element multiplication this works as it should. However, when I try to multiply a vector with 2 elements and units [mA] and multiply this in the same way as above with 14 [V] I get as answer 2 results with a correct multiplication but followed by V mA. First I would expect [W] as unit but the V mA in the result vector are apparently no units. What am I doing wrong?

Thank you for any help.

PlaneDual returns the plane dual of a planar graph G, that is, a graph with faces of G as its vertices in which two vertices are adjacent if and only if they share an edge as faces of G. Of course, this is a little different from the standard definition of plane dual. (Interlude: I estimate that the two definitions are equivalent in the case that the planar graph is 3-connected simple graph)

It's not hard to find a plane dual of a planar graph in Maple. 

g:=Graph({{1,2},{2,4},{3,4},{2,3},{1,3},{1,4},{4,5},{2,5},{1,5}});
DrawPlanar(g);

dual_g:=PlaneDual(g);
DrawPlanar(
dual_g)

Since all labels of the dual graph are used numbers 1..n in maple, I cannot see how its vertices correspond to the face of the original graph.  And further, I want to know one edge of the dual graph corresponds to which edge (should be the boundary on two faces) of the original planar graph.

Maybe input {1,4} of the dual graph and output {2,4} of the original graph.

For example, Input {1} that is a vertex of  dual graph  to get the original face {2,3,4} and if we input {1,4} of the dual graph, we will output edge {2,4} of the original graph.

I don't know if there's a good way to do that.

 

 

Hi! I was wondering about drawing phase plane for differential system with some conditions. For example how can we draw this for:

 

restart;
with(plots);
with(DEtools);

ode := piecewise(1 < abs(x(t)), diff(x(t), t $ 2) - 2 = 0, abs(x(t)) < 1, diff(x(t), t $ 2) = 0);
????????????

I wanted something similar to that:

DEplot({diff(x(t), t) = y(t), diff(y(t), t) = 8*x(t)*y(t)}, [x(t), y(t)], t = -2 .. 2, x = -1 .. 1, y = -4 .. 4);

or this:

ode1 := diff(x(t), t $ 2) + 2*diff(x(t), t) = 0

DEplot(ode1, x(t), t = -2 .. 10, [[x(1) = 0.2, D(x)(1) = -1.4]]);

Edit:

I rewrite that to make integral curves and this phase plot should look similar to this:


 

Hi! I know that length of blue line and red line equal: Pi/4 and Pi*sin(Pi/8)/4 so from spherical pythagorem theorem green line should equals cos(Pi/4)*cos(Pi*sin(Pi/8)/4) but when I calculate this from formula for length of parametric curve I got something like this (I have just emphasized):

restart;
with(plots);
assume(t, real);
K := plot3d(1, theta = 0 .. 2*Pi, phi = 0 .. Pi, coords = spherical);
S2 := display(spacecurve([cos(t)*sin(t + Pi/8), sin(t + Pi/8)*sin(t), cos(t + Pi/8)], t = 0 .. Pi/4, thickness = 3, color = green)):

int(sqrt(<diff(cos(t)*sin(t + Pi/8), t), diff(sin(t + Pi/8)*sin(t), t), diff(cos(t + Pi/8), t)> . <diff(cos(t)*sin(t + Pi/8), t), diff(sin(t + Pi/8)*sin(t), t), diff(cos(t + Pi/8), t)>), t = 0 .. Pi/4)

-sqrt(2 - sqrt(2))*sqrt(2 + sqrt(2))*sqrt(2)*EllipticE(I/2*sqrt(2 - sqrt(2)), I)*I/2 + sqrt(2 - sqrt(2))*sqrt(2 + sqrt(2))*sqrt(2)*EllipticF(I/2*sqrt(2 - sqrt(2)), I)*I + EllipticE(I/2*sqrt(2 + sqrt(2)), I)*I - 2*I*EllipticF(I/2*sqrt(2 + sqrt(2)), I)

evalf(%)

0.959458136 + 0.*I

evalf(cos(Pi/4)*cos(Pi*sin(Pi/8)/4))

0.6754080210

I am not sure is Maple calculation wrong or I have missed something important?

First 262 263 264 265 266 267 268 Last Page 264 of 2097