Qurak

Nd solve explicit runge kutta introduction

Tutorial 3 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

No output - this step sets something up for the next one.

Step 2
NDSolve[{y'[t] == -y[t], y[0] == 1}, y[t], {t, 0, 1},
	Method -> "ExplicitEuler", "StartingStepSize" -> 1 / 10]
Output
{{y[t] -> InterpolatingFunction[{{0., 1.}}, <>][t]}}
Step 3
NDSolve[{y'[t] == -y[t], y[0] == 1}, y[t], {t, 0, 1},
	Method -> "ExplicitMidpoint", "StartingStepSize" -> 1 / 10]
Output
{{y[t] -> InterpolatingFunction[{{0., 1.}}, <>][t]}}

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client