awass

271 Reputation

10 Badges

17 years, 181 days

MaplePrimes Activity


These are replies submitted by awass

Thank you. I found the example quite helpful. In particular, I see that when an event occurs and dsolve stops, it returns the values of all the variables at the stopping time. (The messages about stopping are not part of the return.)Secondly, one can use eventstop as you indicate to see which event occurred. That is all I need to do what I wanted.

The folks who answer questions on Mapleprimes do a great service to the community and I am very grateful to all of you. However, I have a couple of questions for the Maple people.

1) To find out about using "events" one must look up dsolve.numeric.Events; in particular, dsolve.numeric.events does not fetch anything. Why?

2) Eventstop, eventdisable, etc. do not turn up anything in the documentation for Maple 16; one must search the examples carefully to find an explanation of them. Why?

3) What would be wrong about changing the example given by Preben Alsholm to
restart;
P:=proc(p) local res,q,eq,sol;
eq:=diff(f(t),t,t)+f(t)=t/(t+p);
sol:=dsolve({eq,f(0)=1,D(f)(0)=0},numeric,events=[[f(t)-1.2,halt],[f(t)+0.2,halt]]):
    res:=op(subs(sol(15),[t,f(t),diff(f(t),t)]));
    q:=sol(eventstop);
    [p,res,q];
end proc:

P(1.4);
Warning, cannot evaluate the solution further right of 4.8443260, event #1 triggered a halt
[1.4, 4.84432605406979, 1.20000000000000, 0.695372548793804, 1]
Why is this approach deprecated?

Thanks for any answers.

I see. I must put the single quote around te f, not the f(j). Makes perfect sense.

 

Thank you!

I see. I must put the single quote around te f, not the f(j). Makes perfect sense.

 

Thank you!

Hi,

 

Thank you for your answer. I now know one more way-using :- instead of brackets.
I gleen from your comments that the differences are meaningful when doing much more complicated things than the things I do.  I am pretty ignorant about CS lingo but I can and do use maple constantly. It sounds like I can remaon ignorant and just use the long form of the command and be safe so that is what I will do.

You mention your peference for packagename:-packageexport. How does one know if a package is a module? Trial and error?

Hi,

 

Thank you for your answer. I now know one more way-using :- instead of brackets.
I gleen from your comments that the differences are meaningful when doing much more complicated things than the things I do.  I am pretty ignorant about CS lingo but I can and do use maple constantly. It sounds like I can remaon ignorant and just use the long form of the command and be safe so that is what I will do.

You mention your peference for packagename:-packageexport. How does one know if a package is a module? Trial and error?

Thank you, I can do that. I lose that elegant italic font that math mode uses but I no longer have bold for, or , and next, etc words. Most important, Maple does not try to execute when I hit return.

Good suggestion. Thank you.

 

Thank you, I can do that. I lose that elegant italic font that math mode uses but I no longer have bold for, or , and next, etc words. Most important, Maple does not try to execute when I hit return.

Good suggestion. Thank you.

 

But the command

solve({eq3,eq5},{d,s})
as per PatrickT 1798 's xhggestion does give the right answer.

But the command

solve({eq3,eq5},{d,s})
as per PatrickT 1798 's xhggestion does give the right answer.

@Alejandro Jakubi 

That is very helpful. Thank you. I will do that immediately and report back.

@Alejandro Jakubi 

That is very helpful. Thank you. I will do that immediately and report back.

That is a strange phrase to return from a procedure. I suspect I have a problem using assign inside a procedure and will try to figure out what is wrong but can the Typesetting:-mfenced  output give me a hint?  I do not know what Tppe MK commads are.

 

thanks,

That is a strange phrase to return from a procedure. I suspect I have a problem using assign inside a procedure and will try to figure out what is wrong but can the Typesetting:-mfenced  output give me a hint?  I do not know what Tppe MK commads are.

 

thanks,

for the explanation.


for the explanation.


5 6 7 8 9 Page 7 of 9