Qurak

Nd solve explicit runge kutta introduction

Tutorial 3 stappen, op volgorde uitgevoerd in één sessie. Elke stap is tegen de engine uitgevoerd en de uitvoer hieronder is wat hij opleverde.

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

Geen uitvoer - deze stap zet iets klaar voor de volgende.

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

Gebruikte functies

Gerelateerde recepten

Alle recepten · Functiereferentie · Gebruik dit vanuit een MCP-client