MaplePrimes Questions

Search Questions:

Are there commands in Maple to find the order and degree of an ODE?  Searching help I could not find anything so far.

For an example, given 

restart;
ode:=(1+diff(y(x),x)^2)^(3/2)=diff(y(x),x$2)

I want the command to return 2 for the order of the ODE and degree is also 2 in this case.

I looked at DEtools package and googled. I am sure Maple have build in commands to do this without me having to parse the ODE myself to find out.

Folks,

I am new to maple and looking to solve for all value of a list and return alist as the result 

fI := [12.5, 16, 20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000];

x:= 23

y:= 36

Lp:= 8-10*log[10]((1+(f1/(2*x))^2.5)*(1+(y/(2.*f1))^1.7))

I am looking to solve Lp to give a result in the form: [a,b,c,d....] i.e solve for  all values of f1 and return a list.

Many Thanks

Last month I still can read file

by 

read “c://Users//hello//Documents//h.m”

but

now it return error

no read access c://Users//hello//Documents/

and 

in security I add the m file into readable 

I saw open file at c drive has many shell folders 

i just add m file

but still the same error

i unencrypted m file by window properties

still the same error

i save file into maple roaming directory under 12 folder , still the same error

i save into maple installation directory maple 12 , still the same error

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

I have a system of ODEs with parameters, p[i], and variables, x[i].

f := [
-p[1]*x[1]^2+x[2],
-2*p[1]^2*x[1]^3+2*p[1]*x[1]*x[2]+x[1]+1
];

associated with the innitial conditions:
[x[1](0) = p[2], x[2](0) = p[3]].

I am interested in sets of parameters where the solution x[1](t) is the same; if [p[1],p[2],p[3]] is associated with a solution x(p,t), and [ph[1],ph[2],ph[3]] is asociated with the solution x(ph,t); then x[1](p,t)=x[1](ph,t) for all t if and only if


[ph[1] = ph[1],
ph[2] = p[2],
ph[3] = -p[1]*p[2]^2+p[2]^2*ph[1]+p[3]]

i.e. ph[1] takes any real value, ph[2] takes the same values as p[2] and ph[3] takes a value determined by the original parameter vector and ph[1].


In a previous question it was demonstrated that x[2](ph,t)/x[2](p,t) rapidly converge on p[1] as t increases for a specific parameter vector that was given in the question (see graph below)

 

This raises the question does this limit generally hold?

I have struggled to do this in maple and I am suspicious of the answer i have got
i.e.
limit (x[2](ph,t)/x[2](p,t),t=infinity)=+/- infinity

My question is
+ when does a finite limit exist?
+ what is the finite limit?

 

Hello,

I would like to see if MAPLE fits our needs. In order to see that I would like to consider the example which is posted in H. Iwaniec :"Introduction to the spectral theory (...)" p. 36, that is as follows:

 

Suppose that you have a PDE as follows:

 

 

This PDE has the following point symmetries:

 

These differential operators are the representations of the following matrix algebra:

 

1. I would like to see the MAPLE commands, which give the algebra $v_1, v_2, v_3$ 

2. I would like to see those commands, which give you the algebra $v_1, v_2, v_3$ as a representation of $X_1, X_2, X_3$.

3. Given the algebra $v$ I would like to see the commands which give you the Laplace-Beltrami operator $\Delta_{LB}=y\partial_{xx} + y\partial_{yy}$

 

( P.s. sorry for the intransparent form, I do not know how to insert formulae in the comment.)

 

Thanks in advance.

G45073

 

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

 

possible to solve following equation with unknown parameter omega.

parameter constant.

I see before for one dimension ode this type equation was solved.

Now for 2d equation is possible?

can consider or I can send again.

Best

2d-2

 

Dear Maple users

I have a question about performing operations on a matrix and another one about retrieving information from a matrix. I am looking for the easiest (hopefully also the shortest) way to do it:

1. Given a matrix with several rows and columns. I want to permute the rows in such a way that the entries in a specific column are ordered (either ascending or decending as wished).

2. Given a matrix with several rows and columns. I want to count how many entries in a specific column are above a certain given fixed value.   

I am pretty sure some of you guys out there can do it in an elegant way. Examples will be appreciated.  

Regards,

Erik


 

pde1 := k*(diff(u(x, t), x, x)) = diff(u(x, t), t)

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

(1)

iv1 := u(0, t) = 0, u(L, t) = 0, u(x, 0) = 2;

u(0, t) = 0, u(L, t) = 0, u(x, 0) = 2

(2)

pdsolve([pde1, iv1], u(x, t))

u(x, t) = Sum(-4*(-1+(-1)^(_Z4*csgn(1/L)))*sin(Pi*_Z4*x/L)*exp(-Pi^2*_Z4^2*k*t/L^2)/(Pi*_Z4), _Z4 = 1 .. infinity)

(3)

subs(`~`[_Z4] = n, %)

u(x, t) = Sum(-4*(-1+(-1)^(_Z4*csgn(1/L)))*sin(Pi*_Z4*x/L)*exp(-Pi^2*_Z4^2*k*t/L^2)/(Pi*_Z4), _Z4 = 1 .. infinity)

(4)

``

 
"I would like to replace the symbol _Z4~ with the letter n. I tried with the subs command, but I could not. Can anyone help"?"" ""


 

Download evaluate_a_sum.mw

Why am I not able to use my MaplePrimes login credentials to login into MapleCloud?

Hello,

I am facing a problem to calculate the variable "al" in a equation like shown below.

fe := int(sqrt(1+(-5.557990765*sin(5.557990765*x)-7.3*cos(5.557990765*x)-5.6*sinh(5.557990765*x)+7.3*cosh(5.557990765*x))^2), x = 0 .. al) = .5

Is there any method in maple to solve it even through using numeric methods.

I'm forward to your response.

Thank you very much!

so i just went from a really old version of maple to a the newest one maple 2019 and at first glance it doesn't seem to work correctly please take a look at the picture maybe there is a toggle i missed or something of the sorts thanks you for your time 

Dear Users!

Hoped everything going fine with you. I constrcut the following code to construct the polynomials for any M1 and M2

printlevel := 2; M1 := 3; M2 := 3; nu := 1;
for k1 from 0 while k1 <= M1-1 do
for k2 from 0 while k2 <= M2-1 do
GP[k1+1, k2+1] := simplify(sum((-1)^(k1-i1)*GAMMA(k1+i1+2*nu)*GAMMA(nu+1/2)*x^i1*(sum((-1)^(k2-i2)*GAMMA(k2+i2+2*nu)*GAMMA(nu+1/2)*y^i2/(GAMMA(i2+nu+1/2)*factorial(k2-i2)*factorial(i2)*GAMMA(2*nu)), i2 = 0 .. k2))/(GAMMA(i1+nu+1/2)*factorial(k1-i1)*factorial(i1)*GAMMA(2*nu)), i1 = 0 .. k1))
end do end do;
I want to put this polynomials in a vector like
[GP[1,1]   GP[1,2]   GP[1,3]   GP[2,1]   GP[2,2]   GP[2,3]   GP[3,1]   GP[3,2]   GP[3,3]]
Similarlty I want to construct a vector having constants for any values of M1 and M2 like this
[a[1,1]   a[1,2]   a[1,3]   a[2,1]   a[2,2]   a[2,3]   a[3,1]   a[3,2]   a[3,3]]

In worksheet mode when me is writing my code, running code, evaluating is and can not work well with maple?

How can inactive  action? Because have to wait many times and is very boring for me.

 

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