Maple 2019 Questions and Posts

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

I'm using dsolve command to solve a differential equation. Using infolevel to 3 will tell me the classification of said DE. However, how can I see the step by step solution? I'm using Maple as a study tool so I do solve manually a DE then I'd like to compare my answer with Maple's. How can I acomplish this? Thanks in advance. 

Please may I know if you can offer ma student's discount ob the seleted version.

Thank you.

Fred.

How do I calculate the intersection curve between a plane and a drop?
The "drop" is defined in the following way:

R1 := 3.;R2 := 1.0;DR := 4;g := R2 + DR;

f1 := h -> sqrt(R1^2 - h^2);
f2 := h -> sqrt(g^2 - h^2);
f3 := h -> (1 - h/g)*f1(h*R1/g) + h*f2(h)/g;
f4 := h -> sqrt(1/2*g - 1/2*h);
f5 := h -> (1 - h/g)*f3(h) + h*f4(h)/g;
gg := h -> piecewise(h < 0, f1(h), 0 <= h, f5(h));#Radius depending on the z-position h
cir := (h, phi, R) -> <sin(phi)*R, cos(phi)*R, h>; # a circle at the hight h with radius R
#The plane is placed inside the drop.
n := (x, y, z) -> <x, y, z>/sqrt(x^2 + y^2 + z^2);

# the following lines show, how it looks like:
with(plots);
with(plottools);
dro1 := plot3d(cir(h, phi, gg(h)), h = -R1 .. g, phi = 0 .. 2*Pi, scaling = constrained, orientation = [-60, 72, 0]);
plotDropWithPlane := (x, y, z) -> display(dro1, arrow(Vector([0, 0, 0]), 2*R1*n(x, y, z), 0.2, 0.4, 0.1, cylindrical_arrow, fringe = blue, color = "Green"), implicitplot3d(x*x1 + y*y1 + z*z1 = 0, x1 = -R1 .. R1, y1 = -R1 .. R1, z1 = -R1 .. g, color = blue));
plotDropWithPlane(3, 1, 2);

#I'm searching a function like
fintersect:=theta-><"?,?,?>"

Any idea how to solve?

Best regards,

Andreas

Yeah, i have tried evalf[10](sqrt(25)).
How can i get a simple number as answer? I'm loving the software but i just wished i could type in:
int(sin(x), x = 0 .. pi)
and get 2 instead of (2.739493386*10^(-116) + (2.739493386*10^(-116))*I)*pi.
Also, when i type evalf[50](pi), i wish to get all the 50 digits, but i just get \pi :/.
Please help me.

Dear Maple users

Some students have come to us to report, that something doesn't seem to work properly in Maple 2019.1 in Document Mode. And they seem to be right: writing an passive math formula by using Shift+F5 (the formula is gray, not blue), then using F5 to get out of that Math field and back into Text Mode. Using the Enter key to go to the next line: It doesn't work! The cursor stays in the same line. This behavior is new in Maple 2019. It worked properly in Maple 2018 and earlier. I assume it is not the intention? 

I know it can easily be dealt with by making a new Paragraph by using the shortcut Ctrl+Shift+J. I call the assumed bug 'severe' though, because it will severely delay the workflow for many students. They are used to deliver a document mixed with formulas (active or passive) and text. 

NB! I have tested it on several computers (Mac and Windows), and it doesn't work on any of them.

Regards,

Erik V.

I've recently changed to maple 2019, from the 2016 version as my license for that product had expired. 
However I find it really frustrating that often upon evaluating an expression I can't convert the units. 

For instance I had a calculation that evaluated to: 

2.114163508*10^7 [kg/s^2]
 

When I try to directly replace the units within maple to instead be [J/m^2] I recieve the following error message: 


"Error, (in  Units:-TestDimensions) 'op(3, i) does not  evaluate to module" 

There is no explanation for this error when I try to look it up. However if I once again manually write the answer: 
2.114163508*10^7 [kg/s^2] and use the replace units function. 
No problem. 
I find this quite annoying and frustrating and I hope you can help.
 

Best regards 

Anders Alexander Wagenblast 

This is may be a philosophical question. But sometimes Maple suprises me when telling it to "simplify" expression. As in this example.

expr:=1/(y^3+1)^(2/3);

1/(y^3+1)^(2/3)

int(expr,y)

