Post Reply 
a bug of "plotode"?
03-18-2016, 03:48 PM
Post: #1
a bug of "plotode"?
I have been always getting "invalid dimension" errors when I tried to plotode(x*sin(y),[x y],[-2 2]) just as the user guide told.
   
   
It's so annoying. Is there anyone who has been succeeded in plotode?
Find all posts by this user
Quote this message in a reply
03-18-2016, 04:03 PM
Post: #2
RE: a bug of "plotode"?
Try with a precise interval in x
Code:
plotode(x*sin(y),[x=-10..10,y],[-2,2])
otherwise autoscaling fails. Indeed the general solution is
Code:
desolve(y'=x*sin(y))
Code:
2*atan(exp(x^2/2)/c_0)+2*n_1*pi
therefore the limit (2k+1)*pi is reached very fast (because of the exponential), and the y-scaling algorithm fails.
Find all posts by this user
Quote this message in a reply
03-18-2016, 04:15 PM
Post: #3
RE: a bug of "plotode"?
(03-18-2016 04:03 PM)parisse Wrote:  Try with a precise interval in x
Code:
plotode(x*sin(y),[x=-10..10,y],[-2,2])
otherwise autoscaling fails. Indeed the general solution is
Code:
desolve(y'=x*sin(y))
Code:
2*atan(exp(x^2/2)/c_0)+2*n_1*pi
therefore the limit (2k+1)*pi is reached very fast (because of the exponential), and the y-scaling algorithm fails.

In fact, when I tried to plotode(x*sin(y),[x=-10..10,y],[-2,2]), it shows "Bad argument value". Now I am confused what can we do use plotode.
   

At the same time, desolve(y'=x*sin(y)) or desolve(y'=x*sin(y), x, y) doesn't work.
   
Find all posts by this user
Quote this message in a reply
03-18-2016, 07:06 PM
Post: #4
RE: a bug of "plotode"?
Make sure that x and y are not assigned (purge(x,y))
Find all posts by this user
Quote this message in a reply
03-19-2016, 09:25 AM
Post: #5
RE: a bug of "plotode"?
(03-18-2016 07:06 PM)parisse Wrote:  Make sure that x and y are not assigned (purge(x,y))

Yes, it is! I forgot that I had assigned a value to x.
Thank you so muchSmile
Find all posts by this user
Quote this message in a reply
03-23-2016, 06:28 AM
Post: #6
RE: a bug of "plotode"?
Recently I thought about trouble like the above with assigned variables or somehow similar capital X in combination with home and cas commands.

Would it be an option to print the expression with replaced variables if an error occured? That would not make you save if your assigment yields a formally correct expression and just returns an 'incorrect' result. But if the calculator reports an error it could be really helpful to see, what expression was actually evaluated. ?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)