Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • $\begingroup$ The problem seems to be due to the fact that NDSolve[] is performing cubic Hermite interpolation by default. Unfortunately, even when I tried explicitly setting InterpolationOrder -> 1 in NDSolve[], I still got a cubic interpolant. Hmm... $\endgroup$ Commented Aug 22, 2017 at 11:53
  • $\begingroup$ Your second problem (the lines not going through the initial point) probably has to do with the fact that the you have evaluated each curve at an even number of points (4), but the original grid from your Euler integration used an odd number of points. This may be one of those rare times when it is useful to reach under the hood and grab the data underlying the interpolating function that NDSolve returns. $\endgroup$ Commented Aug 22, 2017 at 11:54
  • 1
    $\begingroup$ @J.M. "For an ODE of order $n$,...$2n+1$seems like a lower bound on the interpolation order" of solution obtained from NDSolve. $\endgroup$ Commented Aug 22, 2017 at 12:20