Laplace Tranform Method:
Solution of ODE
M.M. Yovanovich
LPTODE1.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*y(t) = exp(t);
Laplace tranform of ODE.
> laplace(ode1,t,s);
Substitute the initial conditions.
> subs(y(0)=0, D(y)(0) = 1, %);
Obtain the solution for Y(s).
> solve(%, Y(s));
Obtain the solution by means of inverse Laplace transform.
> sol1:= invlaplace(%,s,t);
Plot the solution.
> plot(sol1, t=0..5);
The solution procedure is similar to that shown in most texts.