nm

10416 Reputation

19 Badges

12 years, 189 days

MaplePrimes Activity


These are replies submitted by nm

@dharr 

Thanks, I was using link that google search gave and I did not know I landed on a "review" page of the application and that there was a "main" page also with more download links. 

if you have access to google AI, you can type this. It even gives code

 

ps. I assume code works. I did not try it.

@C_R 

fyi, I found another example of this random behaviour. I also tried your forget(all) before each call to odetest, but it had no effect.

Also this time the error is not related to sincos, but new one related to  too many levels of recursion.  But the common thing, is that it is also random.

In Maple 2024.2 on windows, it returns unevaluated. So there is no bug. Returning unevaluated is not a bug.

May be you are using older version of Maple and this was fixed?

interface(version)

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

int(cos(cos(x)),x=0..2*Pi)

int(cos(cos(x)), x = 0 .. 2*Pi)

evalf(int(cos(cos(x)),x=0..2*Pi))

4.807878861

evalf(2*Pi*BesselJ(0, 1))

4.807878862

int(cos(cos(x)),x=0..Pi)

Pi*BesselJ(0, 1)

int(cos(cos(x)),x=Pi..2*Pi)

int(cos(cos(x)), x = Pi .. 2*Pi)

 

 

Download no_bug_jan_14_2025.mw

@dharr 

thanks for confirming. I am sorry you had to reboot your pc. hope you did not lose any work. For me, CTRL-ALT-DEL then using task manager I was able to kill the whole Maple program. But I am using windows 10 pro. Not windows 11, may be this makes difference.

@Christian Wolinski 

The output solution was generated by a program.

But I am confused by your answer. You have given a workaround. Sure. A nice workaround also. But it is a workaround and does not explain what is going on.

Or are you saying or implying that because the user did not simplify the input as well as they could have, then Maple now is allowed to give different responses for same input or behave differently for same input?

How could this be possible?

@C_R 

Needs to be reported, IMO

The problem is that it is random. sometimes it happens and sometimes not. I've send bug reports before where I get reply they can't reproduce it, because tech support tries once and if they can't reproduce it, they will not enter it.

Here is worksheet, where I started Maple fresh, and had to do many trials to get this internal error to come up.

It seems Maple uses some random number generator to do something internally.  I can't explain this. Maple is the only CAS software I know where I can get different results running the same exact code.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1841 and is the same as the version installed in this computer, created 2025, January 3, 8:59 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

