Maple 2024 Questions and Posts

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

How did Student:-ODEs:-ODESteps([ode,ic]); managed to get this zero solution to this ode? I can't follow the logic it did.

Any ideas what it is doing in the 4th step there?
 

13496

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode := diff(y(x), x) = y(x)*(2*y(x) - x)/(x*(-2*x + 3*y(x)));
ic:=y(1)=-1;
dsolve([ode,ic]);

diff(y(x), x) = y(x)*(2*y(x)-x)/(x*(-2*x+3*y(x)))

y(1) = -1

y(x) = (1/6)*(I*((-27*x^2+x^3+3*3^(1/2)*(-2*x^5+27*x^4)^(1/2))^(2/3)-x^2)*3^(1/2)-((-27*x^2+x^3+3*3^(1/2)*(-2*x^5+27*x^4)^(1/2))^(1/3)-x)^2)/(-27*x^2+x^3+3*3^(1/2)*(-2*x^5+27*x^4)^(1/2))^(1/3)

#now try ODEsteps
Student:-ODEs:-ODESteps([ode,ic]);
 

"[[,,"Let's solve"],[,,[(ⅆ)/(ⅆx) y(x)=(y(x) (2 y(x)-x))/(x (-2 x+3 y(x))),y(1)=-1]],["•",,"Highest derivative means the order of the ODE is" 1],[,,(ⅆ)/(ⅆx) y(x)],["•",,"Solve for the highest derivative"],[,,(ⅆ)/(ⅆx) y(x)=(y(x) (2 y(x)-x))/(x (-2 x+3 y(x)))],["•",,"Use initial condition" y(1)=-1],[,,0],["•",,"Solve for" 0],[,,0=0],["•",,"Substitute" 0=0 "into general solution and simplify"],[,,0],["•",,"Solution to the IVP"],[,,0]]"

odetest(y(x)=0,[ode,ic])

[0, -1]

 


 

Download strange_ode_steps_solution_june_20_2024.mw

Have a list of four projective points. I need to check that they are colinear projectively. If one point is at infinity i.e. 0 in z position I can chech if combination of cross product and dot product is 0.
a)  What is a good way to find if one ot the four has zero in z position?

b) Having found that is there a neat way of piching the next two/three points by making the count wrap automatically. e.g 3  then 4,5,6 i.e. 3,4,1,2

restart

with(LinearAlgebra)

pt := [`<,>`(1, 1, 1), `<,>`(2, 1, 1), `<,>`(3, 1, 0), `<,>`(4, 1, 1)]

pt := [Vector(3, {(1) = 1, (2) = 1, (3) = 1}), Vector(3, {(1) = 2, (2) = 1, (3) = 1}), Vector(3, {(1) = 3, (2) = 1, (3) = 0}), Vector(3, {(1) = 4, (2) = 1, (3) = 1})]

(1)

ListTools(Occurences([anything, anything, 0], pt))

ListTools(Occurences([anything, anything, 0], [Vector(3, {(1) = 1, (2) = 1, (3) = 1}), Vector(3, {(1) = 2, (2) = 1, (3) = 1}), Vector(3, {(1) = 3, (2) = 1, (3) = 0}), Vector(3, {(1) = 4, (2) = 1, (3) = 1})]))

(2)

``

`&x`(pt[1]-pt[3], pt[1]-pt[3]).(pt[4]-pt[3])

0

(3)

NULL

Download 2024-06-18_Q_4_points_projective_colinear.mw

I am getting Maple server crash each time running this solve command.

Could others reproduce it? I am using windows 10. Maple 2024.  Why does it happen?

Will report it to Maplesoft in case it is not known. Worksheet below.

22396

restart;

