nm

8552 Reputation

19 Badges

12 years, 353 days

MaplePrimes Activity


These are questions asked by nm

To Maple support,

Why when removing symbol a from these equations makes Maple warning go away? This is from a textbook. Attached worksheet. 

 

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

worksheet attached also

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*a*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

Warning, it is required that the numerator of the given ODE depends on the highest derivative. Returning NULL.

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

 

Download warning_may_10_2022.mw

To Maple support:

I was investigating this pde from a different forum.

I noticed that when using an expanded version of the pde, Maple hangs. Without expanding the PDE, Maple gives an answer in 2 seconds. 

Why does expanding the PDE makes a difference? I do not have an earlier version of Maple on my new PC to check if this is a new issue or not.
 

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

restart;
pde1:=VectorCalculus:-Laplacian(u(r,theta),'polar'[r,theta]);
pde1_expanded:=expand(pde1);
bc  := u(1,theta)=sin(theta)^4,u(3,theta)=1;
pdsolve([pde1=0,bc],u(r,theta))
 

(diff(u(r, theta), r)+r*(diff(diff(u(r, theta), r), r))+(diff(diff(u(r, theta), theta), theta))/r)/r

(diff(u(r, theta), r))/r+diff(diff(u(r, theta), r), r)+(diff(diff(u(r, theta), theta), theta))/r^2

u(1, theta) = sin(theta)^4, u(3, theta) = 1

u(r, theta) = (1/52480)*((328*r^6-26568*r^2)*ln(3)*cos(2*theta)+(-r^8+6561)*ln(3)*cos(4*theta)+19680*(ln(3)+(5/3)*ln(r))*r^4)/(ln(3)*r^4)

pdsolve([pde1_expanded=0,bc],u(r,theta)); #HANGS, Waited more than 40 minutes.

 


 

Download hangs_pde.mw

To Maple support:

I see 2 problems here. Maple solves the ode using series method.

First problem: Using odetest shows the syntax according to help does not work. Which is

           odetest(sol, ODE, series, point = 0);

The above gives internal error.

When changing to the following syntax

         odetest(sol,ODE,type='series',point=0); 

No internal error.

So help page should be corrected.

The second problem is that Maple odetest does not return 0 on its own solution. I verified manually that the solution is correct actually. So I do not know why maple does not return zero here. Simplfication does not help. 
 

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

restart;

Order:=6;
ode:=x^2*diff(diff(y(x),x),x)+x^2*diff(y(x),x)+y(x) = 0;
maple_sol:=dsolve(ode,y(x),type='series',x=0):
odetest(maple_sol,ode,series,point=0);
odetest(maple_sol,ode,'series',point=0);

6

x^2*(diff(diff(y(x), x), x))+x^2*(diff(y(x), x))+y(x) = 0

Error, (in odetest/series) complex argument to max/min: 13/2-1/2*I*3^(1/2)

Error, (in odetest/series) complex argument to max/min: 13/2-1/2*I*3^(1/2)

odetest(maple_sol,ode,type='series',point=0); #This should return zero, but it does not.