y*hypergeom([1/3, 2/3], [4/3], -y^3)

simplify(%)

(2/9)*y*Pi*3^(1/2)*LegendreP(-1/3, -1/3, (-y^3+1)/(y^3+1))/((-y^3)^(1/6)*(y^3+1)^(1/3)*GAMMA(2/3))

 


For me, the original result is "simpler". (Not only smaller leaf count, but it has one special function, vs. two: Legendre and Gamma). But may be Maple considers hypergeom always more "complex" than any other?

That is why I use simplify(expr,size) because I am scared of simplify without any option, as I have little idea how it decides which is simpler.

Any thoughts from the experts on how Maple decided to simplify something when no option is used? What kinds of rules it uses to decide how to transform the expression?

Maple 2019.1

 

Download simplify.mw

I'm new to Maple.

My problem is that if I input the command sqrt(3.0), for example, I get this strange result:

1.81847767202745*10^(-58) + (7.53238114626421*10^(-59))*I

The results is the same, no matter the argument of sqrt.

Also, when using ln, I get this:

-265.745524189222 + 0.785398163397448*I

Again, no matter the argument of ln, the result is the same.

What is happening?

Hello Anybody can help me to write codes for PDE to solve by Galerkin finite element method or any other methods can be able to gain results? parameter omega is unknown and should be determined.

I attached a pdf file for more .

Thanks so much

fem2
 

"restart:  rho:=7850:  E:=0.193e12:  n:=1:  AD:=10:  upsilon:=0.291:   mu:=E/(2*(1+upsilon)):  l:=0:  lambda:=E*upsilon/((1+upsilon)*(1-2*upsilon)):  R:=2.5:  ii:=2:  J:=2:       m:=1:       `u__theta`(r,theta,phi):= ( V(r,theta))*cos(m*phi):  `u__r`(r,theta,phi):= ( U(r,theta))*cos(m*phi): `u__phi`(r,theta,phi):= ( W(r,theta))*sin(m*phi):  :        eq1:=(r (R+r cos(theta))^2 (mu+lambda) (((&PartialD;)^2)/(&PartialD;r&PartialD;theta) `u__theta`(r,theta,phi))+2 r^2 (mu+lambda/2) (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;r^2) `u__r`(r,theta,phi))+r^2 (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;r) `u__phi`(r,theta,phi))+mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;theta^2) `u__r`(r,theta,phi))+(((&PartialD;)^2)/(&PartialD;phi^2) `u__r`(r,theta,phi)) mu r^2-3 (R+r cos(theta))^2 (mu+lambda/3) ((&PartialD;)/(&PartialD;theta) `u__theta`(r,theta,phi))+2 r (mu+lambda/2) (R+2 r cos(theta)) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__r`(r,theta,phi))-r^2 sin(theta) (mu+lambda) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__theta`(r,theta,phi))-3 r^2 cos(theta) (mu+lambda/3) ((&PartialD;)/(&PartialD;phi) `u__phi`(r,theta,phi))-r mu sin(theta) (R+r cos(theta)) ((&PartialD;)/(&PartialD;theta) `u__r`(r,theta,phi))-2 (mu+lambda/2) (2 (cos(theta))^2 r^2+2 cos(theta) R r+R^2) `u__r`(r,theta,phi)+r `u__theta`(r,theta,phi) sin(theta) (3 r (mu+lambda/3) cos(theta)+R mu))/(r^2 (R+r cos(theta))^2):  eq2:=(2 (mu+lambda/2) (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;theta^2) `u__theta`(r,theta,phi))+r (R+r cos(theta))^2 (mu+lambda) (((&PartialD;)^2)/(&PartialD;r&PartialD;theta) `u__r`(r,theta,phi))+r (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;theta) `u__phi`(r,theta,phi))+r^2 mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;r^2) `u__theta`(r,theta,phi))+(((&PartialD;)^2)/(&PartialD;phi^2) `u__theta`(r,theta,phi)) mu r^2+3 (R+r cos(theta)) ((4 r (mu+lambda/2) cos(theta))/3+R (mu+lambda/3)) ((&PartialD;)/(&PartialD;theta) `u__r`(r,theta,phi))-2 r (mu+lambda/2) sin(theta) (R+r cos(theta)) ((&PartialD;)/(&PartialD;theta) `u__theta`(r,theta,phi))+r mu (R+2 r cos(theta)) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__theta`(r,theta,phi))+3 r^2 sin(theta) (mu+lambda/3) ((&PartialD;)/(&PartialD;phi) `u__phi`(r,theta,phi))+(-3 r R (mu+lambda/3) cos(theta)+(-lambda-2 mu) r^2-R^2 mu) `u__theta`(r,theta,phi)-2 r (mu+lambda/2) sin(theta) R `u__r`(r,theta,phi))/(r^2 (R+r cos(theta))^2):  eq3:=(r (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;theta) `u__theta`(r,theta,phi))+r^2 (mu+lambda) (R+r cos(theta)) (((&PartialD;)^2)/(&PartialD;phi&PartialD;r) `u__r`(r,theta,phi))+mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;theta^2) `u__phi`(r,theta,phi))+r (r mu (R+r cos(theta))^2 (((&PartialD;)^2)/(&PartialD;r^2) `u__phi`(r,theta,phi))+2 r (mu+lambda/2) (((&PartialD;)^2)/(&PartialD;phi^2) `u__phi`(r,theta,phi))+(4 r (mu+lambda/2) cos(theta)+R (mu+lambda)) ((&PartialD;)/(&PartialD;phi) `u__r`(r,theta,phi))+mu (R+2 r cos(theta)) (R+r cos(theta)) ((&PartialD;)/(&PartialD;r) `u__phi`(r,theta,phi))-mu sin(theta) (R+r cos(theta)) ((&PartialD;)/(&PartialD;theta) `u__phi`(r,theta,phi))-r (3 sin(theta) (mu+lambda/3) ((&PartialD;)/(&PartialD;phi) `u__theta`(r,theta,phi))+`u__phi`(r,theta,phi) mu)))/(r^2 (R+r cos(theta))^2):  "

