mathematica 作图,R = 0.008;r = 0.0125;Y = 47*2*3.14;z = 0.09;m = 0.08;k = 9;g = 10;f = 0.00018;e = 30;NDSolve[{0.5*m*R^4 *(y[t])^2 *(y'[t])^2/(R^2*Y^2 + z^2 - R^2*y[t])^2 + 0.2*m*r^2*(y'[t])^2 + 0.5*k*(R^2*Y^2 + z^2 - R^2*y[t]^2) + 0.5*k*z^2 - k*z*
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 01:07:11
mathematica 作图,R = 0.008;r = 0.0125;Y = 47*2*3.14;z = 0.09;m = 0.08;k = 9;g = 10;f = 0.00018;e = 30;NDSolve[{0.5*m*R^4 *(y[t])^2 *(y'[t])^2/(R^2*Y^2 + z^2 - R^2*y[t])^2 + 0.2*m*r^2*(y'[t])^2 + 0.5*k*(R^2*Y^2 + z^2 - R^2*y[t]^2) + 0.5*k*z^2 - k*z*
mathematica 作图,
R = 0.008;
r = 0.0125;
Y = 47*2*3.14;
z = 0.09;
m = 0.08;
k = 9;
g = 10;
f = 0.00018;
e = 30;
NDSolve[{0.5*m*
R^4 *(y[t])^2 *(y'[t])^2/(R^2*Y^2 + z^2 - R^2*y[t])^2 +
0.2*m*r^2*(y'[t])^2 + 0.5*k*(R^2*Y^2 + z^2 - R^2*y[t]^2) +
0.5*k*z^2 - k*z*Sqrt[R^2*Y^2 + z^2 - R^2*y[t]^2] +
0.5*f*(y[t] - Y)^2 -
m*g*(Sqrt[R^2*Y^2 + z^2 - R^2*y[t]^2] - z) == e,y[0] == 0.25},
y[t],{t,0,1}];
Plot[Evaluate[y[t] /.%],{t,0,1}]
为什么图像有两根线,Evaluate[y[t] /.这个代码有神么问题,我用的mathematica8
mathematica 作图,R = 0.008;r = 0.0125;Y = 47*2*3.14;z = 0.09;m = 0.08;k = 9;g = 10;f = 0.00018;e = 30;NDSolve[{0.5*m*R^4 *(y[t])^2 *(y'[t])^2/(R^2*Y^2 + z^2 - R^2*y[t])^2 + 0.2*m*r^2*(y'[t])^2 + 0.5*k*(R^2*Y^2 + z^2 - R^2*y[t]^2) + 0.5*k*z^2 - k*z*
……唉,同学,基础语法要懂啊.
其实你把倒数第二个分号去掉再执行,就会发现你的方程有两个解,所以画出来的图有两根线.
%代表上一个式子的输出,在这里就是你的微分方程的解.
/.是ReplaceAll的简写,简单地说就是把你解出来的y给代入到前面的y里了.