23484

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762 and is the same as the version installed in this computer, created 2024, June 13, 11:3 hours Pacific Time.`

sol:=(3^(1/2)*u(x)-1/3*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^(1/3*3^(1/2)) = x^(1/3*3^(1/2))*c__1;

(3^(1/2)*u(x)-(1/3)*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

eval(sol,u(x) = u);

(3^(1/2)*u-(1/3)*3^(1/2)+(3*u^2-2*u-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

timelimit(30,[solve(%,u)]);


 

Download maple_crash_calling_solve_june_18_2024.mw

This bug seems to have been introduced in Maple 2023 since it crashes there also.

But not in Maple 2022. No crash there. Same PC.

22396

restart;

interface(version);

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1401 created 2023, March 2, 10:49 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2022\Physics Updates\lib\`

sol:=(3^(1/2)*u(x)-1/3*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^(1/3*3^(1/2)) = x^(1/3*3^(1/2))*c__1;

(3^(1/2)*u(x)-(1/3)*3^(1/2)+(3*u(x)^2-2*u(x)-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

eval(sol,u(x) = u);

(3^(1/2)*u-(1/3)*3^(1/2)+(3*u^2-2*u-1)^(1/2))^((1/3)*3^(1/2)) = x^((1/3)*3^(1/2))*c__1

solve(%,u);

(1/18)*3^(1/2)*(3*(x^((1/3)*3^(1/2))*c__1)^(3^(1/2))+2*3^(1/2)+4*(x^((1/3)*3^(1/2))*c__1)^(-3^(1/2)))

 

 

Download maple_NO_crash_calling_solve_june_18_maple_2022.mw

odeadvisor says that this ode is _homogeneous, `class A`, but I am not able to verify this. Also when asking dsolve to solve it as 'homogeneous' it returns no solution. 

This type is described in https://www.maplesoft.com/support/help/maple/view.aspx?path=odeadvisor%2fhomogeneous

Here is worksheet with my tries.

Would someone be able to confirm if this is really an _homogeneous, `class A` ?

my own code checking says no.  But if it is, then why dsolve do not solve it when asking it to use homogeneous method? Is the method I asked it to use it do not apply to class A?

30348

restart;

30348

ode:=x + diff(y(x), x)*y(x)*(2*diff(y(x), x)^2 + 3) = 0;
DEtools:-odeadvisor(ode);

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

[[_homogeneous, `class A`], _dAlembert]

infolevel[dsolve]:=5;
dsolve(ode,y(x))

 

5

Methods for first order ODEs:

   *** Sublevel 2 ***

   Methods for first order ODEs:

   -> Solving 1st order ODE of high degree, 1st attempt

   trying 1st order WeierstrassP solution for high degree ODE

   trying 1st order WeierstrassPPrime solution for high degree ODE

   trying 1st order JacobiSN solution for high degree ODE

   trying 1st order ODE linearizable_by_differentiation

   trying differential order: 1; missing variables

   trying simple symmetries for implicit equations

   <- symmetries for implicit equations successful

y(x) = -((1/2)*I)*2^(1/2)*x, y(x) = ((1/2)*I)*2^(1/2)*x, y(x) = RootOf(-ln(x)+Intat(-(-2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*_a^2+2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*_a^3-((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)+_a*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)+_a^2)/(((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*(2*_a^4+3*_a^2+1)), _a = _Z)+c__1)*x, y(x) = RootOf(-2*ln(x)+Intat(((2*I)*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)*_a^2+I*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)-2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*_a^2-4*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*_a^3+I*3^(1/2)*_a^2-((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)-2*_a*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)+_a^2)/(((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*(2*_a^4+3*_a^2+1)), _a = _Z)+2*c__1)*x, y(x) = RootOf(-2*ln(x)-Intat(((2*I)*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)*_a^2+I*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*3^(1/2)+I*3^(1/2)*_a^2+2*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)*_a^2+4*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*_a^3+((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(2/3)+2*_a*((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)-_a^2)/(((_a^2-(2*_a^2+1)^(1/2)+1)*_a/(2*_a^2+1)^(3/2))^(1/3)*(2*_a^4+3*_a^2+1)), _a = _Z)+2*c__1)*x

dsolve(ode,y(x),[homogeneous])

Classification methods on request

Methods to be used are: [homogeneous]

Successful isolation of dy/dx: 3 solutions were found. Trying to solve each resulting ODE.

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

sol:=PDEtools:-Solve(ode,diff(y(x),x));

diff(y(x), x) = (1/2)*2^(1/3)*(-y(x)^2*2^(1/3)+((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3))/(y(x)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(1/3)), diff(y(x), x) = -(1/4)*2^(1/3)*(I*3^(1/2)*y(x)^2*2^(1/3)+I*3^(1/2)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3)-y(x)^2*2^(1/3)+((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3))/(y(x)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(1/3)), diff(y(x), x) = (1/4)*2^(1/3)*(I*3^(1/2)*y(x)^2*2^(1/3)+I*3^(1/2)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3)+y(x)^2*2^(1/3)-((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(2/3))/(y(x)*((-x+(2*y(x)^2+x^2)^(1/2))*y(x)^2)^(1/3))

map(X->DEtools:-odeadvisor(X),[sol])

[[[_homogeneous, `class A`], _dAlembert], [[_homogeneous, `class A`]], [[_homogeneous, `class A`]]]

map(X->dsolve(X,y(x),[homogeneous]),[sol])

Classification methods on request

Methods to be used are: [homogeneous]

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

Classification methods on request

Methods to be used are: [homogeneous]

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

Classification methods on request

Methods to be used are: [homogeneous]

----------------------------

* Tackling ODE using method: homogeneous

--- Trying classification methods ---

trying homogeneous types:

[]

 

 

Download checking_homogo_ode_type_june_18_2024.mw

Hello guys, I am doing the numercial error analysis study, but now I meet such problem:
how to change the 2d dot plot to the 3d plot? I mean extending like the generatrix of a cylinder.
It can be understood as the inverse operation of projecting a three-dimensional xyz surface onto the xy plane. the code is attached. Welcome all you discuss.

I use one engine per one worksheet. So one would expect that doing restart; command; to always behave the same way. Right?

Because each time, new or refreshed mserver.exe is used.  But here is a worksheet, where I run it few times (all with restart each time), where sometime the command timelimit hangs, and sometime does not. I do not mean it takes little longer sometime. I mean completely hang.

I've waited 10-20 minutes and nothing happens. And sometime I saw it return back in 2 or 3 minutes. But most of the time it hangs.

I wish someone could explain this to me. If it hangs each time, or not hang each time, I can understand. (ofcourse timelimit should never hang, as it was supposed to have been fixed in 2021, but this is separate issue).

But why it hangs sometimes and not other times? Does Maple use some sort of random number generator inside it to decide on things? For me, software should behave the same each time when run from same initial state.

It also depends on the amount of timeout given if it hangs or not.

What can cause this different behavior and most important, what can one do to make it behave same way each time? I thought that what restart supposed to do.

Any insight what can cause this is welcome.

I also found that closing the worksheet completely and opening it again, results in different behavior in the timing. It looks like restart does not clear everything, as what happens when closing the worksheet and reopeing it again.

i.e. Sometimes when it completes and not hang, then issuing restart again and running the int() command, it will also not hang most likely.

It seems Maple have remembered something. But closing the worksheet and opening it again, it will hang again most of the times.

The point of all this, is that Maple behaves differently each time. But why??

9704

``

restart;

24868

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1757 created 2024, June 6, 14:53 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1)

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

time();
#hangs sometimes and not other times. Most of the time it hangs. increasing time
#will improve the chance it will hang
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
time();

.375

Download hangs_int_june_16_2024.mw

Here is one screen shot of one of those times where it returned back. Took little over one minute. Good.

Here is second screen shot where it took about1,800 real time seconds to return. (30 minutes, even though timelimit was one minute). Same exact code.

update

I tried the suggestion given below to use _EnvProbabilistic:=0 but it had no effect on making Maple behavior consistent each time.

Below worksheet shows this. I tried 6 trials, each with restart. 

First trial it timeout at 74 second. good. Second trial took 1403 seconds !  Third trial went back to 74 seconds again (good).  Trial 4 took also took about 74 seconds (good). trial 5 went back to being slow and took about 1400 seconds again. Trial 6 went back to being fast and took about 74 seconds.

So the pattern seems to be 

                     fast SLOW fast fast SLOW fast.....

But I also tried this whole test again, by closing the worksheet and opening. Now the pattern changed to

                     SLOW fast fast fast SLOW SLOW ....

I also attached the worksheet for the above below.

So Maple still behaves in random fashion in doing the integration above. sometimes it is slow, sometimes fast. All using same exact code and same integral. Extra points to anyone who could find out why and how to fix this.  

This worksheet have pattern    fast SLOW fast fast SLOW fast....

1036

restart;

1036

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1757 created 2024, June 6, 14:53 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

 

Trial #1

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]();
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

4019.660

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 74.618

 

Trial #2

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1403.978

 

Trial #3

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.979

 

Trial #4

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.732

 

 

 

Trial #5

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1396.089

 

Trila #6

 

restart;

1036

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in anonymous procedure called from PDEtools/NumerDenom) time expired

"time taken ", 73.383

 

 

Download hangs_int_V2_june_16_2024.mw

This worksheet below have pattern      SLOW fast fast fast SLOW SLOW ....

 

restart;

21096

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1762. The version installed in this computer is 1757 created 2024, June 6, 14:53 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

 

Trial #1

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]();
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

28.483

Error, (in sdmp:-mul) time expired

"time taken ", 1400.316

 

Trial #2

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 74.404

 

Trial #3

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.993

 

Trial #4

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in PDEtools/NumerDenom) time expired

"time taken ", 73.550

 

 

 

Trial #5

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1373.684

 

Trila #6

 

restart;

21096

_EnvProbabilistic:=0;
expr:=-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp(4*I*(polylog(2,exp(I*x)))-polylog(2,-exp(I*x) ))*csc(x)*x*(tan(x)^2-1);
st:=time[real]():
timelimit(60,int(expr,x,method=_RETURNVERBOSE));
print("time taken ",time[real]()-st);

0

-4*(1-exp(I*x))^(-4*x)*(exp(I*x)+1)^(4*x)*exp((4*I)*polylog(2, exp(I*x))-polylog(2, -exp(I*x)))*csc(x)*x*(tan(x)^2-1)

Error, (in sdmp:-mul) time expired

"time taken ", 1383.174

 

 

Download hangs_int_V3_june_16_2024.mw

Observation: When it finishes fast, timeout is always in  PDEtools/NumerDenom.

When it takes long time, timeout is always in sdmp:-mull

Any other suggestions what to try are welcome.

Is this a valid behvior by int?   

int(A,x,method=_RETURNVERBOSE) hangs.

But  int(simplify(A),x,method=_RETURNVERBOSE) returns in few seconds with "default" result same as int(A,x)

Should this have happen? I try to avoid calling simplify unless neccessary because it can add csgn's and signums and so on to the result. 

But the question is: Should one really need to simplify the integrand to get the result in this example? Does this mean one should call simplify on the integrand to avoid the hang that can show up? 

This only happens when using method=_RETURNVERBOSE 

Just trying to find out if this is normal behavior and can be expected sometimes.

25844

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

restart;

25844

A:=exp(-1/2*cos(2*x))*exp(-sin(x)^2);
int(A,x);

exp(-(1/2)*cos(2*x))*exp(-sin(x)^2)

exp(1/2)*exp(-1)*x

int(A,x,method=_RETURNVERBOSE);  #hangs

int(simplify(A),x,method=_RETURNVERBOSE)

["default" = x*exp(-1/2), "risch" = x*exp(-1/2), "orering" = x*exp(-sin(x)^2-(1/2)*cos(2*x)), FAILS = ("gosper", "lookup", "derivativedivides", "norman", "trager", "meijerg", "elliptic", "pseudoelliptic", "parallelrisch", "parts")]

 

 

Download why_int_hang_unless_simplify_june_15_2024.mw

odetest should be made more robust.

Here is an example where the same exact solution and same exact IC, but when solution is just writtent in a  little different form, odetest no longer verifies it.

Do you consider this a bug? How is the user supposed to know their solution is correct or not now, since it depends on how it is written? What can a user then do to help odetest in this case verify the solution?


 

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode:=diff(y(x), x)*x^2 + cos(2*y(x)) = 1;
ic:=y(infinity)=10/3*Pi;
e1:=2/x+1/3*sqrt(3);
SOL1:=y(x)=arccot(e1) + Pi*3;
odetest(SOL1,[ode,ic]);

(diff(y(x), x))*x^2+cos(2*y(x)) = 1

y(infinity) = (10/3)*Pi

2/x+(1/3)*3^(1/2)

y(x) = arccot(2/x+(1/3)*3^(1/2))+3*Pi

[0, 0]

#now we rewrite the solution a little different. But same solution
e2:=simplify(e1);

(1/3)*(3^(1/2)*x+6)/x

#Now maple no longer verifies the solution

SOL2:=y(x)=arccot(e2) + Pi*3;
odetest(SOL2,[ode,ic])

y(x) = arccot((1/3)*(3^(1/2)*x+6)/x)+3*Pi

[0, -(1/6)*Pi]

 


 

Download same_solution_not_verified_june_13_2024.mw

Maple gives same solution for two different equations.

eq1 := 1/5*sqrt(-20*y + 1) - 1/5*ln(1 + sqrt(-20*y + 1)) = x + 2;
eq2 := -1/5*sqrt(-20*y + 1) - 1/5*ln(1 - sqrt(-20*y + 1)) = x + 2;

Solving these for y, gives same exact solution. But this is not correct. As this worksheet shows.

Is this a bug? How could two different equations give same solution?
 

15172

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Case 1. Solve first then plugin x value in solution

 

eq1:=(sqrt(a^2 - 4*b*y) - a*ln(a + sqrt(a^2 - 4*b*y)))/b=x+c__1;
eq2:=(-sqrt(a^2 - 4*b*y) - a*ln(a - sqrt(a^2 - 4*b*y)))/b=x+c__1;

eq1:=eval(eq1,[a=1,b=5,c__1=2]);
eq2:=eval(eq2,[a=1,b=5,c__1=2]);

((a^2-4*b*y)^(1/2)-a*ln(a+(a^2-4*b*y)^(1/2)))/b = x+c__1

(-(a^2-4*b*y)^(1/2)-a*ln(a-(a^2-4*b*y)^(1/2)))/b = x+c__1

(1/5)*(-20*y+1)^(1/2)-(1/5)*ln(1+(-20*y+1)^(1/2)) = x+2

-(1/5)*(-20*y+1)^(1/2)-(1/5)*ln(1-(-20*y+1)^(1/2)) = x+2

sol1:=simplify(solve(eq1,y));

-(1/20)*LambertW(-exp(-11-5*x))*(LambertW(-exp(-11-5*x))+2)

sol2:=simplify(solve(eq2,y));

-(1/20)*LambertW(-exp(-11-5*x))*(LambertW(-exp(-11-5*x))+2)

eval(sol1,x=10.);

0.3221340286e-27

eval(sol2,x=10.);

0.3221340286e-27

Case 2. Plugin in same x value in equation and then solve, we get different answers

 

eq1:=(sqrt(a^2 - 4*b*y) - a*ln(a + sqrt(a^2 - 4*b*y)))/b=x+c__1;
eq2:=(-sqrt(a^2 - 4*b*y) - a*ln(a - sqrt(a^2 - 4*b*y)))/b=x+c__1;

eq1:=eval(eq1,[a=1,b=5,c__1=2,x=10]);
eq2:=eval(eq2,[a=1,b=5,c__1=2,x=10]);

((a^2-4*b*y)^(1/2)-a*ln(a+(a^2-4*b*y)^(1/2)))/b = x+c__1

(-(a^2-4*b*y)^(1/2)-a*ln(a-(a^2-4*b*y)^(1/2)))/b = x+c__1

(1/5)*(-20*y+1)^(1/2)-(1/5)*ln(1+(-20*y+1)^(1/2)) = 12

-(1/5)*(-20*y+1)^(1/2)-(1/5)*ln(1-(-20*y+1)^(1/2)) = 12

sol1:=evalf(solve(eq1,y));

-205.8850616

sol2:=evalf(solve(eq2,y));

0.3221340286e-27


 

Download different_equations_give_same_solution_june_12_2024.mw

 

I am using intersectplot  to make projective coordinate plots. Everything intersects the plane z=1. I find the plot quality poor, i.e. dotty dashy lines and circle. This seem to be the best linestyle=solid can do here. gridrefine can't be applied here. 
Any suggestions to improve quality here?
Maybe intersectplot is not the best aprroach here but so far it is all if have figured out.


restart

 

 

with(plottools)

[annulus, arc, arrow, circle, colorbar, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, polygonbyname, prism, project, pyramid, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate, triangulate]

(1)

with(plots)

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(2)

 

 

DistCircle:=x^2+y^2=1

x^2+y^2 = 1

(3)

pt1:=[1/4,3/4]

[1/4, 3/4]

(4)

pt2:=[7/8,-1/3]

[7/8, -1/3]

(5)

pt3:=[-3/2,3/7]

[-3/2, 3/7]

(6)

pt4:=[3/5,-4/5]

[3/5, -4/5]

(7)

pt5:=[-1/10,-3/2]

[-1/10, -3/2]

(8)

 

L12:=-(13*x)/12 - (5*y)/8 + 71/96; #LnPeqns(pt1,pt2);

-(13/12)*x-(5/8)*y+71/96

(9)

L13:=-(9*x)/28 + (7*y)/4 - 69/56; #LnPeqns(pt1,pt3);

-(9/28)*x+(7/4)*y-69/56

(10)

L23:=(16*x)/21 + (19*y)/8 + 1/8; #LnPeqns(pt2,pt3);

(16/21)*x+(19/8)*y+1/8

(11)

L35:=(27*x)/14 + (7*y)/5 + 321/140; #LnPeqns(pt5,pt3)

(27/14)*x+(7/5)*y+321/140

(12)

nullline:=3/5*x-4/5*y-1

(3/5)*x-(4/5)*y-1

(13)

ptplt:=point([pt1,pt2,pt3,pt4,pt5],color="Green",symbol=solidcircle,symbolsize=10):
txtplt:=textplot([pt4[],typeset("pt4")],align={below,right}):

plt1:=display(txtplt,implicitplot([DistCircle,L12,L13,L23,L35,nullline],x=-2..2,y=-1.5...1.5,color=[red,blue,blue,blue,blue,cyan]),ptplt,scaling=constrained)

 

 

# Projective Geometry Version

DistCirclez:=x^2+y^2-z^2;  #a Cone

 

x^2+y^2-z^2

(14)

pt1p:=[pt1[],1];
pt2p:=[pt2[],1];
pt3p:=[pt3[],1];
pt4p:=[pt4[],1];
pt5p:=[pt5[],1];

[1/4, 3/4, 1]

 

[7/8, -1/3, 1]

 

[-3/2, 3/7, 1]

 

[3/5, -4/5, 1]

 

[-1/10, -3/2, 1]

(15)

 

 

 

L12p:=(13*x)/12 + (5*y)/8 - (71*z)/96;#LnPeqns([pt1p,pt2p,[0,0,0]]);

(13/12)*x+(5/8)*y-(71/96)*z

(16)

L13p:=(13*x)/12 + (5*y)/8 - (71*z)/96;#LnPeqns([pt1p,pt3p,[0,0,0]]);

(13/12)*x+(5/8)*y-(71/96)*z

(17)

L23p:=(9*x)/28 - (7*y)/4 + (69*z)/56;#LnPeqns([pt2p,pt3p,[0,0,0]]);

(9/28)*x-(7/4)*y+(69/56)*z

(18)

L35p:=(27*x)/14 + (7*y)/5 + (321*z)/140;#LnPeqns([pt3p,pt5p,[0,0,0]]);

(27/14)*x+(7/5)*y+(321/140)*z

(19)

L04p:=3/5*x-4/5*y-1*z;

(3/5)*x-(4/5)*y-z

(20)

ptpltp:=point([pt1p,pt2p,pt3p,pt4p,pt5p],symbol=solidsphere, symbolsize=8,color="green"):
intp1:=intersectplot(DistCirclez,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,linestyle=solid):#unit circle at z=1
intp12p:=intersectplot(L12p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue):
intp13p:=intersectplot(L13p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue):
intp23p:=intersectplot(L23p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue):
intp35p:=intersectplot(L35p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue):
intp04p:=intersectplot(L04p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=cyan):

 

display(ptpltp,intp1,intp12p,intp13p,intp23p,intp35p,intp04p,scaling=constrained,caption="Projective Co-ords on plane z=1",axes=normal,axis[3]=[tickmarks=[1]])

 

 


Download 2024-06-10_Q_Intersectplot_quality.mw

These are two examples of challenging ode solutions to show they satisfy the ode.

I tried many things myself but can't do it. Feel free to use any method or trick you want. The goal is simply to show that the solution is correct. The solutions are correct as far as I know, but hard to show by back substitution since the solutions are given in form of integrals and RootOf in them.

Extra credit points will be awarded for those who manage to do both.

28148

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Example 1

 

_EnvTry:='hard';
ode:=y(x) = arcsin(diff(y(x), x)) + ln(1 + diff(y(x), x)^2);
sol:=dsolve(ode);
r:=odetest(sol,ode);
coulditbe(r=0);

hard

y(x) = arcsin(diff(y(x), x))+ln(1+(diff(y(x), x))^2)

x-Intat(1/sin(RootOf(-_a+_Z+ln(sin(_Z)^2+1))), _a = y(x))-c__1 = 0

-arcsin(sin(RootOf(-y(x)+_Z+ln(3/2-(1/2)*cos(2*_Z)))))+RootOf(-y(x)+_Z+ln(3/2-(1/2)*cos(2*_Z)))

FAIL

Example 2

 

ode:=(1 + diff(y(x), x)^2)*(arctan(diff(y(x), x)) + a*x) + diff(y(x), x) = 0;
sol:=dsolve(ode);
r:=odetest(sol,ode);
coulditbe(r=0)

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

y(x) = Int(tan(RootOf(a*x*tan(_Z)^2+tan(_Z)^2*_Z+a*x+tan(_Z)+_Z)), x)+c__1

(-arctan(tan(RootOf(2*a*x+sin(2*_Z)+2*_Z)))+RootOf(2*a*x+sin(2*_Z)+2*_Z))*tan(RootOf(2*a*x+sin(2*_Z)+2*_Z))/(a*x+RootOf(2*a*x+sin(2*_Z)+2*_Z))

FAIL

 

 

Download showing_solution_satisfies_ode.mw

Hi,

I am exploring the boxplot, and I see that I do not have the option to integrate 2 lists: One for observations and one for frequencies. The BoxPlot command only accepts one list (List A in my example). Is there a way to create the BoxPlot using the 'Obs' and 'Eff' lists? Thank you for your insight

QBoxPlot.mw

How to make Maple simplify a/sqrt(tan(x+c__1)^2+1); to a/sqrt(sec(x+c__1)^2);  ?

Below is worksheet. since the second one is smaller in leaf size, expected simplify(...,size) to do it, But it did not. Any suggestions?

24832

LC:=MmaTranslator:-Mma:-LeafCount;
e1:=a/sqrt(tan(x+c__1)^2+1);
e2:=a/sqrt(sec(x+c__1)^2);

MmaTranslator:-Mma:-LeafCount

a/(tan(x+c__1)^2+1)^(1/2)

a/(sec(x+c__1)^2)^(1/2)

LC(e1);

12

LC(e2);

10

#we see they are same
simplify(e1-e2);

0

#both nothing below make e1 to e2
simplify(e1); #not good simplification at all. Adds csgn.
LC(%);

a*csgn(sec(x+c__1))*cos(x+c__1)

11

#expected this to do it but no
simplify(e1,size);
LC(%);

a/(tan(x+c__1)^2+1)^(1/2)

12

simplify(e1,trig);

a/(tan(x+c__1)^2+1)^(1/2)

combine(e1,trig);

a/(tan(x+c__1)^2+1)^(1/2)

 


Using some other software:

 

 

 

Download tan_sec_simplification_june_9_2024.mw

Can't figure out what code makes this simplification.
If this simplification works, it will be a part of a larger simplication procedure ( if it not conflicts hopefully) 
vereenvouding_hoe_-vraag_MPF.mw

I was trying to find out why my solution was not validating for this ode. It turned out because I was using solve instead of PDEtools:-Solve. It took me sometime to find this.

This made huge difference on odetest to verify the solution.

This is very simple ode. We just need to integrate once. But first we have to solve for y'(x). 

And here comes the difference. When I used solve to solve for y'(x), odetest did not verify the solution.

When using PDEtools:-Solve, it did.

The difference is how each returned the solution for y'(x). Both have RootOf but written differently and this made the difference.

1) Why solutions are written differently? 

2) Is this to be expected? I have thought Solve uses same engine as solve below the cover.

3) is it possible to make solve give the same form as Solve or change to that form?

I am now changing more of my code to use PDEtools:-Solve because of this.

27860

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1757. The version installed in this computer is 1756 created 2024, June 5, 19:39 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

Using solve

 

restart;

27860

ode:=x-ln(diff(y(x),x))-sin(diff(y(x),x))=0;
RHS:=solve(ode,diff(y(x),x));

x-ln(diff(y(x), x))-sin(diff(y(x), x)) = 0

RootOf(_Z-exp(-sin(_Z)+x))

mysol:= y(x) = Int(RHS,x)+c__1;

y(x) = Int(RootOf(_Z-exp(-sin(_Z)+x)), x)+c__1

odetest(mysol,ode);

-ln(RootOf(_Z-exp(-sin(_Z)+x)))+x-sin(RootOf(_Z-exp(-sin(_Z)+x)))

using PDEtools:-Solve (now it verifies) with no extra effort

 

restart;

27860

ode:=x-ln(diff(y(x),x))-sin(diff(y(x),x))=0;
RHS:=PDEtools:-Solve(ode,diff(y(x),x)):
RHS:=rhs(%);

x-ln(diff(y(x), x))-sin(diff(y(x), x)) = 0

RootOf(-x+ln(_Z)+sin(_Z))

mysol:= y(x) = Int(RHS,x)+c__1;

y(x) = Int(RootOf(-x+ln(_Z)+sin(_Z)), x)+c__1

odetest(mysol,ode);

0

 

 

Download PDEtools_Solve_vs_solve_june_8_2024.mw

 

Update

Here is a counter example. Where now it is the other way around.

Using solve makes odetest happy, but when using PDEtools:-Solve odetest does not verify the solution.  Same exact ODE.   


 

28652

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1757 and is the same as the version installed in this computer, created 2024, June 6, 14:53 hours Pacific Time.`

