You are on page 1of 2

1.

syms ts
F=dsolve('D2y-Dy+y=6*exp(-t)','y(0)=3','Dy(0)=3')
F =
exp(t/2)*cos((3^(1/2)*t)/2) + 3*3^(1/2)*exp(t/2)*sin((3^(1/2)*t)/2) +
(4*3^(1/2)*exp(t/2)*exp(-(3*t)/2)*cos((3^(1/2)*t)/2)*((3*sin((3^(1/2)*t)/2))/2
+ (3^(1/2)*cos((3^(1/2)*t)/2))/2))/3 - (4*3^(1/2)*exp(t/2)*exp((3*t)/2)*sin((3^(1/2)*t)/2)*((3*cos((3^(1/2)*t)/2))/2 (3^(1/2)*sin((3^(1/2)*t)/2))/2))/3
simplify(F)
ans =
2*exp(-t) + exp(t/2)*cos((3^(1/2)*t)/2) +
3*3^(1/2)*exp(t/2)*sin((3^(1/2)*t)/2)
pretty(ans)
/ 1/2
\
/ 1/2
/ t \
| 3
t |
1/2
/ t \
| 3
t
2 exp(-t) + exp| - | cos| ------ | + 3 3
exp| - | sin| -----\ 2 /
\
2
/
\ 2 /
\
2
3. syms ts
F=dsolve('D3y+2*D2y-Dy-2*y=0','y(0)=3','Dy(0)=-3','D2y(0)=1')
F =
4*exp(-t) - (2*exp(-2*t))/3 - exp(t)/3
simplify(F)
ans =
-(exp(-2*t)*(exp(3*t) - 12*exp(t) + 2))/3
pretty(ans)
exp(-2 t) (exp(3 t) - 12 exp(t) + 2)
- -----------------------------------3

4. syms ts

F=dsolve('D4y-y=0','y(0)=2','Dy(0)=0','D2y(0)=-1','D3y(0)=3')

\
|
|
/

F =
(3*cos(t))/2 - exp(-t)/2 + exp(t) - (3*sin(t))/2
simplify(F)
ans =
(3*cos(t))/2 - exp(-t)/2 + exp(t) - (3*sin(t))/2
pretty(ans)
3 cos(t)
exp(-t)
3 sin(t)
-------- - ------- + exp(t) - -------2
2
2
5. syms ts
F=dsolve('D4y+2*D3y+3*D2y+2*Dy+y=0','y(0)=2','Dy(0)=-1','D2y(0)=0','D3y(0)=1')
F =
2*exp(-t/2)*cos((3^(1/2)*t)/2) + (2*3^(1/2)*exp(-t/2)*sin((3^(1/2)*t)/2))/9 (t*exp(-t/2)*cos((3^(1/2)*t)/2))/3 + (3^(1/2)*t*exp(t/2)*sin((3^(1/2)*t)/2))/3
simplify(F)
ans =
(exp(-t/2)*(18*cos((3^(1/2)*t)/2) + 2*3^(1/2)*sin((3^(1/2)*t)/2) 3*t*cos((3^(1/2)*t)/2) + 3*3^(1/2)*t*sin((3^(1/2)*t)/2)))/9
pretty(ans)
/
/
/ 1/2
|
/
t \ |
| 3
t
| exp| - - | | 18 cos| -----\
\
2 / \
\
2
/ 1/2
| 3
t
3 t cos| -----\
2

\
/ 1/2
|
1/2
| 3
t
| + 2 3
sin| -----/
\
2

\
/ 1/2
|
1/2
| 3
t
| + 3 3
t sin| -----/
\
2

\
|
|
/

\
|
|
/

\
|
| / 9
/

\
|
| /

You might also like