nm

11353 Reputation

20 Badges

13 years, 8 days

MaplePrimes Activity


These are replies submitted by nm

@ecterrab 

someone deleted my question. I find this very rude. 

What if I no longer have record of my question? How could someone just delete someone question like this. If they have comment, they can add comment suggesting to move the question here. This what normal civilized people do.

This is my last post in this forum. I am done and will not post any bugs I find in Maple or ask any questions or answer anything. 

@aroche 

Fyi, I've been testing V 27, but found case where this problem still shows up and not fully fixed. (may be this is not related to same issue that causes the problem in this post?)

I've posted separate question on this so not to clutter this.
[moderator: It's been deleted, as a duplicate. Put it here, in this same Question, in a new Reply]

@aroche 

Thanks for the quick fix.

But I  was wondering why not have `assuming/restore_previous_state`; be done automatically by Maple internally at the end of timelimit expiration, since this call is now there?

If someone have 100's of calls to timelimit in code in different modules, it means they need to insure and remember to add this call now in the catch clause each time in order to make sure Maple cleans any assumptions still attached to variables.

This is good fix for now, but I think for long term, it will be better if such clean up work is done internally and automatically by Maple. No?

Also, many users will not know about this new call and that they have to do it ( unless they read this post in Mapleprimes)

Will run tests now on V 26. 

Thanks again for the update. very useful. I think this was causing many problems before for me, since I use different assuming all over the place to try to find one which will make odetest verify solutions.

ps. I just found Error, (in type/complex) too many levels of recursion. still shows in V 26 and only when adding Physics:-Setup('assumingusesAssume'=true): but do not know if this is new or not. No time to check older versions.  new quesiton posted on this fyi.

@ecterrab 

Until then, you will be able to just add "`assuming/restore_previous_state`" to the catch branch, as in "try timelimit(...) catch: `assuming/restore_previous_state` end try". 

I wanted to try the above while waiting for official fix in next SupportTools.

So I tried what you suggested, but I see assumptions still stuck to variables after the timelimit(). I expected no assumption to be on these variables.

I must be not typing something right. I made sure to copy exactly what you had.

Can you please provide actual worksheet with this working? Here is my worksheet. I use worksheet mode, not document mde.

interface(version);

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

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

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

restart

 

#this shows no assumptions on y(x);
ode:=y(x)*sqrt(1 + diff(y(x), x)^2) - a*y(x)*diff(y(x), x) - a*x = 0:
sol:=-_C4^2 + (-y(x)*sqrt(_C4^2/y(x)^2) + a*x)^2/a^2 + y(x)^2 = 0;
hasassumptions(y(x));
getassumptions(y(x));

-_C4^2+(-y(x)*(_C4^2/y(x)^2)^(1/2)+a*x)^2/a^2+y(x)^2 = 0

false

{}

#now use a command that uses assuming
Physics:-Setup('assumingusesAssume'=true):
try
    timelimit(10,(odetest(sol,ode,y(x)) assuming integer)):
catch:
   print("cought exception, will now call restore state...");
  `assuming/restore_previous_state`;  #is this correct syntax?
end try;

"cought exception, will now call restore state..."

`assuming/restore_previous_state`

hasassumptions(y(x));
getassumptions(y(x));

true

{a::integer, x::integer, (-(-csgn(1/y(x))*a*x+(csgn(1/y(x))^2*a^2*x^2+y(x)^2*a^4+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)+x)::0, ((csgn(1/y(x))*a*x-(csgn(1/y(x))^2*a^2*x^2+y(x)^2*a^4+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)-x)::0, ((csgn(1/y(x))*a*x+(csgn(1/y(x))^2*a^2*x^2+y(x)^2*a^4+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)-x)::0, ((csgn(1/y(x))*a*x+(csgn(1/y(x))^2*a^2*x^2+y(x)^2*a^4+a^4*x^2-y(x)^2*a^2-a^2*x^2)^(1/2))/(a^2-1)+x)::0}

 

 

Download how_to_use_restore_june_3_2025.mw

@aroche 

Thanks for the quick fix. I am running more tests now using V 25...

should not the 6 generalized coordinates (3 for spatial and 3 for rotation) become 4 generalized coordinates in quaternion ?

Why Maple says 8? (ps. at school we did not cover quaternion coordinates).

@aroche 

Thanks for V 23. I did more tests, but I am afraid the bug is still here. Please see worksheet below 

interface(version);

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

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 23 and is the same as the version installed in this computer, created June 2, 2025, 12:08 hours Eastern Time.`

restart;

sol:=y(x) = -(LambertW(-exp(-1/2*x))+1)^2+x;
ode:=diff(y(x),x) = (x-y(x))^(1/2);
IC:=y(2) = 2;

y(x) = -(LambertW(-exp(-(1/2)*x))+1)^2+x

diff(y(x), x) = (x-y(x))^(1/2)

y(2) = 2

odetest(sol,[ode, IC]) assuming x < 1;

Error, (in AndProp:-UseCache) too many levels of recursion

odetest(sol,[ode, IC]);

[-csgn(LambertW(-exp(-(1/2)*x))+1)*LambertW(-exp(-(1/2)*x))-csgn(LambertW(-exp(-(1/2)*x))+1)+LambertW(-exp(-(1/2)*x))+1, 0]

 

 

Download AndProb_still_problem_june_3_2025.mw

When going back to V 21, the problem goes away:

interface(version);

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

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 23. The version installed in this computer is 21 created May 28, 2025, 23:36 hours Eastern Time, found in the directory /home/me/maple/toolbox/2025/Maple Customer Support Updates/lib/Maple`

restart;

sol:=y(x) = -(LambertW(-exp(-1/2*x))+1)^2+x;
ode:=diff(y(x),x) = (x-y(x))^(1/2);
IC:=y(2) = 2;

y(x) = -(LambertW(-exp(-(1/2)*x))+1)^2+x

diff(y(x), x) = (x-y(x))^(1/2)

y(2) = 2

odetest(sol,[ode, IC]) assuming x < 1;

[-csgn(LambertW(-exp(-(1/2)*x))+1)*LambertW(-exp(-(1/2)*x))-csgn(LambertW(-exp(-(1/2)*x))+1)+LambertW(-exp(-(1/2)*x))+1, 0]

odetest(sol,[ode, IC]);

[-csgn(LambertW(-exp(-(1/2)*x))+1)*LambertW(-exp(-(1/2)*x))-csgn(LambertW(-exp(-(1/2)*x))+1)+LambertW(-exp(-(1/2)*x))+1, 0]

 

 

Download AndProb_no_problem_june_3_2025_V21.mw

@MichalKvasnicka 

I understand I can remove the tag. But someone always seems to enjoy adding "duplicate question" tag to many of my questions. I have no idea why.

If question is duplicate, then say where is the duplicate and why it is . This is what happens at stackexchange. 

But doing it like this, while hiding away, I find is very rude and very childish behavior. No explanation and no word given. 

I found a new bug in V 22 which was just released 2-3 hrs ago. And someone already said this is duplicate.

who tagged this as duplicate question? Duplicate of what? THis is new bug in V 22 just found now. How could this be duplicate?

It is very rude to tag question as duplicate like this with no explanation.

@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. 

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