-I*3^(1/2)*x^(3/2-((1/2)*I)*3^(1/2))*(series(-1/2-(I*3^(1/2)/((I*3^(1/2)-1)*(I*3^(1/2)-2)))*x-((1/4)*((5*I)*3^(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2))*(I*3^(1/2)+2)))*x-((1/4)*((5*I)*3^(1/2)-3)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)))*x^2+((1/6)*(-9+(8*I)*3^(1/2))/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)))*x^3-((7/16)*((3*I)*3^(1/2)-5)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)*(I*3^(1/2)+5)))*x^4+O(x^5),x,5))*_C2+(1/2)*x^(3/2-((1/2)*I)*3^(1/2))*(series(1-(1/2)*x-(((1/2)*I)*3^(1/2)/((I*3^(1/2)-1)*(I*3^(1/2)-2)))*x^2-((1/12)*((5*I)*3^(1/2)+3)/((I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^3-((1/24)*((8*I)*3^(1/2)+9)/((I*3^(1/2)-4)*(I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^4-((7/80)*((3*I)*3^(1/2)+5)/((I*3^(1/2)-5)*(I*3^(1/2)-4)*(I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^5+O(x^6),x,6))*_C1+(1/2)*x^(3/2+((1/2)*I)*3^(1/2))*(series(1-(1/2)*x+(((1/2)*I)*3^(1/2)/((1+I*3^(1/2))*(I*3^(1/2)+2)))*x^2-((1/12)*((5*I)*3^(1/2)-3)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)))*x^3+((1/24)*(-9+(8*I)*3^(1/2))/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)))*x^4-((7/80)*((3*I)*3^(1/2)-5)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)*(I*3^(1/2)+5)))*x^5+O(x^6),x,6))*_C2

 


 

Download problems_with_series_solution.mw

 

I am using the method of alias(seq(c[k] = _C||k, k = 1..10)); for better latex of constants generated from solving an ode as recommended. See this for example. 

This works well 99.99% of the time. But now I noticed this in Maple 2022. Is this a display issue? When the constant is inside an inert Int it does not display the same as the other constant outside. Also the Latex is not the same. Even though lprint shows they are both correct.

This is the worksheet itself


 

restart;

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

alias(seq(c[k] = _C||k, k = 1..10));
ode:=x*diff(y(x),x$2)-cos(x)*diff(y(x),x)+sin(x)*y(x)=2;
sol:=dsolve(ode);
lprint(sol)

c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8], c[9], c[10]

x*(diff(diff(y(x), x), x))-cos(x)*(diff(y(x), x))+sin(x)*y(x) = 2

y(x) = (c[2]+Int((c[1]+2*x)/(exp(Ci(x))*x^2), x))*exp(Ci(x))*x

y(x) = (c[2]+Int((c[1]+2*x)/exp(Ci(x))/x^2,x))*exp(Ci(x))*x

latex(sol)

y \! \left(x \right) =
\left(c_{2}+\textcolor{gray}{\int}\frac{\mathit{c[1]} +2 x}{{\mathrm e}^{\mathrm{Ci}\left(x \right)} x^{2}}\textcolor{gray}{d}x \right) {\mathrm e}^{\mathrm{Ci}\left(x \right)} x

restart;

ode:=x*diff(y(x),x$2)-cos(x)*diff(y(x),x)+sin(x)*y(x)=2;
sol:=dsolve(ode);
lprint(sol)

x*(diff(diff(y(x), x), x))-cos(x)*(diff(y(x), x))+sin(x)*y(x) = 2

y(x) = (_C2+Int((_C1+2*x)/(exp(Ci(x))*x^2), x))*exp(Ci(x))*x

y(x) = (_C2+Int((_C1+2*x)/exp(Ci(x))/x^2,x))*exp(Ci(x))*x

 


 

Download april_25_2022.mw

 

 

I knew it can't be true that timelimit in Maple 2022 no longer hangs and it is only a matter of time before I find a case where it still hangs.

Here are examples. timelimit hangs. No error or anything, it just hangs. timelimit is just ignored. set the limit to 60 seconds  (CPU time), and waited for 20 minutes (real time) and nothing happend.

I hope in Maple 2023 this will be fixed. Could others confirm this? it only hangs when adding the method=_RETURNVERBOSE otherwise it does not hang.

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Examples of timelimit hangs in Maple 2022

 

Example 1

restart;

integrand:=(B*x+A)/(c*x^2+b*x+a)^2/(f*x^2+e*x+d)

try
  timelimit(60,int(integrand,x,method=_RETURNVERBOSE));
catch:
  print("Timed out");
end try;

 

Example 2

restart

integrand:=(5*x^4-x^3+3*x^2+x+2)*(2*x^2-x+3)^(1/2)/(5+2*x)^3

try
    timelimit(60,int(integrand,x,method = _RETURNVERBOSE));
catch:
  print("Timed out");
end try;

 

 

Download int_hangs.mw

First 35 36 37 38 39 40 41 Last Page 37 of 164