Convolution
Convolution
Convolution
“Convolution” is an operation involving two functions that turns out to be rather useful in many
applications. We have two reasons for introducing it here. First of all, convolution will give
us a way to deal with inverse transforms of fairly arbitrary products of functions. Secondly, it
will be a major element in some relatively simple formulas for solving a number of differential
equations.
Let us start with just seeing what “convolution” is. After that, we’ll discuss using it with the
Laplace transform and in solving differential equations.
Since we will use f (x) and g(t − x) in computing the convolution, let us note that
So, Z t
f ∗ g(t) = f (x)g(t − x) d x
x=0
Z t
= e3x e7(t−x) d x
x=0
Z t
= e3x e7t e−7x d x
x=0
533
534 Convolution and Laplace Transforms
Z t
7t
= e e−4x d x
x=0
−1 −4x t
= e7t · e
4 x=0
−1 7t −4t −1 7t −4·0 −1 3t 1 7t
= e e − e e = e + e .
4 4 4 4
Simplifying this slightly, we have
1 7t
f ∗ g(t) = e − e3t when f (t) = e3t and g(t) = e7t .
4
It is common practice to also denote the convolution f ∗ g(t) by f (t) ∗ g(t) where, here,
f (t) and g(t) denote the formulas for f and g . Thus, instead of writing
1 7t
f ∗ g(t) = e − e3t when f (t) = e3t and g(t) = e7t ,
4
we may just write
1 7t
e3t ∗ e7t = e − e3t .
4
This simplifies notation a little, but be careful — t is being used for two different things in this
equation: On the left side, t is used to describe f and g ; on the right side, t is the variable in
the formula for the convolution. By convention, if we assign t a value, say, t = 2 , then we are
setting t = 2 in the final formula for the convolution. That is,
e3t ∗ e7t with t =2
means compute the convolution and replace the t in the resulting formula with 2 , which, by the
above computations, is
1 7·2 1 14
e − e3·2 = e − e6 .
4 4
It does NOT mean to compute
e3·2 ∗ e7·2 ,
which would give you a completely different result, namely,
Z t
6 14
e ∗e = e6 e14 dt = e20 t .
x=0
Z t 1 1/ 3/
= t 2 x − /2 − 2t x 2 +x 2 dx
x=0
1/ 2 3/2 2 5 t
= t 2 2x 2 − 2t x + x /2
3 5 x=0
1/ 4 3/ 2 5/
= 2t 2 · t 2 − t ·t 2 + t 2 .
3 5
After a little algebra and arithmetic, this reduces to
1 16 5/2
√ ∗ t2 = t . (27.1)
t 15
Thus, to compute
1
√ ∗ t2 when t = 4 ,
t
we actually compute
16 5/2
t with t = 4 ,
15
obtaining
16 5/2 16 5 512
4 = 2 = .
15 15 15
Basic Identities
Let us quickly note a few easily verified identities that can simplify the computation of some
convolutions.
The first identity is trivial to derive. Let α be a constant, and let f and g be two functions.
Then, of course,
Z t Z t Z t
[α f (x)]g(t − x) d x = f (x)[αg(t − x)] d x = α f (x)g(t − x) d x ,
x=0 x=0 x=0
The last integral is exactly the same as the integral for computing g∗ f (t) , except for the cosmetic
change of denoting the variable of integration by y instead of x . So that integral is the formula
for formula for g ∗ f (t) , and our computations just above reduce to
What an incredible stroke of luck! We’ve already computed the convolution on the right in
example 27.2. Checking back to equation (27.1), we find
1 16 5/2
√ ∗ t2 = t .
t 15
Hence,
1 1 16 5/2
t2 ∗ √ = √ ∗ t2 = t .
t t 15
[ f + g] ∗ h = [ f ∗ g] + [g ∗ h] , (27.3)
f ∗ [g + h] = [ f ∗ g] + [ f ∗ h] (27.4)
and
f ∗ [g ∗ h] = [ f ∗ g] ∗ h . (27.5)
The first and second equations are that “addition distributes over convolution”. They are easily
confirmed using the basic definition of convolution. For the first:
Z t
[ f + g] ∗ h(t) = [ f (x) + g(x)]h(t − x) d x
x=0
Z t
= [ f (x)h(t − x) + g(x)h(t − x)] d x
x=0
Z t Z t
= f (x)h(t − x) d x + g(x)h(t − x)] d x
x=0 x=0
= [ f ∗ g] + [g ∗ h] .
The second, equation (27.4) follows in a similar manner or by combining (27.3) with the commu-
tativity of the convolution. The last equation in the list, equation (27.5), states that convolution
Convolution and Products of Transforms 537
is “associative”, that is, when convolving three functions together, it does not matter which two
you convolve first. It’s verification requires showing that the two double integrals defining
f ∗ [g ∗ h] and [ f ∗ g] ∗ h
are equivalent. This is a relatively straightforward exercise in substitution, and will be left as a
challenge for the interested student (exercise 27.3 on page 546).
Finally, just for fun, let’s make a few more simple observations:
Z t
0 ∗ g(t) = g ∗ 0(t) = 0 · g(t − x) d x = 0 .
x=0
Z t Z t
f ∗ 1(t) = 1 ∗ f (t) = f (s) · 1 d x = f (s) d x .
x=0 x=0
Z 0
f ∗ g(0) = f (x)g(0 − x) d x = 0 .
x=0
is well defined and finite for every positive value of t . In other words, f ∗ g is a well-defined
function on (0, ∞) , at least whenever f and g are both piecewise continuous on (0, ∞) . (In
fact, it can then even be shown that f ∗ g(t) is a continuous function on [0, ∞) .)
But now observe that one of the functions in example 27.2, namely t −1/2 , ‘blows up’ at
t = 0 and, thus, is not piecewise continuous on (0, ∞) . So that example also demonstrates that,
sometimes, f ∗ g is well defined on (0, ∞) even though f or g is not piecewise continuous.
(The impatient can turn to theorem 27.1 on page 539 for that formula.)
Keep in mind that we can rename the variable of integration in each of the above integrals.
In particular, note (for future reference) that
Z ∞ Z ∞
−sx
F(s) = e f (x) d x and G(s) = e−sy g(y) dy .
0 0
Now, simply writing out the integral formulas for the Laplace transform and for the convo-
lution yields Z ∞
L[ f ∗ g(t)]|s = e−st f ∗ g(t) dt
t=0
Z ∞ Z t
−st
= e f (x)g(t − x) d x dt
t=0 x=0
Z ∞ Z t
= e−st f (x)g(t − x) d x dt .
t=0 x=0
where, simply to simplify expressions in the next few lines, we’ve set
It is now convenient to switch the order of integration in the last double integral. According
to the limits in that double integral, we are integrating over the region R in the X T –plane
consisting of all (x, t) for which
0<t <∞
and, for each of these values of t ,
0<x<t .
As illustrated in figure 27.1, region R is the portion of the first quadrant of the X T –plane to
the left of the line t = x . Equivalently, as can also be seen in this figure, R is the portion of
the first quadrant above the line t = x . So R can also be described as the set of all (x, t) for
which
0<x <∞
and, for each of these values of x ,
x <t <∞ .
Thus,
Z ∞ Z t ZZ Z ∞ Z ∞
K (x, t) d x dt = K (x, t) d A = K (x, t) dt d x .
t=0 x=0 R x=0 t=x
Convolution and Products of Transforms 539
T
R
x
t=
(x 0 , t0 )
t = t0 (t0 , t0 )
t = x0 (x 0 , x 0 )
x = x0 x = t0 X
Figure 27.1: The region R for the transform of the convolution. Note that the coordinates
of any point (x 0 , t0 ) in R must satisfy 0 < x 0 < t0 < ∞ .
Let us simplify the inner integral with the substitution y = t − x (remembering that t is the
variable of integration in this integral):
Z ∞ Z ∞−x Z ∞
−s(t−x) −sy
e g(t − x) dt = e g(y) dy = e−sy g(y) dy = G(s) !
t=x y=x−x y=0
Thus,
L[ f ∗ g(t)]|s = F(s)G(s) .
Equivalently,
f ∗ g(t) = L−1 [F(s)G(s)]|t .
If we had been a little more complete in our computations, we would have kept track of the
exponential order of all the functions involved and obtained all of the following theorem.
Then the convolution f ∗ g(t) is of exponential order s1 for any s1 > s0 . Moreover,
Do remember that identities (27.7) and (27.8) are equivalent. It is also worthwhile to rewrite
these identities as
L[ f ∗ g(t)]|s = L[ f ]|s · L[g(t)]|s (27.7 ′ )
and
L−1 [F(s)G(s)]|t = L−1 [F(s)]|t ∗ L−1 [G(s)]|t , (27.8 ′ )
respectively. These forms, especially the latter, are sometimes a little more convenient in practice.
1
.
s2 − 10s + 21
As luck would have it, this convolution was computed in example 27.1 on page 533),
1
e3t ∗ e7t = e7t − e3t .
4
Thus,
1 1
L −1
= e3t ∗ e7t = e7t − e3t .
s 2 − 10s + 21 t
4
The inverse transform in the last example could also have been computed using partial
fractions. Indeed, many of the inverse transforms we computed using partial fractions can also
be computed using convolution. Whether one approach or the other is preferred depends on the
opinion of the person doing the computing. However, as the next example shows, there are cases
where convolution can be applied, but not partial fractions. We will also use this example to
demonstrate how convolution naturally arises when solving differential equations.
1
y ′′ + 9y = √ with y(0) = 0 and y ′ (0) = 0 .
t
Convolution and Products of Transforms 541
Because the denominator does not factor into two polynomials, we cannot use partial fractions
— we must use convolution,
√ √ √
−1 π −1 π 1 −1 π −1 1
L √ 2 = L √ · 2 = L √ ∗L 2
.
s s +9 t
s s +9 t s t s +9 t
Reversing the transform made on the right side of the above equations, we have
√
−1 π 1
L √ = √ .
s t t
Combining the above and recalling that “constants factor out”, we then obtain
√ √
π π 1
y(t) = L−1 √ 2 = L−1 √ ∗ L−1 2
s s +9 t
s t s +9 t
1 1
= √ ∗ sin(3t)
t 3
1 1
= √ ∗ sin(3t) .
3 t
That is, Z t
1 1
y(t) = √ sin(3[t − x]) d x .
3 x=0 x
Admittedly, this last integral is not easily evaluated by hand. But it is something that can
be accurately approximated for any specific (nonnegative) value of t using routines found in
many computer math packages. So it is still a usable formula.
542 Convolution and Laplace Transforms
where f = f (t) is any Laplace transformable function. Naturally, we will use the Laplace
transform. So let
Because of our initial conditions, the “transform of the derivatives” identities simplify con-
siderably:
L y ′′ s = s 2 Y (s) − s y(0) − y ′ (0) = s 2 Y (s)
|{z} | {z }
0 0
and
L y′ s
= sY (s) − y(0) = sY (s) .
|{z}
0
Consequently,
L y ′′ − 10y ′ + 21y s = L[ f (t)]|s
H⇒ L y ′′ s
− 10L y ′ s + 21L[y]|s = F(s)
2
H⇒ s Y (s) − 10sY (s) + 21Y (s) = F(s)
2
H⇒ s − 10s + 21 Y (s) = F(s) .
1
Y (s) = H (s)F(s) where H (s) = .
s2 − 10s + 21
Thus,
y(t) = L−1 [Y (s)]|t = L−1 [H (s)F(s)]|t .
Applying the convolution identity then yields
With this and our chosen integral formula for h ∗ f , formula (27.9a), the solution to our
initial-value problem, becomes
Z t
1 7x
y(t) = e − e3x f (t − x) d x . (27.10)
0 4
Formula (27.10) is a convenient way to describe the solutions to our initial-value problem,
especially if we want to solve this problem for a number of different choices of f (t) . Using
it, we can quickly write out a relatively simple integral formula for the solution corresponding
to each f (t) . For example:
If f (t) = e4t , then f (t − x) = e4(t−x) and formula (27.10) yields
Z t
1 7x
y(t) = e − e3x e4(t−x) d x .
0 4
√
3
√
And finally, if f (t) = t , then f (t − x) = 3 t − x and formula (27.10) yields
Z t
1 7x √
y(t) = e − e3x 3 t − x d x .
4 0
is not easily evaluated by hand, but can be accurately approximated for any value of t using
routines found in our favorite computer math package.
Generalizing what we just derived in the last example is easy. Suppose we have any second-
order initial-value problem of the form
where a , b and c are constants, and f is any Laplace transformable function. Then, taking
the Laplace transform of both sides of the differential equation, letting
and noting that, because of our initial conditions, the “transform of the derivatives” identities
simplify to
L y ′′ s = s 2 Y (s) − s y(0) − y ′ (0) = s 2 Y (s)
|{z} | {z }
0 0
and
L y′ s
= sY (s) − y(0) = sY (s) ,
|{z}
0
we see that
L ay ′′ + by ′ + cy s = L[ f (t)]|s
H⇒ aL y ′′ s
+ bL y ′ s + cL[y]|s = F(s)
2
H⇒ as Y (s) + bsY (s) + cY (s) = F(s)
2
H⇒ as + bs + c Y (s) = F(s) .
So,
y(t) = L−1 [Y (s)]|t = L−1 [H (s)F(s)]|t ,
and the convolution identity tells us that
The fact that the formula for y in equation set (27.11) is the solution to
is often called Duhamel’s principle. The function H (s) is usually referred to as the transfer
function, and its inverse transform, h(t) , is usually called the impulse response function.1 Keep
in mind that a , b and c are constants, and that we assumed f is Laplace transformable.
1 The reason why h is called the “impulse response function” will be revealed in chapter 29. A few authors also
refer to h as a “weight” function.
Additional Exercises 545
As illustrated in our example, Duhamel’s principle makes it easy to write down solutions to
the given initial-value problem once we have found h . This is especially useful if we need to
find solutions to
ay ′′ + by ′ + cy = f (t) with y(0) = 0 and y ′ (0) = 0
for a number of different choices of f .
Bur why stop at second-order problems? It should be clear that the above differential equation
did not have to be second order. A completely analogous derivation can be done starting with
any nonhomogeneous linear differential equation with constant coefficients, provided all the
appropriate initial values are zero. Doing so, leads to the following theorem:
In practice, use whichever appears easier to compute given the h and f involved. In the
examples here, we used the first. Later, when we re-examine “resonance” in mass/spring
systems (section 28.7), we will use the other integral formula.
2. It turns out that the f (t) in Duhamel’s principle (as described above) does not have
to be Laplace transformable. It can be shown that the formula y = h ∗ f satisfies the
initial-value problem whenever the convolution is well defined. This allows, for example,
f to be any piecewise continuous function.
3. It is not hard to show that, if you want the solution to
a0 y (N ) + a1 y (N −1) + · · · + a N −2 y ′′ + a N −1 y ′ + a N y = f (t) ,
but satisfying nonzero initial conditions, then you simply need to add the solution obtained
by Duhamel’s principle to the solution to the corresponding homogeneous differential
equation
a0 y (N ) + a1 y (N −1) + · · · + a N −2 y ′′ + a N −1 y ′ + a N y = 0
that satisfies the desired initial conditions.
546 Convolution and Laplace Transforms
Additional Exercises
27.2. Compute the convolution f ∗ g(t) of each of the following pairs of functions:
√
a. f (t) = e3t and g(t) = e5t b. f (t) = t and g(t) = t 2
√
c. f (t) = t and g(t) = 6 d. f (t) = t and g(t) = e3t
e. f (t) = t 2 and g(t) = t 2 f. f (t) = sin(t) and g(t) = t
g. f (t) = sin(t) and g(t) = sin(t) h. f (t) = step3 (t) and g(t) = e2t
i. f (t) = step3 (t) and g(t) = t 2
27.3. Verify the associative property of convolution. That is, verify equation (27.5) on page
536.
27.4. Using convolution, compute the inverse Laplace transform of each of the following:
1 1 1
a. b. c.
(s − 4)(s − 3) s(s − 3) s(s 2 + 4)
1 1 s2
d. e. f.
(s − 3)(s 2 + 1) (s 2 + 9)2 (s 2 + 4)2
e−4s
g.
s(s 2 + 1)
27.5. For each of the following initial-value problems, find the corresponding transfer function
H and the impulse response function h , and write down the corresponding convolution
integral formula for the solution:
a. y ′′ + 4y = f (t) with y(0) = 0 and y ′ (0) = 0