我尝试了各种方法将以下微分方程的解化简,但无法将其完全化简为0.01e^(-0.15t)sin(9.999t+1.556),带有根号的表达式也没有得到适当的化简。有没有人能解释一下这个解决方案是如何在尽可能减少术语数量的情况下完全简化的?
syms y(t) m k x c
Dy = diff(y,t);
Dy2 = diff(y,t,2);
m = 10; c = 3; k = 1000;
ode = m*Dy2 +c*Dy + k*y == 0;
eqns = [ode]
cond = [y(0) == 0.01,Dy(0) == 0];
ySol(t) = dsolve(eqns,cond)
ySol(t) = simplify(ySol(t),'steps',500)
pretty(ySol(t))
vpa(ySol(t), 5)
simplify(ySol(t))
将vpa
函数的输出传递给simplify
函数,如下所示:
vpa(simplify(vpa(ySol(t), 3)),3)