Laplace Transform Method:

Ordinary Differential Equation

M.M. Yovanovich

LPTODE6.MWS

> restart:

> assume(m>0,n>0,p>0,omega>0):

> ode:= diff(theta(t),t) + m*theta(t)=n+p*cos(omega*t);

[Maple Math]

> sol:= dsolve(ode, theta(t));

[Maple Math]

> ic:=simplify(subs(t=0, rhs(sol)))=thetai;

[Maple Math]

> const:= solve(ic, _C1); _C1:= %;

[Maple Math]

[Maple Math]

> sol1:= expand(sol): sol1:= simplify(%);

[Maple Math]
[Maple Math]

> sol12:= simplify(subs(p=0, sol1));

[Maple Math]

> with(inttrans):

> alias(f(s) = laplace(theta(t),t,s)):

> laplace(ode, t,s);

[Maple Math]

> lptode:= subs(theta(0) = thetai, %);

[Maple Math]

> solve(%, f(s));

[Maple Math]

> sol2:= invlaplace(%, s, t);

[Maple Math]
[Maple Math]

> sol3:= simplify(subs(n=0, p=0, sol2));

[Maple Math]

Here we obtain the solution directly by means of the Laplace transform method.

> sol4:= dsolve({ode, theta(0)=thetai}, theta(t), method=laplace);

[Maple Math]
[Maple Math]

>