I would like to give a theoretical estimation of local truncation error (and then for the global one) for a solution to a numerical initial value problem by NDSolve.
For this estimate I need to know what method has been used and the size of the steps (or an average size for the global error, since I think it uses adaptive size step). How can I get this information?
$\begingroup$ $\endgroup$
1 - $\begingroup$ welcome! Could you please provide any information on what you have tried already (MMA code, literature etc.) and why it did not satisfy your requirements? This would alow others to produce meaningful answers. $\endgroup$e.doroskevic– e.doroskevic2015-12-08 09:38:04 +00:00Commented Dec 8, 2015 at 9:38
Add a comment |
1 Answer
$\begingroup$ $\endgroup$
See this to find out the method used by NDSolve and this
sol = NDSolveValue[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]; Differences @ First @ sol["Coordinates"] to get magnitude of step size