Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 2011-10-05 13:44:40 -0600

DSM gravatar image

In this case the error message isn't particularly informative, but it looks like what's going on is that the timestep you've selected is too large. Euler's method is (notoriously) poorly behaved, and the code doesn't seem to fail very well when the terms go imaginary.

If you decrease your timestep h, your integration will converge and things should work. By slowing increasing h, you can watch the integration start to fail.