Вы находитесь на странице: 1из 1

syms y(t)

syms c
Dy=diff(y)
Dy(t) =
D(y)(t)
y(t)=dsolve(diff(y,2)+9*y== sin(3*t), y(0)== 2, Dy(0)== c)
y(t) =
2*cos(3*t) + sin(3*t)/24 - sin(9*t)/72 + (c*sin(3*t))/3 - cos(3*t)*(t/6 sin(6*t)/36)
simplify(y(t))
ans =
2*cos(3*t) + sin(3*t)/18 + (c*sin(3*t))/3 - (t*cos(3*t))/6
C=solve(2*cos(3*pi/2)+sin(3*pi/2)/18 +(c*sin(3*pi/2))/3 (pi/2*cos(3*pi/2))/6== -3,c)
C =
53/6
Y(t)=dsolve(diff(y,2)+9*y == sin (3*t), y(0)== 2, Dy(0)== 53/6)
Y(t) =
3*sin(3*t)+(2-(1/6)*t)cos(3*t)

Вам также может понравиться