-
求解一介常微分方程 d y d t = a y \frac{dy}{dt}=ay dtdy=ay
syms y(t) a; eqn = diff(y, t) == a*y; S = dsolve(eqn)
增加条件,初值 y ( 0 ) = 5 y(0) = 5 y(0)=5
syms y(t) a; eqn = diff(y, t) == a*y; cond = y(0) = 5; S = dsolve(eqn, cond)
-
求解二阶常微分方程 d 2 y d u 2 = a y \frac{d^2y}{du^2}=ay du2d2y=ay
syms y(t) a; eqn = diff(y, t, 2) == a*y; S = dsolve(eqn)
增加条件, y ( 0 ) = b , y ′ ( 0 ) = 1 y(0) = b, y'(0) = 1 y(0)=b,y′(0)=1
syms y(t) a b; eqn = diff(y, t, 2) == a*y; Dy = diff(y, t); cond = [y(0) == b, Dy(0) == 1]; S = dsolve(eqn, cond)
-
求解常微分方程组
d y d t = z d z d t = − y \frac{dy}{dt}=z\\ \frac{dz}{dt}=-y dtdy=zdtdz=−ysyms y(t) z(t) eqns = [diff(y, t) == z, diff(z, t) == -y]; s = dsolve(eqns)
求简单微分方程
最新推荐文章于 2024-08-25 12:24:17 发布