nm

11558 Reputation

20 Badges

13 years, 135 days

MaplePrimes Activity


These are replies submitted by nm

@Carl Love 

Thanks. I also do not like aliases at all and never ever use them in Maple or any other language that allows them. They cause more problems than they solve. 

I changed all my code now to go back to old _C1 style. I added this one line at the top my my worksheet

dsolve(diff(y(x),x)=0,arbitraryconstants = traditional);

As the very first thing, and now things are working OK.

If I knew c__1 was an alias, I would have done this long time ago.  I overlooked this in help. I thought these were a brand new symbols that completely replace the old _C1 ones 

My fault for not knowing this difference more clearly. 

To show the kind of problems I was having when using subscripted, here is one example. In this, I have my own solution that I wrote, using subscripted symbols as the constant of integration.

When telling dsolve to use subscripted, odetest hangs. When telling dsolve to use traditional, odetest does not hang.

May you can see why. I can't. I asked Maple support to explain this, but never heard back from them.

If you can see why the second case hangs, it will be useful to know.

But since now I am back to using traditional for everything, this problem is gone. I am posting this example as a reference to kind of problems I started to see when I switched to subscripted.


 

interface(version)

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

``

 

 

 

Example that works when using traditional

 

 

restart;

dsolve(diff(y(x),x)=0,arbitraryconstants=traditional):

sol:=u(x)=(c__1*(1/x)^(2^(1/2)))^(1/2*2^(1/2))+2+(((c__1*(1/x)^(2^(1/2)))^(1/2*2^(1/2)))^2+2*(c__1*(1/x)^(2^(1/2)))^(1/2*2^(1/2))-(c__1*(1/x)^(2^(1/2)))^(2^(1/2))+3)^(1/2):
ode:=2^(1/2)*(u(x)*(u(x)+1)^2)^(1/2)+x*(2*u(x)-1)*diff(u(x),x)+2*u(x)^2-4*u(x) = 0:

st:=time[real]();
try
   timelimit(40,odetest(sol,ode));
catch:
   print("timed out ok");
end try:
print("time used is ",time[real]()-st," seconds ");

414.203

"time used is ", .242, " seconds "

 

Example  using subscripted. this HANGS

 

restart;

dsolve(diff(y(x),x)=0,arbitraryconstants=subscripted):
sol:=u(x)=(c__1*(1/x)^(2^(1/2)))^(1/2*2^(1/2))+2+(((c__1*(1/x)^(2^(1/2)))^(1/2*2^(1/2)))^2+2*(c__1*(1/x)^(2^(1/2)))^(1/2*2^(1/2))-(c__1*(1/x)^(2^(1/2)))^(2^(1/2))+3)^(1/2):
ode:=2^(1/2)*(u(x)*(u(x)+1)^2)^(1/2)+x*(2*u(x)-1)*diff(u(x),x)+2*u(x)^2-4*u(x) = 0:

st:=time[real]();
try
   timelimit(60,odetest(sol,ode));
catch:
   print("timed out ok");
end try:
print("time used is ",time[real]()-st," seconds ");

435.869

Warning,  computation interrupted

"time used is ", 6.561, " seconds "

 

 

 

 


 

Download test_timeout_sheet.mw

 

 

@C_R 

btw, your Maple build is is 1828976  but I am using Maple 2024.1 and it says build id is 1835466 which is different from what you show.

So you are using different Maple?. I thought you are using Maple 2024.1?  So that is why it does not hang for you but it does for me.

If you have Maple 2024.1 build id 1835466 then you can try that and see. 

 

@Axel Vogt 

FYI,

I did the same on Maple 2024.1 as you did. Saved it to MWS. But when I do print(e) Maple still hanged.

windows 10.

 

@C_R 

Which OS are you using, windows or mac or Linux?

For me, print(e) hangs Maple each time. I do not get the [Length of output....] message at all. As you see, it is set in options. I have not changed this.

Maple 2024.1 on windows 10.

I do not know why it hangs for me and not you for print(e). Are you saying it could be graphics card issue/setting?? That is very strange. Why would graphics card setting cause Maple frontend to hang?

