Maple 2019 Questions and Posts

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

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) (((∂)^2)/(∂r∂theta) `u__theta`(r,theta,phi))+2 r^2 (mu+lambda/2) (R+r cos(theta))^2 (((∂)^2)/(∂r^2) `u__r`(r,theta,phi))+r^2 (mu+lambda) (R+r cos(theta)) (((∂)^2)/(∂phi∂r) `u__phi`(r,theta,phi))+mu (R+r cos(theta))^2 (((∂)^2)/(∂theta^2) `u__r`(r,theta,phi))+(((∂)^2)/(∂phi^2) `u__r`(r,theta,phi)) mu r^2-3 (R+r cos(theta))^2 (mu+lambda/3) ((∂)/(∂theta) `u__theta`(r,theta,phi))+2 r (mu+lambda/2) (R+2 r cos(theta)) (R+r cos(theta)) ((∂)/(∂r) `u__r`(r,theta,phi))-r^2 sin(theta) (mu+lambda) (R+r cos(theta)) ((∂)/(∂r) `u__theta`(r,theta,phi))-3 r^2 cos(theta) (mu+lambda/3) ((∂)/(∂phi) `u__phi`(r,theta,phi))-r mu sin(theta) (R+r cos(theta)) ((∂)/(∂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 (((∂)^2)/(∂theta^2) `u__theta`(r,theta,phi))+r (R+r cos(theta))^2 (mu+lambda) (((∂)^2)/(∂r∂theta) `u__r`(r,theta,phi))+r (mu+lambda) (R+r cos(theta)) (((∂)^2)/(∂phi∂theta) `u__phi`(r,theta,phi))+r^2 mu (R+r cos(theta))^2 (((∂)^2)/(∂r^2) `u__theta`(r,theta,phi))+(((∂)^2)/(∂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)) ((∂)/(∂theta) `u__r`(r,theta,phi))-2 r (mu+lambda/2) sin(theta) (R+r cos(theta)) ((∂)/(∂theta) `u__theta`(r,theta,phi))+r mu (R+2 r cos(theta)) (R+r cos(theta)) ((∂)/(∂r) `u__theta`(r,theta,phi))+3 r^2 sin(theta) (mu+lambda/3) ((∂)/(∂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)) (((∂)^2)/(∂phi∂theta) `u__theta`(r,theta,phi))+r^2 (mu+lambda) (R+r cos(theta)) (((∂)^2)/(∂phi∂r) `u__r`(r,theta,phi))+mu (R+r cos(theta))^2 (((∂)^2)/(∂theta^2) `u__phi`(r,theta,phi))+r (r mu (R+r cos(theta))^2 (((∂)^2)/(∂r^2) `u__phi`(r,theta,phi))+2 r (mu+lambda/2) (((∂)^2)/(∂phi^2) `u__phi`(r,theta,phi))+(4 r (mu+lambda/2) cos(theta)+R (mu+lambda)) ((∂)/(∂phi) `u__r`(r,theta,phi))+mu (R+2 r cos(theta)) (R+r cos(theta)) ((∂)/(∂r) `u__phi`(r,theta,phi))-mu sin(theta) (R+r cos(theta)) ((∂)/(∂theta) `u__phi`(r,theta,phi))-r (3 sin(theta) (mu+lambda/3) ((∂)/(∂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

 

 

I am trying to find what the meaning of the values that _LatexSmallFractionConstant accepts and what they do.

For example

mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=34:
latex(simplify(mu))

{1 \left( 4\,t+1 \right) ^{-{\frac{8}{5}}} \left( t-1 \right) ^{-{
\frac{7}{5}}}}

Which renders wrong as follows

But when I set _LatexSmallFractionConstant to 35 instead of 34 this is what happens

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=35:
latex(simplify(mu))

{\frac {1}{ \left( t-1 \right) ^{{\frac{7}{5}}}} \left( 4\,t+1
 \right) ^{-{\frac{8}{5}}}}

which renders as a little better as

And when I set it to _LatexSmallFractionConstant:=100 it becomes good

However, no settings value will make latex render this fraction correctly

restart;
mu:=1/(x+y);
_LatexSmallFractionConstant:=2000000000:
latex(mu)

           \left( x+y \right) ^{-1}

But if I set it to 35 again now it fails to handle fraction right

restart;
mu:=1/2;
_LatexSmallFractionConstant:=35:
latex(mu)

    1/2

but changing to  either zero or 1 or 2 makes it generate the correct latex

restart;
mu:=1/2;
_LatexSmallFractionConstant:=0:  #1 and 2 also works. By anything larger it goes back to 1/2
latex(mu)

    {\frac{1}{2}}  #but why extra {} ??

 

So it seems some values makes it work OK (35 for top example) but same value makes it not work well for another example.

It seems like random settings to me.

Where is all of this documented?  I can't find it in help. Which file to print to see what this option does?

Maple 2019.1  on windows.


 

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=34:
latex(mu)

1/((4*t+1)^(8/5)*(t-1)^(7/5))

{1 \left( 4\,t+1 \right) ^{-{\frac{8}{5}}} \left( t-1 \right) ^{-{
\frac{7}{5}}}}

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=35:
latex(mu)

1/((4*t+1)^(8/5)*(t-1)^(7/5))

{\frac {1}{ \left( t-1 \right) ^{{\frac{7}{5}}}} \left( 4\,t+1
 \right) ^{-{\frac{8}{5}}}}

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=100:
latex(mu)

1/((4*t+1)^(8/5)*(t-1)^(7/5))

{\frac {1}{ \left( 4\,t+1 \right) ^{8/5} \left( t-1 \right) ^{7/5}}}

restart;
mu:=1/(x+y);
_LatexSmallFractionConstant:=2000000000:
latex(mu)

1/(x+y)

 \left( x+y \right) ^{-1}

restart;
mu:=1/2;
_LatexSmallFractionConstant:=3:
latex(mu)

1/2

1/2

restart;
mu:=1/2;
_LatexSmallFractionConstant:=0:
latex(mu)

1/2

{\frac{1}{2}}

 


 

Download bug_july_17_2019.mw

This is really a FYI more than a question, since I do not expect any more to be able to fix these since they are part of old Maple code called algolib, downloaded from  http://algo.inria.fr/libraries/   

I was trying to see if the latex command included in the above will work better than Maple own latex command.  I downloaded the tar file from the above http://algo.inria.fr/libraries/17.0/algolib.tar    and extracted it.  

At first I could not find where the latex command is, since it is not part of the .mla. After some struggle, I found I can get their latex command to work if I read the following 6 .mpl files (in this order) that show up after opening the above tar file

read "C:/MAPLE/algolib/mad/CommonLib.mpl";
read "C:/MAPLE/algolib/mad/DocumentGenerator.mpl";
read "C:/MAPLE/algolib/mad/MAD.mpl";
read "C:/MAPLE/algolib/mad/LaTeX.mpl";
read "C:/MAPLE/algolib/mad/HTMX.mpl";
read "C:/MAPLE/algolib/mad/DocumentGenerator.mpl";

Once I did the above, now I could do the command

MADLaTeX:-latex(sol);

#or 

MADLaTeX:-latex(sol,'string')

And these work now. For example

MADLaTeX:-latex(1/2)

         \frac{1}{2}

So I said, great, finally a Maple latex command that knows how to convert a fraction to latex the right way. Much better than Maple's latex command default output 

latex(1/2)

         1/2

But when I started testing it more, I found many problems. So I am posting these issues, since I do not know where to send them to, as this package is no longer being maintained. May be some Maple expert can figure how to fix them if there is an interest.  I looked at the code above, and too complicated for me to even figure where to look and how to fix these.

restart;

read "C:/MAPLE/algolib/mad/CommonLib.mpl";
read "C:/MAPLE/algolib/mad/DocumentGenerator.mpl";
read "C:/MAPLE/algolib/mad/MAD.mpl";
read "C:/MAPLE/algolib/mad/LaTeX.mpl";
read "C:/MAPLE/algolib/mad/HTMX.mpl";
read "C:/MAPLE/algolib/mad/DocumentGenerator.mpl";

#EXAMPLE 1

V:=x->piecewise(0<=x and x<=a,0,infinity);
ic:=f(x,0)=piecewise(0<=x and x<=a,A*x*(a-x),0);
pde :=I*h*diff(f(x,t),t)=-h^2/(2*m)*diff(f(x,t),x$2) +V(x)*f(x,t);
sol:=pdsolve([pde,ic],f(x,t)) assuming a>0;
lprint(sol);

V := proc (x) options operator, arrow; piecewise(0 <= x and x <= a, 0, infinity) end proc

ic := f(x, 0) = piecewise(0 <= x and x <= a, A*x*(a-x), 0)

pde := I*h*(diff(f(x, t), t)) = -h^2*(diff(f(x, t), x, x))/(2*m)+piecewise(0 <= x and x <= a, 0, infinity)*f(x, t)

f(x, t) = piecewise(0 <= x and x <= a, A*x*(a-x), 0)+Sum(t^n*((proc (U) options operator, arrow; -I*(-(1/2)*h^2*(diff(diff(U, x), x))/m+piecewise(0 <= x and x <= a, 0, infinity)*U)/h end proc)@@n)(piecewise(0 <= x and x <= a, A*x*(a-x), 0))/factorial(n), n = 1 .. infinity)

f(x,t) = piecewise(0 <= x and x <= a,A*x*(a-x),0)+Sum(t^n*((U -> -I*(-1/2*h^2/m
*diff(diff(U,x),x)+piecewise(0 <= x and x <= a,0,infinity)*U)/h)@@n)(piecewise(
0 <= x and x <= a,A*x*(a-x),0))/n!,n = 1 .. infinity)

MADLaTeX:-latex(sol)

Error, (in typetomath) 0 <= x and x <= a: invalid for math mode

latex(sol)

f \left( x,t \right) =
\cases{Ax \left( a-x \right) &$0\leq x$\  and \ $x\leq a$\cr 0&otherwise\cr}
+\sum _{n=1}^{\infty }{\frac {{t}^{n} \left( U\mapsto {\frac {-i
\cases{0&$0\leq x$\  and \ $x\leq a$\cr \infty &otherwise\cr}U}{h}}^{

 \left( n \right) } \right)  \left(
\cases{Ax \left( a-x \right) &$0\leq x$\  and \ $x\leq a$\cr 0&otherwise\cr}
 \right) }{n!}}

#EXAMPLE 2

pde := diff(v(t, s), t) +s^2*(diff(v(t, s), s, s))/(2*sigma^2)+(r-q)*s*(diff(v(t, s), s))-r*v(t, s) = 0;
ic:=v(T, s) = psi(s);
sol:=pdsolve([pde,ic],v(t,s));
lprint(sol);

diff(v(t, s), t)+(1/2)*s^2*(diff(diff(v(t, s), s), s))/sigma^2+(r-q)*s*(diff(v(t, s), s))-r*v(t, s) = 0

v(T, s) = psi(s)

v(t, s) = psi(s)+Sum((t-T)^n*((proc (U) options operator, arrow; -(1/2)*(diff(diff(U, s), s))*s^2/sigma^2+s*(-r+q)*(diff(U, s))+r*U end proc)@@n)(psi(s))/factorial(n), n = 1 .. infinity)

v(t,s) = psi(s)+Sum((t-T)^n*((U -> -1/2*diff(diff(U,s),s)*s^2/sigma^2+s*(-r+q)*
diff(U,s)+r*U)@@n)(psi(s))/n!,n = 1 .. infinity)

MADLaTeX:-latex(sol)

Error, (in symbol/string) only ANSI-C compliant symbols are handled

latex(sol)

v \left( t,s \right) =\psi \left( s \right) +\sum _{n=1}^{\infty }{
\frac { \left( t-T \right) ^{n} \left( U\mapsto rU^{ \left( n \right)
} \right)  \left( \psi \left( s \right)  \right) }{n!}}

#EXAMPLE 3

interface(showassumed=0);
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2)- u(x,t)*x;
ic  := u(x,0)=sin(x);
bc  := u(0,t)=0,u(Pi,t)=0;
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming k>0;
lprint(sol)

0

diff(u(x, t), t) = k*(diff(diff(u(x, t), x), x))-u(x, t)*x

u(x, 0) = sin(x)

u(0, t) = 0, u(Pi, t) = 0

u(x, t) = `casesplit/ans`(Sum(-(AiryBi(-lambda[n]/k^(1/3))*AiryAi((-lambda[n]+x)/k^(1/3))-AiryBi((-lambda[n]+x)/k^(1/3))*AiryAi(-lambda[n]/k^(1/3)))*((Int(sin(x)*AiryBi((-lambda[n]+x)/k^(1/3)), x = 0 .. Pi))*AiryAi(-lambda[n]/k^(1/3))-AiryBi(-lambda[n]/k^(1/3))*(Int(sin(x)*AiryAi((-lambda[n]+x)/k^(1/3)), x = 0 .. Pi)))*(-sinh(lambda[n]*t)+cosh(lambda[n]*t))/((Int(AiryBi((-lambda[n]+x)/k^(1/3))^2, x = 0 .. Pi))*AiryAi(-lambda[n]/k^(1/3))^2-2*AiryBi(-lambda[n]/k^(1/3))*(Int(AiryBi((-lambda[n]+x)/k^(1/3))*AiryAi((-lambda[n]+x)/k^(1/3)), x = 0 .. Pi))*AiryAi(-lambda[n]/k^(1/3))+AiryBi(-lambda[n]/k^(1/3))^2*(Int(AiryAi((-lambda[n]+x)/k^(1/3))^2, x = 0 .. Pi))), n = 0 .. infinity), {And(AiryAi((-lambda[n]+Pi)/k^(1/3))*AiryBi(-lambda[n]/k^(1/3))-AiryBi((-lambda[n]+Pi)/k^(1/3))*AiryAi(-lambda[n]/k^(1/3)) = 0, -infinity <= lambda[n] and lambda[n] <= infinity)})

u(x,t) = `casesplit/ans`(Sum(-(AiryBi(-1/k^(1/3)*lambda[n])*AiryAi((-lambda[n]+
x)/k^(1/3))-AiryBi((-lambda[n]+x)/k^(1/3))*AiryAi(-1/k^(1/3)*lambda[n]))*(Int(
sin(x)*AiryBi((-lambda[n]+x)/k^(1/3)),x = 0 .. Pi)*AiryAi(-1/k^(1/3)*lambda[n])
-AiryBi(-1/k^(1/3)*lambda[n])*Int(sin(x)*AiryAi((-lambda[n]+x)/k^(1/3)),x = 0
.. Pi))*(-sinh(lambda[n]*t)+cosh(lambda[n]*t))/(Int(AiryBi((-lambda[n]+x)/k^(1/
3))^2,x = 0 .. Pi)*AiryAi(-1/k^(1/3)*lambda[n])^2-2*AiryBi(-1/k^(1/3)*lambda[n]
)*Int(AiryBi((-lambda[n]+x)/k^(1/3))*AiryAi((-lambda[n]+x)/k^(1/3)),x = 0 .. Pi
)*AiryAi(-1/k^(1/3)*lambda[n])+AiryBi(-1/k^(1/3)*lambda[n])^2*Int(AiryAi((-
lambda[n]+x)/k^(1/3))^2,x = 0 .. Pi)),n = 0 .. infinity),{And(AiryAi(1/k^(1/3)*
(-lambda[n]+Pi))*AiryBi(-1/k^(1/3)*lambda[n])-AiryBi(1/k^(1/3)*(-lambda[n]+Pi))
*AiryAi(-1/k^(1/3)*lambda[n]) = 0,-infinity <= lambda[n] and lambda[n] <=
infinity)})

MADLaTeX:-latex(sol)

Error, (in typetomath) -infinity <= lambda[n] and lambda[n] <= infinity: invalid for math mode

latex(sol)

u \left( x,t \right) =\mbox {{\tt `casesplit/ans`}} \left( \sum _{n=0
}^{\infty } \left( {(-\sinh \left( \lambda_{{n}}t \right) +\cosh
 \left( \lambda_{{n}}t \right) ) \left( {{\rm Bi}\left({\frac {-
\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}{{\rm Ai}\left(-{\frac {\lambda
_{{n}}}{\sqrt [3]{k}}}\right)}-{{\rm Bi}\left(-{\frac {\lambda_{{n}}}{

\sqrt [3]{k}}}\right)}{{\rm Ai}\left({\frac {-\lambda_{{n}}+x}{\sqrt [
3]{k}}}\right)} \right)  \left( \int_{0}^{\pi}\!\sin \left( x \right)
{{\rm Bi}\left({\frac {-\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}
\,{\rm d}x{{\rm Ai}\left(-{\frac {\lambda_{{n}}}{\sqrt [3]{k}}}
\right)}-{{\rm Bi}\left(-{\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}
\int_{0}^{\pi}\!\sin \left( x \right) {{\rm Ai}\left({\frac {-\lambda_
{{n}}+x}{\sqrt [3]{k}}}\right)}\,{\rm d}x \right)  \left( \int_{0}^{
\pi}\! \left( {{\rm Bi}\left({\frac {-\lambda_{{n}}+x}{\sqrt [3]{k}}}
\right)} \right) ^{2}\,{\rm d}x \left( {{\rm Ai}\left(-{\frac {\lambda
_{{n}}}{\sqrt [3]{k}}}\right)} \right) ^{2}-2\,{{\rm Bi}\left(-{\frac
{\lambda_{{n}}}{\sqrt [3]{k}}}\right)}\int_{0}^{\pi}\!{{\rm Bi}\left({
\frac {-\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}{{\rm Ai}\left({\frac {
-\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}\,{\rm d}x{{\rm Ai}\left(-{
\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}+ \left( {{\rm Bi}\left(-{
\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)} \right) ^{2}\int_{0}^{\pi
}\! \left( {{\rm Ai}\left({\frac {-\lambda_{{n}}+x}{\sqrt [3]{k}}}
\right)} \right) ^{2}\,{\rm d}x \right) ^{-1}} \right) , \left\{ {\it
And} \left( {{\rm Ai}\left({\frac {-\lambda_{{n}}+\pi}{\sqrt [3]{k}}}
\right)}{{\rm Bi}\left(-{\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}-
{{\rm Bi}\left({\frac {-\lambda_{{n}}+\pi}{\sqrt [3]{k}}}\right)}{
{\rm Ai}\left(-{\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}=0,-
\infty \leq \lambda_{{n}} \land \lambda_{{n}}\leq \infty  \right)
 \right\}  \right)

 

 


 

Download bugs_in_aldor_latex.mw

 

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

 

If I have checked the Editable button just below the working window, then the temperature would be very high in the next time when I start Maple 2019. I do not what is going on. But when I unchecked the Editable button, and wait for several seconds, then the temperature and the load of my laptop are on the normal state.  Is this a bug for Maple 2019? My OS is Debian Stretch, that is,

$ uname -a
Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux

 

I was wondering why Maple hangs on this first order heat pde (waited for more than 15 minutes)

pde:= diff(u(x,t),t)= diff(u(x, t), x$2) - 9*diff(u(x,t),x);
bc:=u(0,t)=0,u(1,t)=0;
ic:=u(x, 0) = exp(45/10*x)*(5*sin(Pi*x) + 9*sin(2*Pi*x) + 2*sin(3*Pi*x));
#infolevel[pdsolve]:=3;
pdsolve([pde,ic,bc],u(x,t))

It shows it hangs here:

Trying HINT = _F1(x)*_F2(t)
                           Trying given functional HINT ...
                     Third set of solution methods successful

Mathematica solves this very quickly and returns

heqn = D[u[x, t], t] == D[u[x, t], {x, 2}] - 9*D[u[x, t], x];
ic = u[x, 0] == Exp[45/10 x]*(5 Sin[Pi*x] + 9 Sin[2*Pi*x] + 2 Sin[3*Pi*x]);
bc = {u[0, t] == 0, u[1, t] == 0};
sol = DSolve[{heqn, ic, bc}, u[x, t], {x, t}]

I am asking becuase Maple normally have no problem with such PDE's so I was surprised it hangs on this one and was trying to find out why.

Other than using infolevel[pdsolve]:= what other tools should one try to debug where exactly it hangs and why?

Maple 2019, Physics V 350

Hi,

I am having issues with switching from math mode to text mode, when it comes to adding a new line of text under a line of math mode, without evaluating the math. In a previous version of Maple (not sure witch one, probably Maple 2018), I would switch from math mode to text mode by using the shortcut "command + T", followed by hitting the "->" button on the keyboard and then hit enter to start a new line in text mode. But this does not work in the latest version of maple. Does anyone have a solution for this problem?

Also, is there a way to remove the "toolbox" (i.e. "solve for"/"expand"/"simplify"/"isolate"/etc.), so it only appears when right-clicking on the expression you want to edit?

It's no secret that I liked the older versions of Maple, but I'd very much appreciate some assistance with the 2019 version!

Kind regards,

Lisa

My Maple Worksheets (not Maple Documents) have lots of explanetory Text blocks [..... surounding executable Math blocks ([> ..... I often insert mathematical symbols, most commonly subscripted variables, in these Text blocks.  For a simple example, consider the text block entered as

[This is a test of a subscripted variable "CTL-R" h__0 "CTL-T" in a text block.

The "CTL-R" (quotes are not actually entered) is the short cut to go into math mode, and "CTL-T" exits math mode and returns to text mode and the double underscore produces an atomic subscripted variable.

The text block actually will look like

[This is a test of a subscripted variable h0 in a text block.

The problem occurs when I reexecute the worksheet. The Text block actually produces output labeled with an equation number. For my simple example above the Text block becomes

[This is a test of a subscripted variable h0 in a text block.

[                                              h0                                                   (1)

 

where the two lines started by [ are actually merged with one expanded [ for the Text block with its output. To get rid of the unwanted output, I have to put my curser over the h0 that is in the Text body (not the output h0) and hit "Shift-F5". The output h0 with its equation number disappears.  If there are a number of simple math expressions in a text block, I have to process them one at a time with "Shift-F5". This takes up a lot of time. With earlier Maple versions (~2015 or earlier) I used to fly through Text blocks using the shortcuts "Ctl-R" and "Ctl-T" and these Text blocks produced no output when the worksheet was reexecuted. 

Starting with Maple 2016 I could enter math expressions in Text blocks using the shortcuts, but I could not copy and paste  a Text block with inline math expressions without the expressions becoming "live" in the copied block.  Starting with Maple 2017 all my Text boxes with math expressions began executing the math and producing output.

I gave up on Maple 2017 and 2018.  I have finally made the jump from Maple 2016 to Maple 2019, in part, because I finally discovered the "Shift-F5" trick to make math expressions in a Text block inactive.

Does anyone know how to make the default behaviour of Maple with math expressions in a Text block to be "Don't execute the math and produce output in the Text block"?

I would post an actual example worksheet, except I have never been successful whenever I have tried to upload a worksheet. I hope my description above is adequate.

Any help will be greatly appreciated.  Neill Smith

 

 


 

restart; with(VectorCalculus)

r := `<,>`(sin(t), cos(t), t)

Vector(3, {(1) = 0.2739493386e-115+0.2739493386e-115*I, (2) = 1.0-0.7504824014e-231*I, (3) = t})

(1)

``


what??

Download problem.mw

Earlier smoothly working generation of normal distribution in v. 2019 unexpectedly shows the error:

RandV  := Statistics[RandomVariable](Normal(0, 1));
Statistics[Sample](RandV, 10);

Error, (in p) unable to convert Float(undefined) to an integer

 

1 2 3 4 5 6 Page 1 of 6