
6.2. LAPLACE TRANSFORMS 235
6.2.1 Jennifer Consults Mr. Spiegel
Histories are more full of examples of the fidelity of dogs
than of friends.
Alexander Pope, English satirical poet, (1688–1744).
To illustrate the use of Laplace transforms in solving ODEs, Jennifer has cre-
ated a recipe for solving the following problem taken from Murray Spiegel’s
Advanced Mathematics. Solve the fourth order inhomogeneous ODE
y
(t)+2y
(t)+y(t)=sint, y(0) = 1,y
(0) = −2,y
(0) = 3,y
(0) = 0.
After loading the integral transform package, Jennifer lets the Laplace transform
of y(t) be represented by F (s) for notational convenience.
>
restart: with(inttrans): LT:=laplace(y(t),t,s)=F(s):
The ODE is now entered.
>
ode:=diff(y(t),t$4)+2*diff(y(t),t$2)+y(t)=sin(t);
ode := (
d
4
dt
4
y(t)) + 2 (
d
2
dt
2
y(t)) + y(t)=sin(t)
She then takes the Laplace transform of ode and substitutes LT ,
>
eq:=subs(LT,laplace(ode,t,s));
eq := s
4
F (s) − (D
(3)
)(y)(0) − s (D
(2)
)(y)(0) − s
2
D(y)(0) − s
3
y(0)
+2s
2
F (s) − 2D(y)(0) − 2 s y(0) + F (s)=
1
s
2
+1
the result being expressed in terms of y(0) and the first three derivatives at
t = 0. Maple has simply applied the rule for taking the Laplace transform of a
derivative to the fourth and second order derivatives. The last term, 1/(s
2
+1),
in eq is the Laplace transform of sin(t). If proceeding by hand, one would look
up this result in a table of Laplace transforms.
The initial conditions are now entered in ic, using the differential operator,
>
ic:=(y(0)=1,D(y)(0)=-2,D(D(y))(0)=3,D(D(D(y)))(0)=0):
and eq is evaluated in eq2 with the initial conditions.
>
eq2:=eval(eq,{ic});
eq2 := s
4
F (s)+4− 5 s +2s
2
− s
3
+2s
2
F (s)+F (s)=
1
s
2
+1
Jennifer then solves eq2 for F (s).
>
eq3:=solve(eq2,F(s));
eq3 :=
−6 s
2
− 3+6s
3
+5s − 2 s
4
+ s
5
s
6
+3s
4
+3s
2
+1
The solution, Y , of the original ODE then follows on applying the inverse
Laplace transform to eq3 . If proceeding by hand, as in Spiegel, one would
laboriously express eq3 as a sum of partial fractions and then use a table to
look up the inverse transforms of the various terms.