Wolfram
Mathematica
9の新機能
◄
戻る
|
次へ
►
Mathematica
9の新機能
›
微分方程式
感度分析
xxx
波動方程式のパラメトリック感度.
In[1]:=
X
pfun = ParametricNDSolveValue[{D[u[t, x], t, t] == c^2 D[u[t, x], x, x], u[0, x] == Exp[-(a x)^2], Derivative[1, 0][u][0, x] == 0, u[t, -10] == u[t, 10]}, u, {t, 0, 5}, {x, -10, 10}, {a, c}]; ifun = pfun[1, 1]; ifda = D[pfun[a, 1], a] /. {a -> 1}; ifdc = D[pfun[1, c], c] /. {c -> 1}; Panel@Grid[ Join[{{"", "a", "c"}}, Table[{StringJoin["t = ", ToString[\[Tau]]], Plot[Evaluate[(pfun[a, c][\[Tau], x] + .5 {0, 1, -1} D[pfun[a, c][\[Tau], x], a]) /. {a -> 1, c -> 1}], {x, -10, 10}, Filling -> {2 -> {3}}, PlotRange -> All], Plot[Evaluate[(pfun[a, c][\[Tau], x] + .5 {0, 1, -1} D[pfun[a, c][\[Tau], x], c]) /. {a -> 1, c -> 1}], {x, -10, 10}, Filling -> {2 -> {3}}, PlotRange -> All]}, {\[Tau], {1, 3, 5}}]]]
Out[1]=