nm

11538 Reputation

20 Badges

13 years, 115 days

MaplePrimes Activity


These are replies submitted by nm

@aroche 

Thanks. But it seems this fix introduced a new bug? 

Please see my new question.  This happens only after I updated to V 22.

@ecterrab 

Thanks for giving another way to reproduce the problem.  It took me 20 hrs just to  be able to figure the cause and reproduce this as an example and so that is what I gave.

I do not know all the internals of Maple and how all its parts interact with each others to simplify the example myself or give other variations.

All what I know, from user level, is that solve started to hang after using odetest and using Physics:-Setup('assumingusesAssume' . 

Hopefully your other way to reproduce this problems will make it easier to find the cause/fix. Meanwhile, I removed  my use of Physics:-Setup('assumingusesAssume' for now and the hangs now are gone.

there is no easy solution for this. Maple does not have "full_simplify()" command. You could try to make your own custom command, which tries different combinations of commands and sorts the result and returns the "smallest" one.

If you type this in google you might get some posts related to this.

                      full_simplify() site:mapleprimes.com

 

 

 

 

 

@WD0HHU 

V2 is supposed to work. i.e. does not hang. I said

This worksheet below shows that by removing Physics:-Setup('assumingusesAssume' = false): now solve works OK

It is the first worksheet which shows the hang.

in maple 2025, do FILE->OPTIONS and click on the interface tab and select "open worksheet in NEW TAB"

@Rouben Rostamian  

fyi, I think the assumption should be assuming x >= 0 etc.. and not assuming x > 0 etc.. because the IC is at 0 so domain should include zero.

Same answer will result.

Another observation: This is not easy to do. How is Maple dsolve (or any other program) supposed to know to use assuming x >= 0, x <= 2*Pi to simplify the solution? (or any other range).

Without using this assumption, it does not work (i.e. hard to resolve C1).

So may be this is why dsolve left the constant there. Even though I still think the final solution should not have constant of integration in it. 

@Carl Love 

It is not Riccati.  Riccati has this short form  y'=q(x)+y^2, where q here must be function of x and not just a constant or parameter.

Wikipedia writes q0(x)  to indicate this but may be it should also made it clear that q0 must depend on x.  Not all the q's have to be function of x, but at least one of them must.

The ode  y'=3+y^2 is quadrature (because it solved by just integration), but y'=x+y^2 is riccati.

Another example

And another

your ode is not Riccati. This is basic quadrature.

restart;

gamma0 := -a^2;
de := diff(chi(x), x) = chi(x)^2 + gamma0;
DEtools:-odeadvisor(de);

-a^2

diff(chi(x), x) = chi(x)^2-a^2

[_quadrature]

sol := dsolve(de, chi(x));

chi(x) = -a*(1+exp(2*c__1*a+2*x*a))/(exp(2*c__1*a+2*x*a)-1)

 

 

Download dsolve_may_19_2025.mw

@delvin 

I want to define the expression diff(H(xi), xi, xi)/H(xi)^2 as a new variable

Then why you said in your question you wanted the coefficient of the above to be zero?

Ok,, try this. if you want to eliminate H(xi), then try solving the ode  H'/H^2=Z for H and then use dchange to chnage the dependent variable H to Z.

The new ode will be in term of Z(xi) only and no H(xi) in it. 

Again, do not know if this is what you meant. If not, then may be someone else can better guess than I am able to.

restart;

df := diff(H(xi), xi, xi)= 2*diff(H(xi), xi)^2/H(xi) + A *H(xi)^2 + B*(diff(H(xi), xi)/H(xi))^2 + C*diff(H(xi), xi):
eq1:= -216*a1*(2*diff(H(xi), xi)^2/H(xi))+2*a3*(2*diff(H(xi), xi)^2/H(xi) + A + B*diff(H(xi), xi)^2/H(xi)^2 + C*diff(H(xi), xi))*c^2/H(xi)^2+4*diff(H(xi), xi)^3/H(xi)^2+5*diff(H(xi), xi)^2/H(xi)^3+7*diff(H(xi), xi)^3/H(xi)^5:         
eq2 := expand(subs(df, eq1));
 

-432*a1*(diff(H(xi), xi))^2/H(xi)+4*a3*c^2*(diff(H(xi), xi))^2/H(xi)^3+2*a3*c^2*A/H(xi)^2+2*a3*c^2*B*(diff(H(xi), xi))^2/H(xi)^4+2*a3*c^2*C*(diff(H(xi), xi))/H(xi)^2+4*(diff(H(xi), xi))^3/H(xi)^2+5*(diff(H(xi), xi))^2/H(xi)^3+7*(diff(H(xi), xi))^3/H(xi)^5

ode:=diff(H(xi), xi)/H(xi)^2=Z(xi);

(diff(H(xi), xi))/H(xi)^2 = Z(xi)

sol:=dsolve(ode);

H(xi) = 1/(Int(-Z(xi), xi)+c__1)

PDEtools:-dchange({sol},eq2,[Z(xi)])

-432*a1*Z(xi)^2/(Int(-Z(xi), xi)+c__1)^3+4*a3*c^2*Z(xi)^2/(Int(-Z(xi), xi)+c__1)+2*a3*c^2*(Int(-Z(xi), xi)+c__1)^2*A+2*a3*c^2*B*Z(xi)^2+2*a3*c^2*C*Z(xi)+4*Z(xi)^3/(Int(-Z(xi), xi)+c__1)^4+5*Z(xi)^2/(Int(-Z(xi), xi)+c__1)+7*Z(xi)^3/(Int(-Z(xi), xi)+c__1)

 

 

Download repl_may_19_2025_V2.mw

@delvin 

 I want to remove the derivatives in eq 2 and the new function will not have any derivative terms at all.

If this is what you want, then why not just set diff(H(xi), xi) to zero in each term that has it? Looking at your eq2, this will leave only 2*a3*c^2*A/H(xi)^2 term.

No problem for me on Linux, Maple 2025 with ST 17.

I also was able to stop the kernel by clicking on lower left red botton. Timelimit also works on this.

worksheet below

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 17 and is the same as the version installed in this computer, created May 5, 2025, 12:37 hours Eastern Time.`

restart;

try
   timelimit(30,simplify(tan(Pi/5) + sin(Pi/15) - sqrt(15)));
catch:
   print(lastexception);
end try;

proc (x) local x1; option `Copyright (c) 1999 Waterloo Maple Inc. All rights reserved.`; `...` end proc, "time expired"

Download simplify_may_17_2025.mw

Always export to vector based format and not raster based format. So try to export to postscript or pdf and not to png or jpeg. 

this looks like a bug as help clearly says

"The convert(A, Vector) function converts the parameter A into a Vector.
"The orientation of the result can be specified via the parameter o. The default orientation is column."

Also below it says

"If A is a 1-dimensional array or Array, a list, a vector or a Vector, it is simply passed directly to the Vector constructor"

but Vector([1, 2, 3]) gives column vector.

@C_R 

I see. But if the reason it timedout for you when you run in B.M. (battery mode) is because Maple was slower and the 30 seconds was reached before entering the DLL, then this will not help me. It is then just by chance. It is like me setting timelimit of 2 seconds instead of 30 second. If you change your timelimit from 30 seconds to say 2 minutes, does it still not hang for you in B.M. mode?

What I do not understand is why timelimit does not work when code is inside DLL. Assuming for now that the hang happens inside this GMP DLL. does timelimit have no effect in this case because the code is inside dynamic linked library?

I can'f find definite answer or information on this now using google.

But there has to be a way to terminate a call, even if it is inside DLL which is faulty and hangs.

I am sure someone inside Maplesoft knows the answer for this and could comment and explain what is going on?

Also, I still go not understand why GMP was even used here for this simplify call, since everything is exact and symbolic.

@C_R 

         This time the system ran in optimized battery mode

Could you give instructions how to make Maple run in this mode? Never heard of this and googling does not show how to do it. Is this some option somewhere? I'd like to try it.

I run Maple now 2025 inside Linux which is installed inside virtual box.  

Or is this setting something done in the PC itself and not in Maple?  

I still do not understand what is going on. Why would running in "optimized battery" mode not make Maple hang on this call. Why would this make any difference in how Maple itself work?

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