Laplace - Lecture Juvgnhf Lectura
Laplace - Lecture Juvgnhf Lectura
We look at how to represent piecewise defined functions using Heavised functions, and use
the Laplace transform to solve differential equations with piecewise defined forcing terms.
We repeatedly will use the rules: assume that L(f (t)) = F (s), and c ≥ 0. Then
where
(
0, t < c
L uc (t) = e−cs .
uc (t) = ,
1, t ≥ c
2
f (t)
0 1 2 3 4 5
t
It is pretty easy to see that
f (t) = u2 (t)(t − 2)
Let’s calculate its Laplace transform. We know from formula 3 with n = 1 that L(t) = 1/s2 ,
so
e−2s
L(f (t)) = 2 .
s
Consider the following function:
t, 0≤t≤1
1, 1≤t≤2
f (t) =
3 − t, 2≤t≤3
0 3≤t<∞
1
f (t)
−1
0 1 2 3 4 5
t
To write this using the Heaviside functions, lets go step by step from left to right. We
start off with the function t. At t = 1, we subtract t − 1 to get t − (t − 1) = 1. At time 2, we
subtract t − 2 to get 1 − (t − 2) = 3 − t. Then at t = 3 we add t − 3 to get (3 − t) + (t − 3) = 0.
So,
f (t) = t − u1 (t)(t − 1) − u2 (t)(t − 2) + u3 (t)(t − 3),
and
1 e−s e−2s e−3s 1
L(f (t)) = 2 − 2 − 2 + 2 = 2 1 − e−s − e−2s + e−3s .
s s s s s
Sometimes you need to rewrite the function a bit to recognize that it is in delayed form.
For example, consider
u2 (t) (t − 3).
We want to write this in the form u2 (t)f (t−2) in order to use rule 13. To avoid problems, let’s
temporarily think of f as a function of u. We then want to find f (u) so that f (t − 2) = t − 3.
Letting u = t − 2 is the same as t = u + 2, so we see that
f (u) = u − 1
In short, we are writing
u2 (t)(t − 3) = u2 (t) (t − 2) − 1 = u2 (t)(t − 2) − u2 (t).
Then
e−2s e−2s
L u2 (t) (t − 3) = 2 −
s s
where we use
1 1
L(t) =
2
, L(1) = .
s s
As a more complicated example, consider the problem of writing
u1 (t) sin(t) = u1 (t)f (t − 1)
Introducing a variable u = t − 1 , t = u + 1, we want f (u) = sin(u + 1). To calculate the
Laplace transform of u1 (t) sin(t), we have the problem that there is not an entry in the tables
for the Laplace transform of sin(u + 1). So we need to use trig identities to write
sin(u + 1) = cos(1) sin(u) + sin(1) cos(u)
leading to the formula
sin(t) = cos(1) sin(t − 1) + sin(1) cos(t − 1).
We then obtain the final answer to our problem
L u1 (t) sin(t) = L u1 (t) cos(1) sin(t − 1) + u1 (t) sin(1) cos(t − 1)
= cos(1)L u1 (t) sin(t − 1) + sin(1)L u1 (t) cos(t − 1)
e−s se−s
= cos(1) + sin(1)
s2 + 1 s2 + 1
2
1
f (t)
0
−1
−2 π
0 2π 3π 4π 5π
t
Now let’s work out L−1 (F (s)) where
s e−3s
F (s) = .
(s2 + 4)(s2 + 2s + 2)
We carry out partial fractions on the rational part (at this step ignore the exponential)
1
s 6
s + 32 − 16 s − 13
= + 2
(s2 + 4)(s2 + 2s + 2) s2 + 4 s + 2s + 2
We then split F (s) into the two terms. For the first term, we calculate
( 1 s + 2 )e−3s 1 s 1 −1 −3s 2
L−1 6 3
= L−1
e −3s
+ L e
s2 + 4 6 s2 + 4 3 s2 + 4
1 1
= u3 (t) cos(2(t − 3)) + u3 (t) sin(2(t − 3)).
6 3
For the second term, we need to complete the square and simplify to use the tables,
− 61 s − 13 − 61 s − 13 − 16 (s + 1) − 16
= = +
s2 + 2s + 2 (s + 1)2 + 1 (s + 1)2 + 1 (s + 1)2 + 1
We multiply by e−3s and take the inverse Laplace transform,
(− 1 s − 1 )e−3s 1 −1 −3s s+1 1 1
−1 6 3 −1 −3s
L =− L e − L e
s2 + 2s + 1 6 (s + 1)2 + 1 6 (s + 1)2 + 1
1 1
= − u3 (t)e−(t−3) cos(t − 3) − u3 (t)e−(t−3) sin(t − 3).
6 6
2
f (t)
0 1 2 3 4 5 6 7
t
We write f (t) = u1 (t) + u2 (t) + u3 (t) − 3u4 (t). To understand this formula, note that at
time t = 1 the function f (t) increases by 1, then at time t = 2 it increases by 1 more, then
at time t = 3 it increases by 1 more, then at time t = 4 it decreases by 3.
By the linearity of the Laplace transform and the formula L uc (t) = e−cs , we calculate
This is an advanced example to illustrate the power of using the Laplace transform (and
no, it won’t be on the final exam). We consider driving an undampened harmonic oscillator
by a square wave that has the same period as the homogeneous solution. The square wave
is a step function approximation to cos(t):
2
1
f (t)
0
−1
−2 π
0 2π 3π 4π 5π 6π 7π 8π 9π
t
f (t) = u0 (t) − 2uπ (t) + 2u2π (t) − 2u3π (t) + 2u4π (t) − 2u5π (t) + 2u6π (t) − 2u7π (t) + · · ·
You can imagine that the wave stops after a finite number of terms so we don’t have to
worry about infinite sums, but the following steps don’t require that. We first calculate the
Laplace transform of f (t):
L(f (t)) = L(u0 (t)) − 2L(uπ (t)) + 2L(u2π (t)) − 2L(u3π (t)) + 2L(u4π (t)) − 2L(u5π (t))
− cos(t) + 2uπ (t) cos(t − π) − 2u2π (t) cos(t − 2π) + 2u3π cos(t − 3π) − · · ·
We next use cos(t − π) = − cos(t), cos(t − 2π) = cos(t), et cetera to write this as
y(t) = u0 (t) − 2uπ (t) + 2u2π (t) − 2u3π (t) + · · ·
− cos(t) u0 (t) + 2uπ (t) + 2u2π (t) + 2u3π (t) + · · ·
This is a little complicated, but you can see that the first line is just f (t), and bounces
between 1 and −1. The second line is cos(t) times a function that jumps by 2 each time t
increases by π, so it will grow proportional to t, just like resonant driving.
On the following page we compare square wave forcing to cos(t) forcing (both forcing
terms at the same frequency as the homogeneous frequency). They look qualitatively the
same, but a close inspection shows some differences. The physical explanation for why the
solution for the square wave force grows faster is that the square wave contains more energy
than the cosine wave.
Square wave forcing:
Solution to y 00 + y = f (t), y(0) = 0, y 0 (0) = 0, where f (t) is the square wave.
20
15
10
5
y(t)
−5
−10
−15
0 π 2π 3π 4π 5π 6π 7π 8π 9π
t
Resonant forcing:
The solution to y 00 + y = cos(t), y(0) = 0, y 0 (0) = 0, is given by y = 21 t sin t.
15
10
5
.5 ∗ t ∗ sin(t)
−5
−10
0 π 2π 3π 4π 5π 6π 7π 8π 9π
t