nm

11353 Reputation

20 Badges

13 years, 8 days

MaplePrimes Activity


These are replies submitted by nm

Could you explain more what is the problem? do you mean you can not resize Maple window size? That can not be possible. So you must mean something else.

What do you mean by resizing the window size to half the screen? 

I normally just resize the window size using the mouse on the edge and dragging. ie manually.

I never heard of an automatic resizing to half screen size. How does one do this on windows without simply changing the size using the mouse?

@nmacsai 

maybe I was not clear. There is NO need to do export command. The print itself does this. The print will save the plot as an image in the directory you are in. do not do export. You see, I did not use export.

After you do the print as shown, look at the folder you set using the currentdir(...) command and you see the .eps file there.

If you have adobe PDF on your PC, just double click on the .eps and it will automatically convert it for you as PDF. If not, then there are many free tools that convert eps to pdf and do cropping also if needed.

Once you have the pdf image, Now you can export the PDF to PNG directly from PDF itself if you want. I have adobe PDF pro, so I do not know if these options are available in other versions.

But why use png when you have PDF?. PDF is better for graphics than PNG also.

@acer 

The reason  I wanted to see if there is a way to permanently disable remember tables, is that I am now sure Maple does bad things internally with memory or cache or remember tables or something related.

I have in front of me a case where I run 10 problems, from 1 to 10, after restart. They all run fast, taking 1-2 seconds each.  Unfortunately I can't make an example, since it uses SQL database and uses all my code. So not possible to know where and why this happens, other that I can reproduce it now each and everytime. 

Now I re-run problem 3, without doing restart, and Maple either hangs (I see mserver.exe in loop taking large CPU), or takes 10-15 seconds instead of the 1-2 seconds.

Same problem, same code. Nothing changed.  I do not save anything outside. No side effect to explain this other than Maple internally caching something that affects it.

Only when I do restart, it goes back fast. 

That is why I run everything now from command line (DOS). Where I run each problem as separate process using command line Maple. Wait for it to finish, and then run the next, as new process.

Doing it this way, Maple never hangs and is never slow, because each problem is run by separate process.

Maple badly managed its internal memory somewhere. I talked about this for years now. So for now. I do everyhing after restart.

@acer 

Thanks, this does it. But I found I have to do forget(`simplify/do`)  or forget(simplify,subfunctions=true) each time after calling simplify().

Is there a way to make it permenant? I tried forget(`simplify/do`,forgetpermanent = true,reinitialize=true); but this had no effect.

I call simplify from 100's of places in the code, which means I have to now find every place I call simplify and add the call after it.

Like this

simplify(....);
forget(`simplify/do`);
.....
simplify(....);
forget(`simplify/do`);
...
simplify(....);
forget(`simplify/do`);
...

I'd like to tell Maple one time, say at the start of the program to forget(`simplify/do`); and not have to call this 100's of times.

Below is worksheet showing that one has to call forget(`simplify/do`); after each call. (same result if I do forget(simplify,subfunctions=true,forgetpermanent = true,reinitialize=true);

Download how_to_clear_simplify_cache_V2_march_24_2025.mw

@Carl Love 

Thanks for explanation. But lets look at this not from basis of why it happens, but from usability/semantics/design point of view.

There is an experssion which clearly has no X in it.

Asking Maple to select the part of the expression that has X in it, it returns something other than empty. 

Does this make sense? from just usability point of view, not from why it happens.

This is like being given a bag of balls, and asking one to select the red ball. If there is no red ball in the bag, then the select just return nothing. It should not return anything else other than nothing.

But too late to change select now. So I changed my code to do the following. Always use has first to check, and only if x is there, then use select. This way I do not get false positive:

if has(expr,x) then
   select(has,expr,x)
   .....

This way I only use select when I know it has what I want. No surprises now :)

@mmcdara 

there is no notepad++ for macos, but this site gives alternatives, but most likely they will not have Maple syntax highlighting for these.

But VirtualBox works on macos. You could always try to install VBox on macos, install windows there, then install notepad++ on windows, and use notepad++ inside the VBox on the mac.