As for the timelimit(), yes, this hangs all the time. I have to change my code now to check for length of expressio before calling expand. But timelimit should not hang.

 

 

@C_R 

I got that big expression in separate worksheet now.  But it is huge. I also found it makes Maple hangs in expand() even when using timelimit !

So I will post separate question on that, and you can use that expression there.  But if try to print it, it can hang Maple for you also.

I verified that Maple frontend hang when doing print on it. It should have generated that error message about a large expression over 100000.

Do not know why this does not happen in 2024.1 may be setting has changed. I know I did not change anything myself after the upgrade.

These are the type of problems I deal with all day with Maple. timelimit does not work all the time. Hangs when expressions are large and so on.

Maple has not improved in this area for a decade and more.

 

 

@C_R 

The problem was when I was doing 

  print(expr)

where expr has leaf count of 373134, which is very large.

When I commented this line out, the Maple front end hang is now gone.

THis is strange, becuase Maple should have generated that message that expression will be not display because its length is over 100000 or something like this. It could be that in Maple 2024.1 this limit is not active? I do not know.

NOthing special about my graphics card. I have NVIDIA  GEForce RTX 3060. Direct X 12.0 on windows 10.   128 GB RAM.

1 year old new PC. 

So to reproduce this hang, I just need to activate the print again on this large expression. So it should be possible to duplicate this by making very large random mathematical expression/equation and then try to print it in the worksheet and see what happens? 

 

@Ronan 

 is when quitting Maple it often does not offer the option to save your work. It used too. 

 

Save your worksheet each time before you run anything. That is what I do. Do not do the auto-save option in the options, THis can cause hangs. Believe me. 

Only way is to just get used to hitting the save bottom as many times as you can and before running any code you have. If you make changes, click save always.

I have to terminate Maple may be 2 dozen times each and every day due to hangs and such. 

I write all my code in .mpl files anyway. I just used the worksheet to test the code I have.

 

I see these all the time. Not just in Maple 2024.1 but in all other Maple versions. sometimes the front end freezes and do not refresh. And never ever try to copy large data from output in the worksheet. This will definitely cause hangs. Java does not handle this well.

Actually as we are speaking now, I just got the GUI stop responding. Maple 2024.1 on wndows 10. I am running some of my functions, and now the worksheet froze. I cant even close the worksheet, all of Maple hanged. Here is movie

If this is first time you see such issues in Maple, it means you have not been using Maple for long time :)

Only way, was to kill all of Maple (not just mserver.exe).

I miss the old Maple software, before Java infected it.

Update:

This seems to happen when large expressions is being printed on screen.

I am able now to reproduce this all the time when I turn printing on in my program, which causes print() to become active and large stuff is printed on the screen.

It could be flushing to worksheet issue. I do not know.

Since I am now able to reproduce this all the time, this is from task manager showing Maple while the front end is hanging as we speak.  Notice that the memory is not changing on the front end, but CPU is running high all time. This indicate it went into a LOOP somewhere and can't get out of it.

I had to kill Maple again in order to recover from this as not possible to do anything else when this happens.

 

 

@C_R 

I think these with _G stuff in them are places holder for when Maple is unable to find specific explicit type.odeadvisor basically says it does not know what type/class this ode is, or it has no concrete name.

Here is an example

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

[`y=_G(x,y')`]

And if we try to solve it using dsolve, no solution is returned.

But just because odeadvisor returned type with _G it it, does not always means dsolve can't solve it. It just means there is no other specific type name to give it, so generic one _G is given. Here is another example

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

[`x=_G(y,y')`]

But this one dsolve is able to solve.

dsolve(ode)

So _G is used when there is no designated name for the ode. It is like a place holder. If odeadvisor find specific type name for the ode, it will not also use _G() name for the same ode.

@C_R 

why Maple did not list the type dAlembert. Maybe it is done on purpose to suggest/advise most suitable methods.

My understanding it checks all possible types.  For first order ode, these are given by

[`odeadv/1st_order/class`[0]]

Which gives

