Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Unit_vectors_from_different_coordinate_systems.mw
 

restart

NULLNULL

with(Physics)``

with(Vectors)

NULL

It's common in mathematical physics to use cartesian unit vectors to describe the position of a point in space.

 

r_(t) = x(t)*_i+y(t)*_j

r_(t) = x(t)*_i+y(t)*_j

(1)

Sometimes it neccessary to convert a position vector like `#mover(mi("r"),mo("→"))`(t) to another cartensian coordinate system with different unit vectors, I call the primed system. In the primed system the position vector looks like:

"(r')(t)=x'(t) (i')+y'(t) (j')"

When using Physics[Vectors] and the unit vector hat notations to define vectors in cartesian space, can I define more than one cartesian space such as:

`#mover(mi("r"),mo("→"))`(t) = x(t)*`#mover(mi("i"),mo("∧"))`+y(t)*`#mover(mi("j"),mo("∧"))`

NULL

and

  "(r')(t)=x'(t) (i')+y'(t) (j')"?

Another way to ask the same thing: Can I define the position vector in different coordinates, each system having a distinct pair of orthogonal unit vectors?

 

The short answer I think is no. Given the current implementation it's not clear how one would go about defining the relationships between unit vectors from different coordinate systems. See below.

 

In 2D the transformation corresponds to a rotation of a vector the plane. The tranformation is characterized by the rotation angle α.

 

 

 

The unit vectors from different systems are related through scalar products.

 

"(i)*i' =(|i|)*|i'|*cos(alpha)=cos(alpha)"``NULL

NULL

"(j)*(j)' =(|j|)*|(j)'|*cos(alpha)=cos(alpha)"NULLNULL

``

"(j)*(i)' =(|j|)*|(i)'|*cos(3 alpha)=cos(3 alpha)"``NULL

 

Is there a way to implement scalar products of vectors from different coordinate systems using the Physics Tensors package? Here I create three different coordinate systems. I don't know whether the unit vectors systems X and Y have the same (i, j, k) unit vectors or does each system have its own triplet?

NULL

Setup(coordinates = cartesian, metric = Euclidean, dimension = 3, spacetimeindices = lowercaselatin, geometricdifferentiation = true)

[coordinatesystems = {X}, dimension = 3, geometricdifferentiation = true, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]
````

(2)

Coordinates(Y, Z, Z = cylindrical)

{X, Y, Z}

(3)

NULL

NULL


 

Download Unit_vectors_from_different_coordinate_systems.mw

 

hi everyone
i have a nonlinear double int which want to be solved and then plot against "z" variable.
INT_problem.mw
tnx in advance

I think I'm going crazy! 

`Maple 2020.1, X86 64 WINDOWS, Jul 30 2020, Build ID 1482634`

solve((20 + 20*T + 2*T*(T + 1))*exp(-T) - 10*exp(-2*T) - 2*T - 10.0 = 0);
                 -10.00000000, -8.309536192, 0.

?????? Why???????

Has anyone gone crazy or what?

Maple 2022.1 on windows 10

restart;
w:=y-x/(c-x):
p1:=plots:-implicitplot(eval(w,c=2),x=-6..9,y=-3..3):
p2:=plots:-implicitplot(eval(w,c=2),x=-6..10,y=-3..3):
p3:=plots:-implicitplot(eval(w,c=2),x=-6..11,y=-3..3):
[p1,p2,p3]

Gives

 

Notice p2. The vertical line is gone. This happens when the range x=-6..10 and it shows back again when x=-6..11 or x=-6..9

Why does this happen? It is the same equation.

 

Expressions of the kind

A cos(phi) - B sin(phi)

are solved by Maple to phi=arctan(A/B)

In such cases: Is there a way to get a solution phi=arctan(A,B) other than in the attached?

If not: Can the attached solution be done more efficient? There are quite some commands involved.

(It may happen that Maple returns "minus arctan". Then the attached solution does not work and has to be preplaced by something more complicated. A solution that always work would be desireable)

MB_exports_Schatz_Mechanism.mw

 

hello 

i have 3 Arrays and i want to plot them i 2D, 

for example : 

y  := [1,2,3,4,5,6]

x1:= [10,20,30,40,50,60] 

x2:= [0.1,0.2,0.3,0.4,0.5,0.6]

