wolfram mathematica - NDSolve accuracy -


we're asking ndsolve solve x'' + x == 0 20 digits, when compare true solution, see 9 correct digits. not using ndsolve correctly?

clear["global`*"] sol = ndsolve[{x'[t] == v[t], v'[t] == -x[t], x[0] == 1, v[0] == 0}, {x, v},     {t, 0, 100},      precisiongoal -> 20, accuracygoal -> 20, workingprecision -> 40, maxsteps -> 10^6]; plot[(x[t] - cos[t]) /. sol[[1]], {t, 0, 100}] 


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -