Runge-Kutta method: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: used HTML to render the equations.)
Line 1,989: Line 1,989:
</pre>
</pre>


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>(* Symbolic solution *)
<lang Mathematica>(* Symbolic solution *)
DSolve[{y'[t] == t*Sqrt[y[t]], y[0] == 1}, y, t]
DSolve[{y'[t] == t*Sqrt[y[t]], y[0] == 1}, y, t]
Line 2,009: Line 2,009:
solution = NestList[phi, {0, 1}, 101];
solution = NestList[phi, {0, 1}, 101];
Table[{y[[1]], y[[2]], Abs[y[[2]] - 1/16 (y[[1]]^2 + 4)^2]},
Table[{y[[1]], y[[2]], Abs[y[[2]] - 1/16 (y[[1]]^2 + 4)^2]},
{y, solution[[1 ;; 101 ;; 10]]}]
{y, solution[[1 ;; 101 ;; 10]]}]</lang>
</lang>


=={{header|MATLAB}}==
=={{header|MATLAB}}==