EQ1 := collect(eq1, cos(m*phi))/cos(m*phi)+rho*omega^2; EQ2 := collect(eq2, cos(m*phi))/cos(m*phi)+rho*omega^2; EQ3 := collect(eq3, sin(m*phi))/sin(m*phi)+rho*omega^2

(0.1788235818e12*r*(2.5+r*cos(theta))^2*(diff(diff(V(r, theta), r), theta))+0.2535718390e12*r^2*(2.5+r*cos(theta))^2*(diff(diff(U(r, theta), r), r))+0.1788235818e12*r^2*(2.5+r*cos(theta))*(diff(W(r, theta), r))+0.7474825716e11*(2.5+r*cos(theta))^2*(diff(diff(U(r, theta), theta), theta))-0.7474825716e11*U(r, theta)*r^2-0.3283200960e12*(2.5+r*cos(theta))^2*(diff(V(r, theta), theta))+0.2535718390e12*r*(2.5+2.*r*cos(theta))*(2.5+r*cos(theta))*(diff(U(r, theta), r))-0.1788235818e12*r^2*sin(theta)*(2.5+r*cos(theta))*(diff(V(r, theta), r))-0.3283200960e12*r^2*cos(theta)*W(r, theta)-0.7474825716e11*r*sin(theta)*(2.5+r*cos(theta))*(diff(U(r, theta), theta))-0.2535718390e12*(2.*cos(theta)^2*r^2+5.0*r*cos(theta)+6.25)*U(r, theta)+r*V(r, theta)*sin(theta)*(0.3283200960e12*r*cos(theta)+0.1868706429e12))/(r^2*(2.5+r*cos(theta))^2)+7850*omega^2

 

(0.2535718390e12*(2.5+r*cos(theta))^2*(diff(diff(V(r, theta), theta), theta))+0.1788235818e12*r*(2.5+r*cos(theta))^2*(diff(diff(U(r, theta), r), theta))+0.1788235818e12*r*(2.5+r*cos(theta))*(diff(W(r, theta), theta))+0.7474825716e11*r^2*(2.5+r*cos(theta))^2*(diff(diff(V(r, theta), r), r))-0.7474825716e11*V(r, theta)*r^2+3.*(2.5+r*cos(theta))*(0.1690478927e12*r*cos(theta)+0.2736000800e12)*(diff(U(r, theta), theta))-0.2535718390e12*r*sin(theta)*(2.5+r*cos(theta))*(diff(V(r, theta), theta))+0.7474825716e11*r*(2.5+2.*r*cos(theta))*(2.5+r*cos(theta))*(diff(V(r, theta), r))+0.3283200960e12*r^2*sin(theta)*W(r, theta)+(-0.8208002400e12*r*cos(theta)-0.2535718389e12*r^2-0.4671766072e12)*V(r, theta)-0.6339295976e12*r*sin(theta)*U(r, theta))/(r^2*(2.5+r*cos(theta))^2)+7850*omega^2

 

(-0.1788235818e12*r*(2.5+r*cos(theta))*(diff(V(r, theta), theta))-0.1788235818e12*r^2*(2.5+r*cos(theta))*(diff(U(r, theta), r))+0.7474825716e11*(2.5+r*cos(theta))^2*(diff(diff(W(r, theta), theta), theta))+r*(0.7474825716e11*r*(2.5+r*cos(theta))^2*(diff(diff(W(r, theta), r), r))-0.2535718390e12*r*W(r, theta)-1.*(0.5071436780e12*r*cos(theta)+0.4470589545e12)*U(r, theta)+0.7474825716e11*(2.5+2.*r*cos(theta))*(2.5+r*cos(theta))*(diff(W(r, theta), r))-0.7474825716e11*sin(theta)*(2.5+r*cos(theta))*(diff(W(r, theta), theta))-1.*r*(-0.3283200960e12*sin(theta)*V(r, theta)+0.7474825716e11*W(r, theta))))/(r^2*(2.5+r*cos(theta))^2)+7850*omega^2

(1)

#BCs can be from following
``
U(0, theta) = 0, (D[1](U))(0, theta) = 0, U(1, theta) = 0, (D[1](U))(1, theta) = 0

U(0, theta) = 0, (D[1](U))(0, theta) = 0, U(1, theta) = 0, (D[1](U))(1, theta) = 0

(2)

NULL
V(0, theta) = 0, (D[1](V))(0, theta) = 0, V(1, theta) = 0, (D[1](V))(1, theta) = 0
NULL
W(0, theta) = 0, (D[1](W))(0, theta) = 0, W(1, theta) = 0, (D[1](W))(1, theta) = 0
``

V(0, theta) = 0, (D[1](V))(0, theta) = 0, V(1, theta) = 0, (D[1](V))(1, theta) = 0

 

W(0, theta) = 0, (D[1](W))(0, theta) = 0, W(1, theta) = 0, (D[1](W))(1, theta) = 0

(3)

``


 

Download fem2

buchanan2005.pdf

 

 

So, I am trying to write a method for array interpolation. I have a Matrix that is X by 3, where each column holds specific data (column 1 holds independent data 1, column 2 holds independent data 2, column 3 holds dependent data).

This data comes from a function with 2 independent variables, and I am creating a graph of this function, basically, with both independent variables going from 0 to 1 (approximately 300 values per variable, giving me a matrix with 90k values already). My goal is to use interpolation to get a lot of values in between the points I already calculated.

That being said, I don't know how to use the ArrayInterpolation command to achieve this. I will post my code below if anyone can help me out!

Code:

Interpolate := proc(M::Matrix)
  local i; local j;
  local M1 := Matrix(RowDimension(M),1);
  local M2 := Matrix(RowDimension(M),1);
  local M3 := Matrix(RowDimension(M),1);
  for i from 1 to RowDimension(M) do
    M1(i) := M(i,1);
    M2(i) := M(i,2);
    M3(i) := M(i,3);
  end do;
  print(M1,M2,M3);
  local M4 := Matrix(1000,1);
  local M5 := Matrix(1000,1);
  for j from 1 to 1000 do
    M4(j,1) := 0.001*j;
    M5(j,1) := 0.001*j;
  end do;
  ArrayInterpolation([M1,M2],M3,[M4,M5]);
end proc;

Hello,

I'm confused about Maple's adjoint function (in the DEtools package). When I take the adjoint of the derivative operator:

DEtools:-adjoint(Dx, [Dx, x])

 

I get back simply "Dx". However, doing the calculation by hand and integrating by parts seems to indicate that this should return the negative of Dx. The inner product I'm using is int(f(x)*conjugate(g(x)), x=0..1). Is Maple perhaps using a different inner product? Or is this a generalization that I'm unaware of? Or is it perhaps just a bug?

 

Thanks!

If I do:

