a bug of "plotode"?
03-18-2016, 03:48 PM
Post: #1
 kilasuelika Junior Member Posts: 3 Joined: Mar 2016
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?
03-18-2016, 04:03 PM
Post: #2
 parisse Senior Member Posts: 1,135 Joined: Dec 2013
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.
03-18-2016, 04:15 PM
Post: #3
 kilasuelika Junior Member Posts: 3 Joined: Mar 2016
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.

03-18-2016, 07:06 PM
Post: #4
 parisse Senior Member Posts: 1,135 Joined: Dec 2013
RE: a bug of "plotode"?
Make sure that x and y are not assigned (purge(x,y))
03-19-2016, 09:25 AM
Post: #5
 kilasuelika Junior Member Posts: 3 Joined: Mar 2016
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 much
03-23-2016, 06:28 AM
Post: #6
 leprechaun Member Posts: 90 Joined: Mar 2015
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. ?
 « Next Oldest | Next Newest »

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