Qurak

Nd solve delay differential equations read

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
sol = NDSolve[{x''[t] + x[t - 1] == 0, x[t /; t ≤ 0] == t ^ 2}, x, {t, -1, 5}]
Output
NDSolve[{x[-1 + t] + Derivative[2][x][t] == 0, x[t /; t <= 0] == t^2}, x, {t, -1, 5}]
Step 2
Plot[Evaluate[{x[t], x'[t], x''[t]} /. First[sol]], {t, -1, 5}, PlotRange -> All]
Output
-Graphics-
Step 3
nsol = NDSolve[{x''[t] + x[t + 1] == 0, x[t /; t ≥   0] == t ^ 2}, x, {t, -5, 1}];
Plot[Evaluate[{x[t], x'[t], x''[t]} /. First[nsol]], {t, -5, 1}, PlotRange -> All]
Output
-Graphics-

Functions used

Related recipes

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