[`odeadv/quadrature`, 
`odeadv/separable`, 
`odeadv/linear/A`, 
`odeadv/linear/B`, 
`odeadv/linear/C`, 
`odeadv/linear`, 
`odeadv/homogeneous_A`, 
`odeadv/homogeneous_D`, 
`odeadv/homogeneous_G`, 
`odeadv/homogeneous_C`, 
`odeadv/homogeneous_B`, 
`odeadv/exp_sym`, 
`odeadv/lin_sym`, 
`odeadv/exact`,
 `odeadv/rational`, 
`odeadv/Clairaut`, 
`odeadv/Bernoulli`, 
`odeadv/sym_pat/[F(x),G(y)]`, 
`odeadv/sym_pat/[F(x)*G(y),0]`, 
`odeadv/sym_pat/[F(x),G(x)]`, 
`odeadv/sym_pat/[F(x)+G(y),0]`, 
`odeadv/RiccatiS`, 
`odeadv/Riccati`, 
`odeadv/Abel`, 
`odeadv/Abel2/A`, 
`odeadv/Abel2/B`, 
`odeadv/Abel2/C`, 
`odeadv/dAlembert`, 
`odeadv/Chini`, 
`odeadv/sym_implicit`, 
`odeadv/pot_sym`, 
`odeadv/sym_pat/[F(x),G(x)*y+H(x)]`, 
`odeadv/y=_g(y')`, 
`odeadv/x=_g(y')`, 
`odeadv/0=_G(x,y')`, 
`odeadv/0=_G(y,y')`, 
`odeadv/y=_G(x,y')`, 
`odeadv/x=_G(y,y')`]

The fact that odeadvisor did not say that this ode is dAlembert also means it failed to detect it is? Because it is supposed to check each of the above types one by one and returns the ones that check true.

@C_R 

I cannot match Maples definition

It is dAlembert:

In Maple code

restart;

ode:=diff(y(x), x) = (3*x - y(x) + 1)/(3*y(x) - x + 5);
eval(ode,diff(y(x),x)=_Z);
PDEtools:-Solve(%,y(x));
expand(%);
collect(%,x);
eval(%,_Z=diff(y(x),x))

dAlembert always has singular solutions but the question is, what happens when the singular solution does not satisfy the IC. Should it still be returned? When I go back to school, I have to remeber to ask my ODE teacher on this.  Since singular solution is the envelope of the family of solutions, may be it does not have to. It just needs to satisfy the ode itself only. So Maple could be  correct by returning the singular solution y=x-1 even though it does not satisfy the IC. This is why I asked this question.

If no IC is given, then there is no issue of course.

@Khair Muhammad Saraz 

 i want to edit it is edit able again i  have to restart the file

I assume what you mean by restart the file is that you have to close the worksheet and open it again?

This is strange, Did you by any chance set the editable box off when you run the code? There is a little option at bottom of the worksheet like this:

If you have turned that off somehow, then you can't edit the worksheet any more.

But this is not something that will turn off on its own as far as I know, unless you did that.

Other than this, I do not know why you can't make changes to your worksheet again.

It will help to post version information, OS, and example worksheet. May be someone can figure it out.

 

It happens on second and all next calls. Not on first call. May be it is a bug.

interface(version);

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

restart:

27752

ts_standard:=proc(k::anything)    
     interface(typesetting=standard):
     print(k);
     interface(typesetting=extended):
     NULL;
end proc:
k:=3/8*ln(55/52)+sin(x)+3/4*exp(x):

ts_standard(k);

(3/8)*ln(55/52)+sin(x)+(3/4)*exp(x)

ts_standard(k);

3*ln(55/52)*(1/8)+sin(x)+3*exp(x)*(1/4)

ts_standard(k);

3*ln(55/52)*(1/8)+sin(x)+3*exp(x)*(1/4)

 

 

Download fix_interface.mw

@C_R 

Could you please try with larger timeout to see if it will hang? 30,40,50 seconds? As it depends on the timeout and how fast the PC is. 

@C_R 

Thanks for checking. Does this mean it did hang for you on Maple 2024.0 but not on 2024.1?

I have no access to Maple 2024.1, I thought it was not released yet to try it.  But once it is out officially will upgrade and try for sure.

First 15 16 17 18 19 20 21 Last Page 17 of 90