and i want to display at the graph for each y point the value of x1 and x2 by two axis (dualaxis)

any suggestions ? 

 

thank u in advance !

I tried different things but can't figure how to make Maple give a simplified result from int command without these RootOf with sums in them. Here is an example.

restart;
anti:=int(1/(a+x^(1/5)),x);

The strange thing is that doing

eval(anti,a=1)

Keeps these rootsOf and Sums there. But doing

anti:=int(1/(1+x^(1/5)),x);

Gives simplified result without RootOf

I tried DEtools:-remove_RootOf and assumptions and value() but nothing worked. I tried assumptions on a, such as assuming a::integer,a>0 and other things. 

I need similar result as Mathematica:

ClearAll[x, a];
Integrate[1/(a + x^(1/5)), x]

I am sure there is an option in Maple to do that, i.e. give result without these RootOf and Sums. But so far, I could not find it. I looked at options to int() command also. 

Any one know what option to use or how to simplifies it the the above result by Mathematica? 

Maple 2022.1 on windows 10

Is there a way, or a way to get maple to implement, the ability to animate multiple parameters? Basically duplicate all the prameters features(such as the ability to set them to loop, speed, etc).

E.g., suppose I have space curve and I want to rotate in 3 dimensions using a rotation matrix and animate the rotation for visualization purposes. I can animate one rotation angle but not more than one. When clicking on the plot the properties bar adds a slider and other properties I can play with but I can only do it for one angle at a time. It would be nice if I could do it for more than one.

It would be simple, say, as being able to set an array for the parameters, e.g., a=[0..1, 0..Pi, 0..2] and then use a[1], a[2], a[3] for the parameters.

How to make maple 12 to use Intel SGX 1 or SGX 2 to run code secretly? If maple 12 can not, which version of maple can use SGX 1 or SGX 2?

Is it considered OK to give singular solution to an ode which does not satisfy the ode?

I thought may be because it is singular solution and not general solution, then that is allowed sometimes. But it seems strange to me to give a solution which cleary do not satisfy the ode, even if it is singular.  But may be because it is singular, it is not required to satisfy the ode? Here is an example

restart;
ode_1:=diff(y(x),x)=sqrt(1+x+y(x)) ;
sol_1:=DEtools:-dalembertsol(ode_1);

Gives

But the first given "solution" (singular) does not satisfy the ode. Plugging it into the ode gives  -1=1.  Also odetest(y(x)=-x,ode_1) agrees it does not satisfy the ode. It gives -2 and not zero.

What do others think about this?  

Given a set (list) of PDE, is there a way to search all possible solution sets? For instance, pdsolve will output the solution

{_eta[0](t, x) = 0, _xi[t](t, x, u) = _C1, _xi[x](t, x, u) = _C2, eta[1](t, x) = 0}

for the list of PDEs below. But I am aware that there is another solution different from the above, is there way to seek these other solutions?

 