I use windows myself for desktop, but I actually spend about 70% of my time using Linux running inside VBox on windows. If you have lots of RAM, performance is not an issue. I use notepad++ and Maple on windows.

try maple 2025 when it comes out, I read they improved the user interface there. I myself do not use document mode. I use plain text notepad++ for all my Maple coding and very happy with it. It has Maple mode style also. see  Where-Can-I-Find-A-Maple-Udf-File-For-Notepad-

You can also check emacs, I read it also has Maple style mode. Maple-Mode-For-Emacs

Instead of 

term7 := limit(term6, v = infinity)

you could do

term7 := eval(term6, v = infinity)

Also you can not do evalf(term5) since term5 has symbols in it (k,u,v) so not possible to numerically integrate it.

In all cases, it seems not possible to integrate sin(k*x)*cos(x)^k/x  analytically, definite or indefinite.

@dharr 

It is very strange that Maplesoft main website keep saying

For almost one week now. Something is seriously wrong when an international company can't fix its main web site for this long. And also in the middle of what is supposed to be a new Maple 2025 release. (do not know if Maple 2025 was released or not, as almost eveything I check, gives an error at Maple site).

@Alfred_F 

Does your book contain concrete solution hints for this problem?

The textbook does not include the full solution, only final solution in back of book. I will attached the book PDF below. it is 22 MB. Do not know if mapleprimes allows me to do this or not. It is free on the internet to download also.

Here it is. Problem is 39 on page 58

[Copyrighted material (4th ed) removed by moderator. Publisher link for 6th ed
Introductory Differential Equations]

The book solution is in back of book at page 467, right column.

May be I should email the authors and ask them then how they found this solution. THey have their names and email in front pages of book

 

Martha Abell
(E-mail: martha@georgiasouthern.edu)

James Braselton
(E-mail: jbraselton@
georgiasouthern.edu)

Department of Mathematical Sciences
P.O. Box 8093
Georgia Southern University
Statesboro, Georgia
30460
July, 2014

 

 

 

@Alfred_F 

y^2(t) = C*1/t + 1/t*arctan(t).
How should C be determined from y(0) = 0?

Writing the above as   t*y^2=C+arctan(t) first, and only now let y=0,t=0 which gives  0=C.

Hence solution is

             y^2 =  1/t*arctan(t).

Which is what the book gives. This could be how book solved it.

@Alfred_F 

My impression is that Maple successfully performed the substitution test in your first post without checking the initial condition.

No, that can not be possible. It is verifying the solution satisfies the IC. You can see this by doing this

ode:=(1/(1+t^2)-y(t)^2)-(2*t*y(t))*diff(y(t),t)=0;
sol:=arctan(t)-t*y(t)^2 = 0;
IC:=y(0)=0;
stopat(`odetest/ic`);
odetest(sol,[ode,IC])

It goes many many checks, using `limit/topright` and many other such calls. Hard to see what it is doing since too complicated to follow the full tests it does. But at the end it does say that the IC is valid.

I can not understand anything you said.

Could you write down the ode you want solved?

 

@Alfred_F 

Looking at original ode in the form   y'=f(t,y) shows that at y=0  f(t,y) is not defined at t=0.

Therefore existence and uniqueness theorem do not apply. 

But does not this mean that a solution can still exist? Google AI says

if the Picard–Lindelöf theorem fails to guarantee a unique solution, it doesn't necessarily mean a solution doesn't exist; it simply means that the conditions for a unique solution are not met, and other solutions might exist. 

Anyway, the whole point of this question is that odetest verified that the solution satisfies the ode and also the initial condition. So if this solution is wrong, then there is a bug in odetest (and the book is also wrong).

@Rouben Rostamian  

This is the solution the textbook gives. I just used odetest to verify it and it did. Here it is from back of book:

To answer your question, is it not possible to write the solution like this

                          t*y^2(t) = arctan(t)

And now taking the limit of arctan(t) as t->0 gives 0, and taking limit of t*y^2 as t->0 also gives zero. So we are OK now?

If you think this is still wrong solution, then book is wrong and also odetest has bug since it verifies it OK. 

4 5 6 7 8 9 10 Last Page 6 of 91