- #1
panzer7910
- 2
- 0
1) I solved 9 coupled non linear differential equation and Mathematica give me the result like this.
{{y1[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y2[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y3[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y4[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y5[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y6[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y7[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y8[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y9[t]->InterpolatingFunction[{{0.001,0.01}},<>][t]}}
How can I plot each of the function (y1 to y9) separately?
2) To solve a single differential equation (refer to the Mathematica NDSolve Help) and plot it, why we must divide by the answer itself? I mean, in this case, why should I divide by " .s " ?
s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]
Plot[Evaluate[y[x] /. s], {x, 0, 30}, PlotRange -> All]
{{y1[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y2[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y3[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y4[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y5[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y6[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y7[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y8[t]->InterpolatingFunction[{{0.001,0.01}},<>][t],
y9[t]->InterpolatingFunction[{{0.001,0.01}},<>][t]}}
How can I plot each of the function (y1 to y9) separately?
2) To solve a single differential equation (refer to the Mathematica NDSolve Help) and plot it, why we must divide by the answer itself? I mean, in this case, why should I divide by " .s " ?
s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}]
Plot[Evaluate[y[x] /. s], {x, 0, 30}, PlotRange -> All]