Example, using solve works

 

ode:=exp(diff(y(x), x) - y(x)) - diff(y(x), x)^2 + 1 = 0;
RHS:=solve(ode,diff(y(x),x));
RHS:=eval(RHS,y(x)=y);
mysol:=Intat(eval(1/RHS,y=_a),_a=y(x))=x+c__1;
odetest(mysol,ode);

exp(diff(y(x), x)-y(x))-(diff(y(x), x))^2+1 = 0

Warning, solutions may have been lost

RootOf(-exp(_Z-y(x))+_Z^2-1)

RootOf(-exp(_Z-y)+_Z^2-1)

Intat(1/RootOf(-exp(_Z-_a)+_Z^2-1), _a = y(x)) = x+c__1

0

Example, using PDEtools:-Solve fails

 

ode:=exp(diff(y(x), x) - y(x)) - diff(y(x), x)^2 + 1 = 0;
RHS:=rhs(PDEtools:-Solve(ode,diff(y(x),x)));
RHS:=eval(RHS,y(x)=y);
mysol:=Intat(eval(1/RHS,y=_a),_a=y(x))=x+c__1;
odetest(mysol,ode);

exp(diff(y(x), x)-y(x))-(diff(y(x), x))^2+1 = 0

RootOf(_Z^2*exp(y(x))-exp(_Z)-exp(y(x)))

RootOf(_Z^2*exp(y)-exp(_Z)-exp(y))

Intat(1/RootOf(_Z^2*exp(_a)-exp(_Z)-exp(_a)), _a = y(x)) = x+c__1

exp(RootOf(_Z^2*exp(y(x))-exp(_Z)-exp(y(x)))-y(x))-RootOf(_Z^2*exp(y(x))-exp(_Z)-exp(y(x)))^2+1

 


 

Download PDEtools_Solve_vs_solve_june_9_2024.mw

So now I have no idea which to use. Sometimes solve works and sometimes Solve works. I  guess I have to now solve the ode both ways each time and see which works.

 

First 32 33 34 35 36 37 38 Last Page 34 of 43