matlab一阶微分方程的解法

来源:百度知道 编辑:UC知道 时间:2024/05/22 15:48:17

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