Laplace Tranform Method:
Solution of ODE
M.M. Yovanovich
LPTODE2.MWS
Laplace Transform. Maple worksheet to solve ODEs.
> restart:
> with(inttrans):
We can introduce the short hand notation to make the results appear as they do in many texts. We next obtain the solution to a simple second-order ODE.
> alias(Y(s)=laplace(y(t),t,s)):
Laplace transform of derivatives.
> laplace(D(y)(t), t,s);
> laplace((D@@2)(y)(t), t,s);
> laplace((D@@3)(y)(t), t,s);
Observe that the transformed first, second and third dervatives require initial conditions such as , , etc. Now a second-order ODE will be solved.
Define the ODE.
> ode1:= (D@@2)(y)(t)+4*D(y)(t) + 5*y(t) = 10*exp(t);
Laplace tranform of ODE.
> step1:= laplace(ode1,t,s);
Substitute the initial conditions.
> step2:= subs(y(0)=1, D(y)(0) = 2, step1);
Obtain the solution for Y(s). Show the partial fractions form.
> step3:= solve(step2, Y(s)); step4:= convert(step3, parfrac,s);
Obtain the solution by means of inverse Laplace transform.
> sol1:= invlaplace(step3,s,t);
Plot the solution.
> plot(sol1, t=0..5);
The solution procedure is similar to that shown in most texts.