df:=DataFrame(Matrix(3,4,[seq(1..12)]), rows=[a,b,c],columns=[A,B,C,D]);Tabulate(df, width=100)

 

The font that Maple uses for the Tablulate is much larger than the font used to display the Dataframe. How does one choose the font size that Tabluate() uses? 

Peter

I was trying to see if Maple can solve this problem from my class textbook

When I tried boundary conditions all zero on the Laplace PDE in semicircular cylinder, pdsolve generates internal error.

The boundary conditions should not all be zero for nontrivial solution, but the question is why Maple generate this internal error? Is this a bug? Using Physics package 362, Maple 2019 on windows 10.

restart;

unassign('r,theta,z,f,H');
pde:=VectorCalculus:-Laplacian(u(r,theta,z),'cylindrical'[r,theta,z])=0;
bc:=u(r,theta,0)=0, u(r,theta,H)= f(r,theta), u(r,0,z)=0, u(r,Pi,z)=0,u(a,theta,z)=0;
sol:=pdsolve([pde,bc],u(r,theta,z)) assuming a>0,r<a,H>0,theta>0,theta<Pi

(diff(u(r, theta, z), r)+r*(diff(diff(u(r, theta, z), r), r))+(diff(diff(u(r, theta, z), theta), theta))/r+r*(diff(diff(u(r, theta, z), z), z)))/r = 0

u(r, theta, 0) = 0, u(r, theta, H) = f(r, theta), u(r, 0, z) = 0, u(r, Pi, z) = 0, u(a, theta, z) = 0

"sol := "

unassign('r,theta,z,f,H');
pde:=VectorCalculus:-Laplacian(u(r,theta,z),'cylindrical'[r,theta,z])=0;
bc:=u(r,theta,0)=0, u(r,theta,H)= 0, u(r,0,z)=0, u(r,Pi,z)=0,u(a,theta,z)=0;
sol:=pdsolve([pde,bc],u(r,theta,z)) assuming a>0,r<a,H>0,theta>0,theta<Pi

(diff(u(r, theta, z), r)+r*(diff(diff(u(r, theta, z), r), r))+(diff(diff(u(r, theta, z), theta), theta))/r+r*(diff(diff(u(r, theta, z), z), z)))/r = 0

u(r, theta, 0) = 0, u(r, theta, H) = 0, u(r, 0, z) = 0, u(r, Pi, z) = 0, u(a, theta, z) = 0

Error, (in assuming) when calling '`PDEAdvisor/2nd_order/Series/ThreeVariables`'. Received: 'invalid input: rhs received _Z3, which is not valid for its 1st argument, expr'

 


 

Download bug3.mw

Dear Maple friends~

Recently I am thinking a question about how to use Maple to prove an equation based on a known partial differential equationand its boundary conditions.

Although I can Prove it with hand computation ,it still has some difficulty and it will be really hard if its partial differential equation become more complex(As a matter of fact, it will happen).So I think of Maple and want to take advantage of computer.However,I get few ideas how to realize it .The details are as follows:

alias(u=u(x,t)):
pde:=diff(u,t)-diff(u,x$2,t)+4*u^2*diff(u,x)=3*u*diff(u,x)*diff(u,x$2)+u^2*diff(u,x$3);
N:=5;#actually N can be any positive integer!
bcs:=eval(u,x=-infinity)=0,seq(eval(diff(u,x$ha),x=-infinity)=0,ha=1..N),eval(u,x=infinity)=0,seq(eval(diff(u,x$ha),x=infinity)=0,ha=1..N);
E:=Int(u^4+2*u^2*diff(u,x)^2-diff(u,x)^4/3,x=-infinity..infinity);

#try to prove the following equation
diff(E,t)=0

The written proof is as follows:

Therfore,I submit such a problem and look forward your solutions and suggestions sincerely~

Hello everyone, Greetings!

I am facing a really strange problem. I need to write an expression, however, maple out of nowhere assigns values to the variable used. only to those which are written inside sin (). In previous versions the out put is fine. Is there a new way to write expressions in maple 2019? I am not sure.


 

restart

96*sin(2*beta*y)*cos(2*beta*y)*beta^4 + 96*sin(2*beta*y)*beta^4

(0.525982730176588e-113+0.525982730176588e-113*I)*beta^4

(1)

``


 

Download strngmpl.mw

 

1 2 3 4 5 6 7 Last Page 1 of 12