nm

11353 Reputation

20 Badges

13 years, 13 days

MaplePrimes Activity


These are questions asked by nm

in V 2023 on windows, I can get server.exe to crash each time on this call. Do others see the same problem? I have not tried this on V 2022 to see if this new bug or not.

make sure to save ALL your work before trying this. I found Maple itself hangs also after the server.exe crash, so might not be able to save any work you have in your worksheets that are open at the time. 

I do not know if there is a workaround this. Does the program need to check for something to make sure it will not crash Maple before using this function? try/catch does not help with this. So now my program simply crash each time when it reads this problem.

restart;


expr:=1/(3*2^(2/3)*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)+3*(1/(1+(256*u^3+1)^(1/2))^(1/3)*((8*2^(1/6)*u-2^(1/2)*(1+(256*u^3+1)^(1/2))^(2/3))*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)-4*2^(1/6)*(1+(256*u^3+1)^(1/2))^(1/3))/((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2))^(1/2)*2^(7/12)-16*u);


rationalize(expr);

Attached worksheet.
 

433648

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

433648

expr:=1/(3*2^(2/3)*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)+3*(1/(1+(256*u^3+1)^(1/2))^(1/3)*((8*2^(1/6)*u-2^(1/2)*(1+(256*u^3+1)^(1/2))^(2/3))*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)-4*2^(1/6)*(1+(256*u^3+1)^(1/2))^(1/3))/((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2))^(1/2)*2^(7/12)-16*u);

1/(3*2^(2/3)*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)+3*(((8*2^(1/6)*u-2^(1/2)*(1+(256*u^3+1)^(1/2))^(2/3))*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)-4*2^(1/6)*(1+(256*u^3+1)^(1/2))^(1/3))/((1+(256*u^3+1)^(1/2))^(1/3)*((2^(1/3)*(1+(256*u^3+1)^(1/2))^(2/3)-8*u)/(1+(256*u^3+1)^(1/2))^(1/3))^(1/2)))^(1/2)*2^(7/12)-16*u)

rationalize(expr);

Download crash_may_28_2023.mw

My program simply keeps hanging.

It takes me 5 days to complete something which should take 2-3 hrs, since Maple keeps hanging, and I have to keep terminating server.exe and start again. Sometimes when I start again it does not hang where it was. I do this dozens of time per day.

even though I use timelimit on every possible Maple call. The problem also is that when timelimit works, it takes 10-20 times more time than asked. I ask for 10 second timeout, sometimes it timesout after 3-10 minutes if I am lucky.

So I keep trying to make workarounds and I am tired of all of this. Just waste of time. This is getting worst with each new Maple release not better.

Here is an example

