Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

Hi there!

Sorry to ask, but I don't know how I can solve it in a smart way. I want to take the covariant derivative of a specific vector, whose components are specifically defined, which can be constant or some functions of the coordinates. But, as soon as I define that specific vector, the covariant derivative fails to compute, saying there are "too many levels of recursion". Let me show what I mean.

I have these two attempts to get this:

 

First attempt

 

restart

with(Physics)

Setup(mathematicalnotation = true)

Coordinates(X = spherical)

{X}

(1.1)

Parameters(k)

{k}

(1.2)

Setup(metric = {(1, 1) = a(t)^2/(-k*r^2+1), (2, 2) = (a(t)*r)^2, (3, 3) = (a(t)*r*sin(theta))^2, (4, 4) = -1})

[metric = {(1, 1) = a(t)^2/(-k*r^2+1), (2, 2) = a(t)^2*r^2, (3, 3) = a(t)^2*r^2*sin(theta)^2, (4, 4) = -1}]

(1.3)

Define(b[mu])

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(1.4)

NULL

Define(Db[nu, mu] = D_[nu](b[mu](X)))NULL

{Physics:-D_[mu], Db[nu, mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(1.5)

Define(b[mu] = [0, 0, 0, beta], redo)

{Physics:-D_[mu], Db[nu, mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(1.6)

Db[]

Db[mu, nu] = Matrix(%id = 18446746372997772822)

(1.7)

beta := proc (X) options operator, arrow; b0 end proc``

proc (X) options operator, arrow; b0 end proc

(1.8)

Define(b[mu] = [0, 0, 0, beta], redo)

{Physics:-D_[mu], Db[nu, mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(1.9)

Db[]

Error, (in index/PhysicsTensor) too many levels of recursion

 

````

Second attempt

 

restart

with(Physics)

Setup(mathematicalnotation = true)

Coordinates(X = spherical)

{X}

(2.1)

Parameters(beta, k)

{beta, k}

(2.2)

Setup(metric = {(1, 1) = a(t)^2/(-k*r^2+1), (2, 2) = (a(t)*r)^2, (3, 3) = (a(t)*r*sin(theta))^2, (4, 4) = -1})

[metric = {(1, 1) = a(t)^2/(-k*r^2+1), (2, 2) = a(t)^2*r^2, (3, 3) = a(t)^2*r^2*sin(theta)^2, (4, 4) = -1}]

(2.3)

Define(b[mu])

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.4)

``

Define(Db[nu, mu] = D_[nu](b[mu](X)))``

{Physics:-D_[mu], Db[nu, mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.5)

Define(b[mu] = [0, 0, 0, beta], redo)

{Physics:-D_[mu], Db[nu, mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], b[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.6)

Db[]

Error, (in index/PhysicsTensor) too many levels of recursion

 

````

``

On my first attempt, expression (1.7) is almost fine, but β is supposed to be constant (and a function of "t" in the future), so I set it as a constant function. But then it causes that problem. Therefore, on my second attempt, I tried to set β as a parameter since the beginning, but it was no good either.


If I were to take the covariant derivative as "D_[nu](b[mu])" (without the "(X)"), it would not have that specific problem, but would not be a good solution, since the covariant derivative would discard the partial derivative of b[mu] and, if it would have some dependence on the coordinates, it would give a wrong result.


The only way it seems to work is by defining the tensor "Db[mu,nu]" explicitly as "d_[mu](b[nu](X)) - Christoffel[~alpha, mu, nu]*b[alpha]". (It seems that the problem comes from that "(X)" next to "b[alpha]" in the connection term.) But that would be an awful way to circumvent the problem. Isn't there any better way to get this?


Can someone help me with this, please?


Thanks for any help!

 

Download Cov._derivative_of_a_specific_vector.mw

 

We recently had a question about using some of the plotting commands in Maple to draw things. We were feeling creative and thought why not take it a step further and draw something in 3D.

Using the geom3d, plottools, and plots packages we decided to make a gingerbread house.

To make the base of the house we decided to use 2 cubes, as these would give us additional lines and segments for the icing on the house.

point(p__1,[2,3,2]):
point(p__2,[3,3,2]):
cube(c1,p__1,2):
cube(c2,p__2,2):
base:=draw([c1,c2],color=tan);

Using the same cubes but changing the style to be wireframe and point we made some icing lines and decorations for the gingerbread house.

base_decor1:=draw([c1,c2],style=wireframe,thickness=3,color=red,transparency=0.2):
base_decor2:=draw([c1,c2],style=wireframe,thickness=10,color=green,linestyle=dot):
base_decor3:=draw([c1,c2],style=point,thickness=2,color="Silver",symbol=sphere):
base_decor:=display(base_decor1,base_decor2,base_decor3);

To create the roof we found the vertices of the cubes and used those to find the top corners of the base.

v1:=vertices(c1):
v2:=vertices(c2):
pc1:=seq(point(pc1||i,v1[i]),i=1..nops(v1)):
pc2:=seq(point(pc2||i,v2[i]),i=1..nops(v2)):
topCorners:=[pc1[5],pc1[6],pc2[1],pc2[2]]:
d1:=draw(topCorners):

Using these top corners we found the midpoints (where the peak of the roof would be) and added the roof height to the coordinates.

midpoint(lc1,topCorners[1],topCorners[2]):
detail(lc1);

point(cc1,[-(2*sqrt(3))/3 + 2, (2*sqrt(3))/3 + 3+1, 2]):
d3:=draw(cc1):

midpoint(lc2,topCorners[3],topCorners[4]):
detail(lc2);

point(cc2,[(2*sqrt(3))/3 + 3, (2*sqrt(3))/3 + 3+1, 2]):
d4:=draw(cc2):

With the midpoints and vertices at the front and rear of the house we made two triangles for the attic of the gingerbread house.

triangle(tf,[topCorners[1],topCorners[2],cc1]):
front:=draw(tf,color=brown):

triangle(tb,[topCorners[3],topCorners[4],cc2]):
back:=draw(tb,color=tan):

Using these same points again we made more triangles to be the roof.

triangle(trl,[cc1,cc2,pc1[5]]):
triangle(trh,[pc2[2],pc1[6],cc1]):
triangle(tll,[cc1,cc2,pc2[2]]):
triangle(tlh,[pc2[1],pc1[5],cc2]):
roof:=draw([trl,trh,tll,tlh],color="Chocolate");

Our gingerbread house now had four walls, a roof, and icing, but no door. Creating the door was as easy as making a parallelepiped, but what is a door without more icing?

door:=display(plottools:-parallelepiped([1,0,0],[0,1.2,0],[0,0,0.8],[0.8,1.9,1.6]),color="DarkRed"):
door_decor1:=display(plottools:-parallelepiped([1,0,0],[0,1.2,0],[0,0,0.8],[0.8,1.9,1.6]),color="Gold",style=line):
door_decor2:=display(plottools:-parallelepiped([1,0,0],[0,1.2,0],[0,0,0.8],[0.8,1.9,1.6]),color="Silver", style=line,linestyle=dot,thickness=5):
door_decor:=display(door_decor1,door_decor2):

Now having a door we could have left it like this, but what better way to decorate a gingerbread house than with candy canes? Naturally, if we were going to have one candy cane we were going to have lots of candy canes. To facilitate this we made a candy cane procedure.

candy_pole:=proc(c:=[0,0,0], {segR:=0.1}, {segH:=0.1}, {segn:=7}, {tilt_theta:=0}, {theta:=0}, {arch:=true}, {flip:=false})
local cane1,cane2,cane_s,cane_c,cane0,cane,i,cl,cd,ch, cane_a,tmp,cane_ac,cane_a1,cane00,cane01,cane02,cane_a1s,tmp2,cane_a2s:
uses plots,geom3d:
cl:=c[1]:
cd:=c[2]:
ch:=c[3]:
cane1:=plottools:-cylinder([cd, ch, cl], segR, segH,style=surface):

cane2:=display(plottools:-rotate(cane1,Pi/2,[[cd,ch,cl],[cd+1,ch,cl]])):
cane_s:=[cane2,seq(display(plottools:-translate(cane2,0,segH*i,0)),i=1..segn-1)]:
cane_c:=seq(ifelse(type(i,odd),red,white),i=1..segn):

cane0:=display(cane_s,color=[cane_c]):

if arch then

cane_a:=plottools:-translate(cane2,0,segH*segn-segH/2,0):
tmp:=i->plottools:-rotate(cane_a,i*Pi/24, [ [cd,ch+segH*segn-segH/2,cl+segR*2] , [cd+1,ch+segH*segn-segH/2,cl+segR*2] ] ):

cane_ac:=seq(ifelse(type(i,odd),red,white),i=1..24):

                cane_a1s:=seq(plottools:-translate(tmp(i),0,segH*i/12,segR*i/4),i=1..12):

tmp2:=i->plottools:-rotate(cane_a1s[12],i*Pi/24,[[cd,ch+segH*segn-0.05,cl+segR*2],[cd+1,ch+segH*segn-0.05,cl+segR*2]]):

cane_a2s:=seq(plottools:-translate(tmp2(i),0,-segH*i/500,segR*i/4),i=1..12):
cane_a1:=display(cane_a1s,cane_a2s,color=[cane_ac]):
cane00:=display(cane0,cane_a1);

                if flip then

cane01:=plottools:-rotate(cane00,tilt_theta,[[cd,ch,cl],[cd+1,ch,cl]]):
cane02:=plottools:-rotate(cane01,theta,[[cd,ch,cl],[cd,ch+1,cl]]):
cane:=plottools:-reflect(cane01,[[cd,ch,cl],[cd,ch+1,cl]]):

                else

cane01:=plottools:-rotate(cane00,tilt_theta,[[cd,ch,cl],[cd+1,ch,cl]]):
cane:=plottools:-rotate(cane01,theta,[[cd,ch,cl],[cd,ch+1,cl]]):

                end if:

                return cane:

else

                cane:=plottools:-rotate(cane0,tilt_theta,[[cd,ch,cl],[cd+1,ch,cl]]):

                return cane:

end if:

end proc:

With this procedure we decided to add candy canes to the front, back, and sides of the gingerbread house. In addition we added two candy poles.

Candy Canes in front of the house:

cane1:=candy_pole([1.2,0,2],segn=9,arch=false):
cane2:=candy_pole([2.8,0,2],segn=9,arch=false):
cane3:=candy_pole([2.7,0.8,3.3],segn=9,segR=0.05,tilt_theta=-Pi/7):
cane4:=candy_pole([1.3,0.8,3.3],segn=9,segR=0.05,tilt_theta=-Pi/7,flip=true):
front_canes:=display(cane1,cane2,cane3,cane4):

Candy Canes at the back of the house:

caneb3:=candy_pole([1.5,4.2,2.5],segn=15,segR=0.05,tilt_theta=-Pi/3,flip=true):
caneb4:=candy_pole([2.5,4.2,2.5],segn=15,segR=0.05,tilt_theta=-Pi/3):}
back_canes:=display(caneb3,caneb4):

Candy Canes at the left of the house:

canel1:=candy_pole([0.8,1.5,2.5],segn=15,segR=0.05,tilt_theta=-Pi/7,theta=Pi/2):
canel2:=candy_pole([0.8,2.5,2.5],segn=15,segR=0.05,tilt_theta=-Pi/7,theta=Pi/2):
canel3:=candy_pole([0.8,4,2.5],segn=15,segR=0.05,tilt_theta=-Pi/7,theta=Pi/2):
left_canes:=display(canel1,canel2,canel3):

Candy Canes at the right of the house:

caner1:=candy_pole([3.2,1.5,2.5],segn=15,segR=0.05,tilt_theta=-Pi/7,theta=Pi/2):
caner2:=candy_pole([3.2,2.5,2.5],segn=15,segR=0.05,tilt_theta=-Pi/7,theta=Pi/2):
caner3:=candy_pole([3.2,4,2.5],segn=15,segR=0.05,tilt_theta=-Pi/7,theta=Pi/2):
right_canes:=display(caner1,caner2,caner3):

canes:=display(front_canes,back_canes,right_canes,left_canes):

With these canes in place all that was left was to create the ground and display our Gingerbread House.

ground:=display(plottools:-parallelepiped([5,0,0],[0,0.5,0],[0,0,4],[0,1.35,0]),color="DarkGreen"):

display([door,door_decor,d1,base,base_decor,d3,d4,front,back,roof,ground,canes],orientation=[-100,0,95]);

You can download the full worksheet creating the gingerbread house below:

Geometry_Gingerbread.mw

How can add a PNG within a text section of a Maple Worksheet without having the image appear with a black background?

Does Maple have an alpha channel or transparency setting that must be toggled for this to work?

Maple 2019
macOS 10.14.6

I am added pictures from the clipboard via drag+drop.

(Yes, I know that I can use JPEG without this problem and that is NOT my question).

--
JJW

Hello;

Maple 2019.2.1 on windows 10

Is there a trick to make inttrans:-fourier(erf(x),x,k) return the Fourier transform of the error function? Now, using Maple 2019.2.1 it returns unevaluated. But direct application of Fourier transform integral does return the correct result. So why inttrans does not work? 
 

inttrans:-fourier(erf(x),x,k)

fourier(erf(x), x, k)

1/sqrt(2*Pi)*int(erf(x)*exp(-I*x*k),x=-infinity..infinity)

-I*2^(1/2)*exp(-(1/4)*k^2)/(Pi^(1/2)*k)

 

 

Download erf.mw

 

 

 

Eksamensopgaver_samlet.mw

Hey

Can anyone help me with this file?

I don't know how it happend, but the file somehow got corrupted. Is there anything i can do?

Thanks 

Hi,

I am a newbie and therefore have a rather simple question for the community:

By reading in my measurement data (topographic data) I have generated column vectors:
for i from 1 to k do
    B[i] := Vector(A[1 .. k, i]);
end do:
where k is a predefined rank of the original square matrix. The arithmetic mean was then calculated for each individual column vector:
for i from 1 to k do
    Am[i] := add(B[i][n], n = 1 .. k)/k;
end do:

Now I try to create new column vectors by subtracting the corresponding mean value from each entry of the original vectors, something like that:
for i from 1 to k do
C[i]:=B[i][n]-Am[i],n=1..k

But I just can't get it right. Can anyone help me? Thanks in advance!

Cheers
Christian

Hi everyone, I have a problem in the code solving coupled partial differential equations. I could not find out the solution. Please help me out with this. Find the code in the attachment.

This update fixes the problems inadvertently introduced in Maple 2019.2, namely:

  • Maple failed to run the code in the maple.ini/.mapleinit initialization files when loading existing worksheets containing a restart() command
  • Installing some packages from the MapleCloud was unsuccessful

For anyone who installed the 2019.2 update, installing 2019.2.1 will fix these problems.

If you are at Maple 2019.1 or earlier, installing this update will bring you straight to Maple 2019.2.1.

This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2019.2.1 download page.

If you are a MapleSim user, please note that these problems do not affect your use of MapleSim. If you use Maple on its own, and if you use Maple command initialization files and/or you need to install a package from the MapleCloud that does not work, please contact Maplesoft Technical Support for assistance.

We sincerely apologize for the inconvenience and thank you for your patience as we worked through this issue.

I'm new to using Maple and am trying to create the procedure above. My code so far:

with(combinat):
g:=proc(n)
 local x; local setG; local setG2;
    for x from 1 to n do
        setG:={seq(x+1,x=1..n-1)}; setG2:=choose(setG,3); nops(setG2);
    end do;
end proc; 

Although this doesn't seem to work even though

setG:={seq(x+1,x=1..5)}; setG2:=choose(setG,3); nops(setG2);

Any help would be greatly appreciated!! 

 

What is the correct way to specify region where solution of a PDE is needed? For example, I am trying to verify my hand solution to this HW problem: Solve Poisson PDE in 2D 

The above is the only information given in the textbook. So it is only in the upper half plane. If I type this

interface(showassumed=0);
pde := VectorCalculus:-Laplacian(u(x,y),[x,y])=-1/(1+y);
bc:=u(x,0)=0;
pdsolve([pde,bc],u(x,y)) assuming y>0

Maple gives 

But I get by hand using method of images is

So not exactly the same. I think I made mistake in my solution. But I am also not sure that just saying "assuming y>0" is doing what I think it is supposed to do. For example, suppose we want to solve the same PDE say in the first quadrant. Typing

pdsolve([pde,bc],u(x,y)) assuming y>0,x>0

Gives same solution. But the solution should be different. And typing

pdsolve([pde,bc],u(x,y)) 

Gives same answer as well.

So I think I need another way to tell Maple the region of the solution. i.e. I need to tell Maple to use the Laplacian for the upper half plane only and not the Laplacian in the whole 2D space.

Any suggestions what to do and how to handle such problems?

Thank you

When composing multiple plots, plots:-display's normal behavior is to set the overall plotting region to what is necessary to accommodate the union of the individual plots.  That works correctly most of the time but not in the case shown below.  This may indicate a bug in one of plots:-shadebetween,  plots:-display,  plottools:-extrude.  I have not been able to pinpoint the problem.  Any ideas?

restart;

Make a 3D plot:

plots:-shadebetween(x^2, 2-x^2, x=-1..1, color=red, transparency=0):
p1 := plottools:-extrude(%, 0..0.3);

 

Make another 3D plot:

plottools:-sphere([1.5,0,0], 1, color="Green"):
p2 := plots:-display(%);

 

Combine the plots:

plots:-display([p1,p2], scaling=constrained, style=surface);

 

We see that most of the green sphere has been cut off.  One way to fix things is
to add a view option (see below), but that wouldn't have been necessary if things
were working properly.

plots:-display([p1,p2], scaling=constrained, style=surface,
  view=[-1..3, DEFAULT, DEFAULT]);

 

This was done in Maple 2019.

Maple 2017 behaves the same way.  I don't know whether this ever worked properly in earlier Maples.
 

Download bug-in-3D-view.mw

 

Hello;

What trick if any is needed to obtain zero for this sum in Maple?

sum(sin(Pi*n/2)*sin(n*Pi*(x + 1)/2)*cos(n*Pi*t/2),n=1..infinity)

The above sum, according to Mathematica is zero. I am trying to see if same result can be obtained by Maple in order to verify this result. It is possible ofcourse that Mathematica result is not correct. I am also trying to verify the sum is zero by hand, but no success so far.

mySum:=sum(sin(Pi*n/2)*sin(n*Pi*(x + 1)/2)*cos(n*Pi*t/2),n=1..infinity)

sum(sin((1/2)*Pi*n)*sin((1/2)*n*Pi*(x+1))*cos((1/2)*n*Pi*t), n = 1 .. infinity)

value(mySum)

sum(sin((1/2)*Pi*n)*sin((1/2)*n*Pi*(x+1))*cos((1/2)*n*Pi*t), n = 1 .. infinity)

simplify(mySum)

sum(sin((1/2)*Pi*n)*sin((1/2)*n*Pi*(x+1))*cos((1/2)*n*Pi*t), n = 1 .. infinity)

 


Here is Mathematica result

Using Maple 2019.2 on windows 10. 

Thanks

Download q2.mw

Hello,

a follow up question.

I am solving some overdetermined system of ODEs in cylindrical coordinates r,phi,Z. I obtain some equations of the following type:

(diff(_F1(phi, Z), phi)*r + diff(diff(s_r(phi, Z), phi), phi))/r = -s_r(phi, Z)/r

As can be seen, the differentiated functions do not depend on r, which is an independent variable. Thus, the correct solution is to separate the equation and have 

_F1(phi,Z)=_F1(Z), s_r(phi,Z)=s_r(Z).

By using dsolve, I always obtain a solution containing r.

A similar problem that does no contain derivatives is solved by solve/identity.

Is there something similar for dsolve?

EDIT: I again put here more info and file. I solve some overdetermined system of differential equations.

[diff(s_r(r, phi, Z), r) = 0, diff(s_r(r, phi, Z), phi) = -diff(s_phi(r, phi, Z), r)*r^2,
diff(s_Z(r, phi, Z), r) = -diff(s_r(r, phi, Z), Z), diff(s_phi(r, phi, Z), phi) = -s_r(r, phi, Z)/r, 
diff(s_Z(r, phi, Z), phi) = -diff(s_phi(r, phi, Z), Z)*r^2, diff(s_Z(r, phi, Z), Z) = 0, 
diff(m(r, phi, Z), r) = s_Z(r, phi, Z)*B_phi(r, phi, Z) - s_phi(r, phi, Z)*B_Z(r, phi, Z),
 diff(m(r, phi, Z), phi) = s_r(r, phi, Z)*B_Z(r, phi, Z) - s_Z(r, phi, Z)*B_r(r, phi, Z),
 diff(m(r, phi, Z), Z) = s_phi(r, phi, Z)*B_r(r, phi, Z) - s_r(r, phi, Z)*B_phi(r, phi, Z), 
s_r(r, phi, Z)*diff(W(r, phi, Z), r) + s_phi(r, phi, Z)*diff(W(r, phi, Z), phi) + 
s_Z(r, phi, Z)*diff(W(r, phi, Z), Z) = 0]

After some time, I arrive at the equation in the original question. So the independance of the other functions on r is the consequence of the other equations.

Here is the file (shortened): mwquestion2.mw

Hello everybody,

I am new to MaplePrimes, so I am sorry for possible bad formatting.

I am solving some physical problem in cylindrical coordinates, so the EDIT independent variables are r,phi,Z. The equations I obtain contain constants _C from dsolve and constant parameters aplha[i,j], for example

sin(phi)*_C1*alpha[3, 5] + cos(phi)*_C1*alpha[3, 4] = sin(phi)*_C11*alpha[1, 3] - cos(phi)*_C11*alpha[2, 3]

I would like to solve this type of equations for all values of the variables, namely phi in the example above.

If I do not choose the variables for which to solve, I get phi=phi as one of the equations in the solution. If i choose all the variables except phi, i get an the expression for the constants containing the variable phi.

Is there a way to solve these equations automatically or do I have to separate them manually using collect and coeffs?

Or could the solution be the comand Parameters from Physics package?

Thank you in advance for your help.

EDIT: I did not explain the problem properly. I am solving some complicated set of determining equations to obtain integrals of motion. They are rce in the attached file. I substitute some ansatz for the magnetic field and I solve them for 

W(r), h_Z(r, phi, Z), h_phi(r, phi, Z), h_r(r, phi, Z), m(r, phi, Z), n_Z(r, phi, Z), n_phi(r, phi, Z), n_r(r, phi, Z), s_Z(r, phi, Z), s_phi(r, phi, Z), s_r(r, phi, Z), rho(r), sigma(r)

The first set of equation, called third in the file are solved by HOconds_polar_solved. This is where the  konstants alpha[i,j] appear. I substitute HOconds_polar_solved into the equations rce and try to solve them for the remaining functions.

Because it is an overdetermined system, I get some equations of the type in the original question or (for example)

8*r^5*_C1*((alpha[4, 4] - alpha[5, 5])*cos(2*phi) + sin(2*phi)*alpha[4, 5])=0

Because r and phi are the independent veriables of the system, the solution to the equation above should be 

_C1=0 or (alpha[4,4]=alpha[5,5] and alpha[4,5]=0)

But I get the following.

solve(8*r^5*_C1*((alpha[4, 4] - alpha[5, 5])*cos(2*phi) + sin(2*phi)*alpha[4, 5]));
 {_C1 = 0, phi = phi, r = r, alpha[4, 4] = alpha[4, 4], alpha[4, 5] = alpha[4, 5], alpha[5, 5] = alpha[5,5]}, 
{_C1 = _C1, phi = phi, r = 0, alpha[4, 4] = alpha[4, 4],  alpha[4, 5] = alpha[4, 5], alpha[5, 5] = alpha[5, 5]},
 {_C1 = _C1, phi = phi, r = r, alpha[4, 4] = -tan(2 phi) alpha[4, 5] + alpha[5, 5], alpha[4, 5] = alpha[4, 5], alpha[5, 5] = alpha[5, 5]}

The file (part of the original file, which is very long): question.mw

EDIT 2: I changed the title to contain independent variables, which makes the answer more clear. The second Answer from Carl Love works fine, at least in the presented case.

Hi everyone, I'm having a bit of trouble using the dsolve () command in maple, it keeps coming up with error messages.

My assignment is to find the first order differential equation of Tovn(t), and then I know that you have to define it and then dsolve the definition.

The problem is, that what am I doing wrong?

First 26 27 28 29 30 31 32 Last Page 28 of 44