sol:=y(x) = 1/2*x*(-1-(1+I*3^(1/2))*((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(2/3)-2*((I*
2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)-I*((I*2^(1/2)+I)^2-1)*3^(1/2)+(I*2^(1/2)+
I)^2)/((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)/(I*2^(1/2)+I);
ode:=x^3+3*x*y(x)^2+(y(x)^3+3*x^2*y(x))*diff(y(x),x) = 0;

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

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

odetest(sol,ode,y(x));

0

odetest(sol,ode);

0

odetest(sol,ode);

0

odetest(sol,ode);

0

odetest(sol,ode,y(x));

0

odetest(sol,ode);

0

sol:=y(x) = 1/2*x*(-1-(1+I*3^(1/2))*((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(2/3)-2*((I*
2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)-I*((I*2^(1/2)+I)^2-1)*3^(1/2)+(I*2^(1/2)+
I)^2)/((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)/(I*2^(1/2)+I);
ode:=x^3+3*x*y(x)^2+(y(x)^3+3*x^2*y(x))*diff(y(x),x) = 0;

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

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

odetest(sol,ode,y(x));

0

restart;

sol:=y(x) = 1/2*x*(-1-(1+I*3^(1/2))*((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(2/3)-2*((I*
2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)-I*((I*2^(1/2)+I)^2-1)*3^(1/2)+(I*2^(1/2)+
I)^2)/((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)/(I*2^(1/2)+I);
ode:=x^3+3*x*y(x)^2+(y(x)^3+3*x^2*y(x))*diff(y(x),x) = 0;

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

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

odetest(sol,ode,y(x));

Error, (in trig/normal/sincosargs) too many levels of recursion

odetest(sol,ode,y(x));

Error, (in trig/normal/sincosargs) too many levels of recursion

restart;

sol:=y(x) = 1/2*x*(-1-(1+I*3^(1/2))*((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(2/3)-2*((I*
2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)-I*((I*2^(1/2)+I)^2-1)*3^(1/2)+(I*2^(1/2)+
I)^2)/((I*2^(1/2)-1+I)*(I*2^(1/2)+1+I)^2)^(1/3)/(I*2^(1/2)+I);
ode:=x^3+3*x*y(x)^2+(y(x)^3+3*x^2*y(x))*diff(y(x),x) = 0;

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

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

odetest(sol,ode,y(x));

0

 

 

Download why_odetest_sometimes_fail_internal_V2.mw

But I will send this report now to Maple tech support. Even though I am sure I will get reply that they can't reproduce it.

@acer 

Yes, this works! when I did convert(ode,D) I saw the output has (y)(x) and my eyes saw it as y(x) so I did not bother using has(..,y(x)) on it as I thought it will also return true. I should have tried it.    

Now I can get rid of the loop as not needed.

Thanks

@gkokovidis 

Thanks. I tried it, but it does not do what I want. Examples below. It seems dirfield=n means n arrows, and not n lines.

I want to change the number of field lines as in examples I showed using the other system. Not number or arrows.

So I am not able to get same effect as the other systems. Below are examples changing dirfield.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

the_sys:=[diff(x(t),t) = -3*x(t)-4*y(t), diff(y(t),t) = 2*x(t)+y(t)]:
DEtools:-DEplot(the_sys,[x(t), y(t)],t =0 .. 10,x = -4 .. 4,y = -4 .. 4,'labels' = [x(t),y(t)],'axes' = 'boxed', 'arrows'='medium','dirfield'=5)

DEtools:-DEplot(the_sys,[x(t), y(t)],t =0 .. 10,x = -4 .. 4,y = -4 .. 4,'labels' = [x(t),y(t)],'axes' = 'boxed', 'arrows'='medium','dirfield'=50)

DEtools:-DEplot(the_sys,[x(t), y(t)],t =0 .. 10,x = -4 .. 4,y = -4 .. 4,'labels' = [x(t),y(t)],'axes' = 'boxed', 'arrows'='medium','dirfield'=300)

 

 

Download change_number_of_arrows_dirfield_jan_4_2025.mw

I've seen this error before myself few times. Not many, may be dozen times over the years.

I could never figure where it comes from. 

If I am reading this right, your ode (which you called pde2), which is equation (7) is second order non-linear ode, right? 

But the solution you are trying to verify (eq (8)) has only one constant of integration c__1, right?

But there should be two constants of integrations, since second order.

@Christian Wolinski 

without the wait, it seems to hang. Did it work for you? Here is a work sheet. Nothing happens, and I when hit restart, nothing happens. It seems to be stuck inside thread. Added print after calling dsolve and nothing is printed.

I think Wait is needed to wait for threads, otherwise how does one know they are finished?

I have to close the whole worksheet to run it again. You can try this and see if you get better result. I am on windows 10.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

restart;

g_list:=[sin(t)*diff(x(t),t$2)+cos(t)*diff(x(t),t)+2*x(t)=0,
         diff(y(x),x)=lambda*sin(lambda*x)*y(x)^2+a*cos(lambda*x)^n*y(x)-a*cos(lambda*x)^(n-1)]:

work_func:=proc(i::posint)  
  local sol;
  print("i=",i);
  sol:=dsolve(g_list[i]);
  print("sol is ",sol);
end proc:

Threads:-Seq( Threads:-Create( work_func(i)), i=1..2) ;

"i=", 2

"i=", 1

24, 25

1+1; #no answer

 

 

Download thread_seq.mw

@salim-barzani 

Yes, that is correct. So solution in (17) is not general solution, since epsilon is constant of integration.

This means only for specific initial conditions solution (17) verifies.

Your paper should really have said so.

@salim-barzani 

The solution you are trying to verify against the ode has term epsilon.

This term does not exist in the ode itself.  Where did this epsilon come from? Is this meant to be the constant of integration?  If so, then Maple says the solution given does not verify the ode since odetest does not give zero. worksheet below.

May be you can ask the author how they obtained this solution they show, may be they made some other assumptions to obtain this solution as Maple can't verify it.

restart;

ode:=diff(Z(x),x)^2=a*Z(x)^2+b*Z(x)^3+c*Z(x)^4;

(diff(Z(x), x))^2 = a*Z(x)^2+b*Z(x)^3+c*Z(x)^4

bookSol := Z(x)= (-a*b*sech(sqrt(a)/2*x)^2/(b^2 - a*c*(1 + _C1 *tanh(sqrt(a)/2*x))^2))

Z(x) = -a*b*sech((1/2)*a^(1/2)*x)^2/(b^2-a*c*(1+_C1*tanh((1/2)*a^(1/2)*x))^2)

the_residue:=odetest(bookSol,ode) assuming a>0;

8*a^4*b^2*c*(c__1^4*a*c*cosh(a^(1/2)*x)+2*c__1^3*a*c*sinh(a^(1/2)*x)-c__1^4*a*c-c__1^2*b^2*cosh(a^(1/2)*x)-2*c__1*a*c*sinh(a^(1/2)*x)+2*c__1^2*a*c+c__1^2*b^2-a*c*cosh(a^(1/2)*x)+b^2*cosh(a^(1/2)*x)-a*c-b^2)/(c__1^2*a*c*cosh(a^(1/2)*x)+2*c__1*a*c*sinh(a^(1/2)*x)-c__1^2*a*c+a*c*cosh(a^(1/2)*x)-b^2*cosh(a^(1/2)*x)+a*c-b^2)^4

#we see the above residue is not zero using some random values

plot(eval(the_residue,[a=1,b=2,c=3,_C1=4]),x=-4..4)

 


But trying few values, it seems the residuce is zero for x>1. 

So it is possible this solution is valid only for x>1 but can not be sure about this as I only tried few random values.

Download dec_24_2024.mw

First of all, you do not have equation. An equation must have = in it. 

To solve your quadratic equation do

solve(x^2-4=0,x)

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