Qurak

Nd solve delay differential equations read

教學 共 3 個步驟,在同一個工作階段中依序執行。每一步都在引擎上實際執行過,下方的輸出就是它產生的結果。

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

使用到的函式

相關的操作範例

所有操作範例 · 函式參考 · 從 MCP 用戶端使用這個