restart;
expr:=-1/3*2^(2/3)/((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)*((-1/2*a^2*p-1/2*p^2*a+1/2*p*((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)*a-3)*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(2/3)+2^(2/3)*(-(a+3/2*p)*p*((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a^2*p+5/2*p^2*a+3/2*p^3+3)*p)/(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p)/(-1/2*2^(2/3)*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(2/3)+p*(p*(-p^2*(-((a^2*p+2*a*p^2+p^3+4)/p)^(1/2)+a+p))^(1/3)+2^(1/3)))/p^2;

try 
    t0:=time[real]();
    timelimit(20,int(expr,p));
catch:
    print("time used ",time[real]()-t0,"seconds");
    print("timed out");
end try;

in Maple 2023, with 128 GB RAM and very fast PC and nothing else is running, it hangs. I could leave it for hrs, the server.exe  is running at full CPU and timelimit is ignored. Timelimit in Maple is useless.

I do not know what else to do. if someone can suggest something, I am willing to try anything before I finally give up.

 

For the function coulditbe it says

The environment variable _EnvTry can be used to specify the intensity of the testing by the is and coulditbe routines. Currently _EnvTry can be set to normal (the default) or hard. If _EnvTry is set to hard, is and coulditbe calls can take exponential time.

But how does one know the current value of _EnvTry which is supposed to be set to normal.? If I do   _EnvTry it does not show any value.  And when I do 

anames('environment');
anames('environment','active');

I do not see _EnvTry even listed.  I wanted to make sure I am setting it correctly.

Is it enough to do this?

 

foo:=proc()
 _EnvTry:='hard';
  #now use coulditbe, it should use hard value?
  #coulditbe(....)
end proc;

foo();

Would the above actually tell coulditbe to try hard? I wanted to use this inside a proc without affecting any global setting it might have. It is not possible to tell by just calling it if it actually using the hard option or not.

I do not think I am setting this right, I just tried

foo:=proc()
 _EnvTry:='hard';
 _EnvTry:='XXXX';
  #now use coulditbe, it should use hard value?
  coulditbe(1=2)
end proc;

And it did not complain or anything. Any value I put seems to work. I must be not setting this correctly as coulditbe does not complain.

I wish help would give example usages. But Maple help is not good at all as it has no usage examples to help users.

btw, I think the use of environment variables is bad in programming.

Each function should instead accept options as argument and one should set an option explictly.  So coulditbe should have an explicit optional argument to pass it. This makes the code more clear when looking at the call also.

Programming environment variables are just like global variables.

Bad way to program as in large program one can lose track of these settings.

I am not able to make a MWE for this error, as it only shows in the debugger. So it seems Maple internal memory changes or some other library is loaded to cause this. Inside the debugger, I get to a function which does this

DBG> simplify(JacobiDN(x,k)^2*n)

Error, invalid input: simplify/Jacobi/JacobiDN expects its 1st argument, k, to be of type posint, but received 0

Version 2023 on windows 10

In a worksheet, the above works just fine

restart;
simplify(JacobiDN(x,k)^2*n)

Back to the debugger, if I write (2*n) instead of 2*n, then the error goes away

DBG> simplify(JacobiDN(x,k)^(2*n))
JacobiDN(x,k)^(2*n)

The values of x,k,n are all symbols and have no values in the code running:

I have no idea why this happend when I run the code only. It think x is zero in the above for some reason.

Sorry can't make MWE, I wish I can. Something strange happens when I run the code that does not show otherwise. 

Any suggestions how to invetigate this more? Stepping into the simplify code it fails in

DBG> next
`simplify/check_constant`:
   3   return type(r,'And(constant,Or(Not(function),satisfies(f -> evalb(op(f)
         <> NULL))))')

DBG> r
JacobiDN(x,k)^2*n^2

DBG> type(r,'And(constant,Or(Not(function),satisfies(f -> evalb(op(f)          <> NULL))))')
false

DBG> step
`simplify/Jacobi`
`simplify/do`:
  84               userinfo(1,simplify,'applying',new_simp,
                     `function to expression`);

 85               new_r := new_simp(r,symb_mode);  

Here it generate the error.


It has nothing to do with simplify. Here is a call to integrate which gives same error

DBG> lhs(ode)
diff(diff(xi(x),x),x)-k^2*JacobiSN(x,k)*JacobiCN(x,k)/JacobiDN(x,k)*diff(xi(x),x)+(-k^2*JacobiCN(x,k)^2+k^2*JacobiSN(x,k)^2-k^4*JacobiSN(x,k)^2*JacobiCN(x,k)^2/JacobiDN(x,k)^2-JacobiSN(x,k)^2*k^2*n^2+n^2)*xi(x)

DBG> int(lhs(ode),x)
Error, invalid input: simplify/Jacobi/JacobiDN expects its 1st argument, k, to be of type posint, but received 0

DBG> x
x

DBG> k
k

DBG> xi(x)
xi(x)

 

Maple 2023 still can't verify its own series solution. This happens with Frobenius method when the indicial root are repated. I think I mentioned or reported this long time ago but unable to find a link now.

My question is: Since this looks like it will not be fixed by Maplesoft anytime soon, any one could suggest an alternative method to verify this solution?

restart;

ode:=2*x^2*diff(y(x), x, x) + 2*x*diff(y(x), x) - x*y(x) =0;
sol:=dsolve(ode,y(x),'series');
odetest(sol,ode,'series')

Maple's solution is correct, I solved it by hand and get same solution.

Maple 2023 on windows 10.

First 49 50 51 52 53 54 55 Last Page 51 of 199