不才 歌曲:matlab一阶微分方程的解法

来源:百度文库 编辑:中科新闻网 时间:2024/05/05 00:55:08

Examples:

dsolve('Dx = -a*x') returns

ans = exp(-a*t)*C1

x = dsolve('Dx = -a*x','x(0) = 1','s') returns

x = exp(-a*s)

y = dsolve('(Dy)^2 + y^2 = 1','y(0) = 0') returns

y =
[ sin(t)]
[ -sin(t)]

S = dsolve('Df = f + g','Dg = -f + g','f(0) = 1','g(0) = 2')
returns a structure S with fields

S.f = exp(t)*cos(t)+2*exp(t)*sin(t)
S.g = -exp(t)*sin(t)+2*exp(t)*cos(t)

Y = dsolve('Dy = y^2*(1-y)')
Warning: Explicit solution could not be found; implicit solution returned.
Y =
t+1/y-log(y)+log(-1+y)+C1=0

dsolve('Df = f + sin(t)', 'f(pi/2) = 0')
dsolve('D2y = -a^2*y', 'y(0) = 1, Dy(pi/a) = 0')
S = dsolve('Dx = y', 'Dy = -x', 'x(0)=0', 'y(0)=1')
S = dsolve('Du=v, Dv=w, Dw=-u','u(0)=0, v(0)=0, w(0)=1')
w = dsolve('D3w = -w','w(0)=1, Dw(0)=0, D2w(0)=0')
y = dsolve('D2y = sin(y)'); pretty(y)