NDSolve示例,UCI ,Michael Hénon and Carl Heiles equations
mathematica吧
全部回复
仅看楼主
level 1
AInseven 楼主
问题:https://eee.uci.edu/12f/40330/homework5.pdf
中的第二题
While at Princeton in 1964, Michael Hénon and Carl Heiles proposed thefollowing set of differential equations to describe the motion of a star around thecenter of a galaxy,
求解代码:
vp[x[t], y[t]] := 1/2 (x[t]^2 + y[t]^2 + 2 x[t]^2 y[t] - 2/3 y[t]^3);
equs = {x'[t] == vx[t],
y'[t] == vy[t],
vx'[t] == -D[vp[x[t], y[t]], x[t]],
vy'[t] == -D[vp[x[t], y[t]], y[t]],
x[0] == -0.1, y[0] == -0.2, vx[0] == 0.443, vy[0] == -0.05
};
out = NDSolve[equs, {x[t], y[t], vx[t], vy[t]}, {t, 0, 1000}];
ParametricPlot[{x[t] /. out[[1, 1]], y[t] /. out[[1, 2]]}, {t, 0,
1000}]
ParametricPlot[{vx[t] /. out[[1, 3]], vy[t] /. out[[1, 4]]}, {t, 0,
1000}]
vx的初值依次为0.243,0.343,0.443时,
x-y,vx-vy,关于t的参数图,
从图中可以看出,初值的微量变化,对结果的巨大影响,也就是混乱问题
2019年10月20日 09点10分 1
level 8
所以你的具体问题是?????
2019年10月31日 03点10分 2
可能是想分享个实例吧……可是开头那个ClearAll都用错了。话说怎么有这么多人想当然地认为在开头写个ClearAll就能清除全体变量?
2019年11月02日 08点11分
1