The Laplace Transform
Differential Equations Project
Objectives:
(a) To demonstrate the use of the laplace option of the dsolve command in solving initial value
problems
(b) To demonstrate the use of the Laplace transform in solving differential equations involving
piecewise continuous functions by using Maple 's implementation of the Heaviside (unit step)
function and the Dirac delta function (the unit impulse function)
In essence, the Laplace transform changes the operation of differentiation into the operation of multiplication, so that a differential equation is converted to an algebraic equation. By using the inverse Laplace transform , the algebraic solution can be transformed into the solution of the original differential equation. Technology makes it easy to handle the algebraic and analytic complexities that arise in using Laplace transform techniques, especially expressions involving algebraic fractions or piecewise continuous functions.
Solved Example 1:
We want to (a) find the Laplace transform of cos(5
t
) and (b) determine the function whose Laplace transform is
.
Solution:
(a) We could just use Maple to evaluate the improper integral defining the Laplace transform by
using the int command. However in trying to calculate the limit that occurs in evaluating the
improper integral, Maple must be told whether the usual parameter s is positive or negative.
In our problem, the limit exists only if s is positive. One way to get around this is to replace s
by its absolute value:
| > | int(cos(5*t)*exp(-abs(s)*t), t=0..infinity); |
Since Maple did not simplify the answer, we issue another command:
| > | simplify(%); |
Because
s
must be positive, we write the answer as
.
However, there is an easier way. The package inttrans (standing for "integral transforms") contains the Laplace transform commands that Maple has already implemented:
| > | with(inttrans): |
The Laplace transform of cos(5 t ) is then computed by the command
| > | laplace(cos(5*t),t,s); |
(b) To find the function whose Laplace transform is Y ( s ), we use the command
invlaplace( Y ( s ), s , t ) (giving the inverse Laplace transform). For our problem, this becomes
| > | invlaplace(4*s/(s^2+4)^2, s, t); |
Simplifying, we get
| > | simplify(%); |
Solved Example 2:
Solve the initial value problem y'' - 2y =
,
y
(0)
=
1
, y'
(0) = 2, by using the
laplace
option of the
dsolve
command.
Solution :
You should be aware that the alternative is to use Maple to take the Laplace transform of each side of the equation, define and substitute the initial conditions, solve for the Laplace transform algebraically, and then solve for the solution of the differential equation by using the invlaplace command. You have probably used this sequence of steps by hand. However , look at how easy it is by using Maple the right way:
| > | de:=diff(y(t),t$2)-2*y(t)=sin(2*t); |
| > | dsolve({de, y(0)=1,D(y)(0)=2}, y(t), method=laplace); |
| > | dsolve({de, y(0)=1,D(y)(0)=2}, y(t)); |
Even using simplify won't help much here.
Solved Example 3:
Solve the initial value problem
x
'(
t
) +
x
(
t
) = {
t
for
t
in [0, 4); 1 for
}, with
x
(0) = 1.
Solution:
Because Maple can't integrate, differentiate, or take Laplace transforms of piecewise-defined functions, our first task is to express the discontinuous function on the right side of our equation in terms of the Heaviside function , Heaviside ( t - a ), which is defined to be 0 for t < a and 1 for t > a. The right-hand side of the differential equation can be described by the function f as follows:
| > | f:=t->t+(1-t)*Heaviside(t-4); |
| > | eqn:=diff(x(t),t)+x(t)=f(t); |
| > | dsolve({eqn, x(0)=1},x(t),method=laplace); |
| > | convert(%,piecewise); |
Solved Example 4:
A mass attached to a spring is released from rest 1 meter below the equilibrium position for the spring-mass system and begins to move up and down. After 3 seconds, the mass is struck by a hammer (with force equal to 3) in a downward direction. If the undamped system is governed by the IVP
;
x
(0) = 1,
(0) = 0 ,
where
x
(
t
) denotes the displacement from equilibrium at time
t
and
denotes the
Dirac delta function
, determine a formula for
x
(
t
).
Solution:
First we define the equation using the Maple function 3* Dirac ( t - 3), representing an "impulse force" of magnitude 3, for the right-hand side:
| > | EQN:= diff(x(t),t$2)+9*x(t)=3*Dirac(t-3); |
| > | dsolve({EQN,x(0)=1,D(x)(0)=0},x(t)); |
| > | convert(%,piecewise); |
| > | combine(%,trig); |
________________________________________________
ASSIGNMENT
Problem 1 :
(a) Use
Maple
to find the Laplace transform
of
F
(
t
) =
t
, where
is a constant.
(b) Use
Maple
to determine the function whose Laplace transform is
.
Problem 2:
Solve the IVP y '' - y ' - 2 y = 5 sin x ; y (0) = 1, y '(0) = -1.
Problem 3:
Solve the IVP 3 y '' + 3 y ' + 2 y = {0 for t < 0; 5 for t in [0, 5]; 0 for t > 5}; y (0) = 0, y '(0) = 0. Express your answer as a piecewise-defined function.
Problem 4:
Solve the IVP
y
'' +
y
= 1 +
;
y
(0) = 1,
y
'(0) = 0. Express your answer as a piecewise-defined function.
___________________________________________________________________________
MSIP Grant #P120A80089-98: "Three Urban Calculus Reform Programs: Adopting the Best," 1998-2001 ; Revised September 18, 2003