[alpha*u^2*(diff(eta[1](t, x), t))+alpha*u*(diff(_eta[0](t, x), t))-u*(diff(eta[1](t, x), t))-u*(diff(eta[1](t, x), x))+u*(diff(eta[1](t, x), x, x, t))-(diff(_eta[0](t, x), x))-(diff(_eta[0](t, x), t))+diff(_eta[0](t, x), x, x, t), -(diff(_xi[x](t, x, u), u, u, u)), -(diff(_xi[t](t, x, u), x))-(diff(_xi[t](t, x, u), t)), -(diff(_xi[t](t, x, u), x, x)), -2*(diff(_xi[t](t, x, u), x, x))-(diff(_xi[x](t, x, u), x, x))+2*(diff(eta[1](t, x), x)), diff(eta[1](t, x), t)-2*(diff(_xi[x](t, x, u), x, x)), -(diff(_xi[x](t, x, u), t))*alpha*u-(diff(_xi[x](t, x, u), x, x, x))-(diff(_xi[t](t, x, u), x))+2*(diff(eta[1](t, x), x, t)), -(diff(_xi[x](t, x, u), x)), -(diff(_xi[t](t, x, u), t))*alpha*u+(diff(_xi[t](t, x, u), x))*alpha*u+(diff(_xi[x](t, x, u), x))*alpha*u+(diff(_xi[x](t, x, u), t))*alpha*u+eta[1](t, x)*alpha*u+alpha*_eta[0](t, x)+diff(_xi[t](t, x, u), t)-(diff(_xi[t](t, x, u), x, x, x))-(diff(_xi[x](t, x, u), x))-(diff(_xi[x](t, x, u), t))+diff(eta[1](t, x), x, x), -2*(diff(_xi[x](t, x, u), u)), -2*(diff(_xi[t](t, x, u), x, u)), -2*(diff(_xi[t](t, x, u), u))-(diff(_xi[x](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -5*(diff(_xi[x](t, x, u), u, u)), -(diff(_xi[t](t, x, u), u, u)), -3*(diff(_xi[t](t, x, u), x, u)), -2*(diff(_xi[x](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -2*(diff(_xi[t](t, x, u), u, u))-(diff(_xi[x](t, x, u), u, u)), -(diff(_xi[t](t, x, u), u, u, u)), -3*(diff(_xi[t](t, x, u), u, u)), -3*(diff(_xi[t](t, x, u), x, u, u)), (diff(_xi[t](t, x, u), u))*alpha*u-(diff(_xi[x](t, x, u), u))-3*(diff(_xi[t](t, x, u), x, x, u)), -2*(diff(_xi[x](t, x, u), x, u))-4*(diff(_xi[t](t, x, u), x, u)), -(diff(_xi[t](t, x, u), u))*alpha*u+(diff(_xi[x](t, x, u), u))*alpha*u+diff(_xi[t](t, x, u), u)-(diff(_xi[x](t, x, u), u)), -3*(diff(_xi[x](t, x, u), x, x, u))-(diff(_xi[t](t, x, u), u)), -7*(diff(_xi[x](t, x, u), x, u)), -3*(diff(_xi[x](t, x, u), x, u, u))]

This works

restart;
ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;
DEtools:-abelsol(ode);

But this does not

restart;
ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;
name_of_solver:=abelsol;
DEtools:-name_of_solver(ode);

Then I found this made it work

eval(DEtools:-name_of_solver)(ode);

So I am guessing what happens is this: doing DEtools:-name_of_solver Maple first searched for a proc called name_of_solver inside DEtools package, and found none. So it does not work.

But adding eval first, then name_of_solver is evaluated and replaced by abelsol and after that the call is made, and it then finds this proc inside the DEtools package.

But my question is, why is eval needed here?

Is it not automatically happens that a variable is replaced by its value? So I expected DEtools:-name_of_solver to automatically become DEtools:-abelsol and only then the call is made.

Why the rule of evaluation is different in this case?

Formatting_exponents_in_typesetting_situations.mw
How do I format express an exponent in standard notation when typesetting a caption?  10^2 displays as 100 when I want it to display as 10^2 but without the caret.

restart

with(plots)

logplot(10^x, x = 0 .. 8, size = [300, 300], legend = [y(x) = 10^x], legendstyle = [location = top], caption = typeset("How do I type,", 10^8, ", and have it show up as 10^8 in the caption?"))

 

NULL

Download Formatting_exponents_in_typesetting_situations.mw

Any one knows of a way to have Maple verify that this solution of the ODE is correct?

restart;
ode:=diff(y(x),x)=x*(y(x)^2-1)^(2/3);
sol:=dsolve(ode);
odetest(sol,ode);

gives

-4*x*y(x)^2*hypergeom([3/2, 5/3], [5/2], y(x)^2)*(y(x)^2 - 1)^(2/3)*signum(y(x)^2 - 1)^(1/3) - 9*x*hypergeom([1/2, 2/3], [3/2], y(x)^2)*(y(x)^2 - 1)^(2/3)*signum(y(x)^2 - 1)^(1/3) - 9*x*(-signum(y(x)^2 - 1))^(1/3)

Tried different simplications, but can't get zero.

For reference, this is Mathematica's solution and it verifies it:

Using Maple 2022.1 on windows 10.

with(GroupTheory):

st := time();
RightCosets(SymmetricGroup(10), SymmetricGroup(11));
time() - st;

0.047

Note GroupOrder(SymmetricGroup(11)) is 39916800. It is a very large group. This seems unimaginable to me. Can I know how maple does it?

First 174 175 176 177 178 179 180 Last Page 176 of 2097