Laplace transforms
The Laplace transform is one of many useful integral transforms that map a set of functions to other functions. The transform of f(t) is defined as
Note that we often use an uppercase version of the function's name to denote its transform (so for example, the Laplace transform of x(t) is written X(s)). Some versions of the Laplace transform integrate from -\infty to \infty instead, but in this text we will always consider the 'one-sided' transform integrating from 0 to \infty.
Let us consider the simplest possible examples first.
- What is the transform of the identically 0 function? It is simply 0, since a definite integral of 0 is 0.
While simple, this is a very important property, a part of the fact that the Laplace transform is a linear transformation of function spaces.
- The next simplest function to transform is the constant function f(t)=1:
although we must assume that s>0 for the integral to converge. We will often have to make some assumptions about the domain of the transform function in the s-variable, but this will not be important in using the transform to solve ODEs.
- Now let's compute the Laplace transform of a whole family of functions, positive integral powers of t^n such as t, t^2, t^3, et cetera. The key technique, which comes up over and over again with Laplace transforms, is to use integration by parts:
and again if we assume that s > 0 this becomes
which means we can use induction to get
for all integer n \ge 0. (Recall that 0! is defined to be 1.)
The inductive argument only works for non-negative integral powers of t, but a similar formula holds for real exponents if we use the Gamma function (\Gamma):
The \Gamma function generalizes the factorial, in that \Gamma(n+1) = n! for non-negative integers n. It can be defined through the integral
The \Gamma function has many interesting properties (many of which are discussed on its Wikipedia page); for example the reflection property (Euler's reflection formula):
which implies as a special case
The \Gamma function also satisfies the recursive formula
Linearity of the Laplace Transform
It is extremely important to understand that the Laplace transform is linear. If c_1 and c_2 are constants and f_1(t) and f_2(t) are functions, then the linearity of integration means
In particular the linearity of the Laplace transform combined with our formula for the transform of t^n means we can transform any polynomial, for example:
Exercises
- Compute the Laplace transform F(s) of f(t) = 2\sqrt{t} - 5e^{3t}.
Solving ODEs with the Laplace transform
Laplace transforms of derivatives
One of the most important properties of the Laplace transform is how it affects derivatives of functions. If f(t) is differentiable function, then we can write the Laplace transform of f in terms of the transform of f using integration by parts:
where as usual we have assumed that s > 0 and f(t) does not grow too quickly so that f(t)e^{-st} has a limit of 0 as t \rightarrow \infty.
We can repeat the same process of integrating by parts to get similar formulas for any order of derivative; we will only need the second order version in what follows:
Because the Laplace transform changes derivatives into powers of the new variable s, we can transform ODEs into algebraic problems.
Table of Laplace Transforms
Many Laplace transforms are known; the table below lists some of the most common and useful ones.
Example: scalar ODE with the Laplace transform
We will solve the ODE
with initial conditions x(0) = 2 and x'(0) = -1. On the left-hand side we can distribute the transform (using the linearity of the Laplace transorm)
and the right-hand side is simply \mathcal{L}(3) = \frac{3}{s}. It is convenient to use the variable X = \mathcal{L}(x), and in general capital letters are often used to denote transforms of lower-case variables.
Now we can regroup the terms and solve for the transform X:
We can divide by s^2 - s and use a common denominator:
In order to find the solution x(t) we need to invert the Laplace transform. The easiest way to do this is to decompose the transform into pieces we know the inverse for, which requires partial fraction decomposition:
Recall that for this partial fraction decomposition to be true, we need to be able to reconstruct the left-hand side from the right-hand side by forming a common denominator. To do this the first term would be multiplied on the top and bottom by s(s-1)), the second term by (s-1), and the third term by s^2. Then the numerators would have to be equal:
This equation must be true for all values of s, which means the coefficients of each power of s must be equal for both sides of the equation. This gives us the constraints A + C = 2, -A + B = -3, and -B = 3. So B = -3, A = 0, and C = 2:
Since \mathcal{L}(1) = 1/s, and \mathcal{L}(t) = 1/s^2, and \mathcal{L}(e^{kt}) = 1/(s-k), we can invert each term to get
Exercise
- Solve the initial value problem x'' + x' - 2x = t, x(0) = x'(0) = 0 using the Laplace transform. If you have time, check your work using other methods (characteristic equation and undetermined coefficients). A table of some Laplace transforms is given on the back of this sheet.
Laplace transforms of periodic functions
A function is periodic with period p>0 if f(t+p) = f(t) for every t. Usually we want to use the smallest possible value of p when describing the period (if f is periodic with period p, it is also periodic with period 2p, 3p, et cetera). Periodic functions arise very commonly in applications, so it is fortunate that we have a nice formula for the Laplace transform of a periodic function.
Assuming that f is periodic with period p we begin by splitting the Laplace transform of f into a sum over each period:
For each of these integrals in the sum we can change variables with a simple linear shift: for the jth integral we shift to u = t - p j, giving us
and now all of the integrals are from 0 to p. We can rename u back to t, and combine the integrals to get
where in the second step we have pulled out the part of the sum which depends on j, which is fortunately also independent of u. This sum can be written in a compact form using the geometric sum formula:
and the fact that e^{-jsp} = (e^{-sp})^j, so
and we get our formula for the Laplace transform of a periodic f:
Example: Square Wave Laplace Transform
We will use the above method on the particular example of finding the transform of a square wave with period 4 and amplitude 3, shown below.
We need to compute the integral
where in the second equality step we are using the fact that f(t)=0 for the second half of its period.
The final transform value is
$$ \mathcal{L}(f) = \frac{1}{1 - e^{-sp}} \int_{0}^{p} e^{-st} f(t) dt = \frac{3 (1 - e^{-2s})}{s(1 - e^{-4s})} $$
Exercise
- Find the Laplace transform of the function f(t) if it is periodic with period 2 and f(t) =e^{-t} \ \text{for} \ t \in [0,2).
Systems of 1st order ODEs with the Laplace transform
We can also solve systems of ODEs with the Laplace transform, which turns them into algebraic systems. Unfortunately solving the algebraic systems and then inverting the transform is not usually any easier than using the eigenvector/eigenvalue method. But sometimes the transformed system can yield qualitative information about the system's behavior without requiring the complete explicit solution.
Let's look at a relatively simple example with two independent variables:
Example: 2D system of ODEs with the Laplace transform
Compute the solution to the initial value problem:
with initial conditions x(0) = 0 and y(0) = 0.
For brevity we will denote the Laplace transforms of x(t) and y(t) by X and Y. We can transform both equations to get
or after moving all of the X and Y to the left-hand side:
For larger problems it may be helpful to write the system in matrix form; here this would be
We can use the first equation to eliminate Y: Y = \frac{s+2}{3} X. Then the second equation becomes
which we can clean up and solve for X:
To invert this transform we need to decompose it with partial fractions:
where the A, B, and C must satisfy
This is easiest to solve by substituting in particular values of s, namely s=0, s=4, and s=-4. (This is a very good technique when all of the factors in the denominator are distinct.) We get A=\frac{-3}{32}, B=\frac{-3}{32}, and C=\frac{3}{16}. Using the exponential and power Laplace transforms we determine that
To find y we could repeat this procedure, or we can use the original differential equation x' = -2 x + 3 y to solve for y = \frac{1}{3}( x' + 2x). Since we know x, we just have to compute its derivative and substitute it in to get
Exercise
-
Use the Laplace transform method to solve the initial value problem
x' = x + 2y,y' = x + e^{t},x(0) = 0, \ \ y(0) = 0.(Note that once you find either x(t) or y(t), the other can be computed from the system of ODEs.)
Smooth Operator: the Heaviside and Dirac functions
One of the great advantages of the Laplace transform is that smoothes out discontinuities. We have already seen this with the periodic square wave, which can be thought of as being composed of steps up and steps down. The unit step function u_a(t), which is also called the Heaviside function after the electrical engineer Oliver Heaviside, is defined to be 0 for t < a and 1 for t \ge a. Its Laplace transform is
where as usual we restrict the domain to s < 0 for the integral to converge. The input function u_a has a step discontinuity, but the transform e^{-sa} is infinitely differentiable as a function of s.
An even more extreme case is that of the Dirac delta function, named after the physicist Paul Adrian Maurice Dirac. It is not really a function, but it can be defined as a limit of functions. It is called a distribution, which are generalizations of functions which behave nicely when integrated (or more precisely, distributions are linear functions of functions).
The Dirac delta `function' represents a unit impulse delivered instantaneously. It can be thought of as a limit of finite-duration unit impulses, for example the family of functionss
This family does not converge to a function as b \rightarrow 0, but it does inside an integral. That is what is denoted by the Dirac delta function:
The bounds of the integrals just need to include the point t=a.
For the Laplace transform, the function f(t) = e^{-st} and we have
The Laplace transforms even smoothes out the Dirac delta function (not even an actual function!) to an infinitely differentiable function of s.
Additional Exercises
-
Compute the Laplace transform of the function
v(t) = \left \{ \begin{array}{l} 1 \ \text{for} \ t \in [0,1] \\ 0 \ \text{for} \ t \in (-\infty, 0) \ \text{and} \ t \in (1, \infty) \end{array} \right.directly from the definition \mathcal{L}(v) = \int_0^{\infty} e^{-st} v(t) dt.
-
Compute the Laplace transform of f(t) = \sqrt{t} e^{3t}.
-
Use the Laplace transform method to solve the initial value problem x'' - x' - 2x = 0, x(0) = 0, x'(0) = 1.
-
Use the Laplace transform method to solve the initial value problem x' = 2x - y, y' = 3x + 4, x(0) = 0, y(0) = 1.
-
Compute the Laplace transform of the sawtooth function f(t) = t - \lfloor t \rfloor where \lfloor t \rfloor is the floor function. The floor of t is the largest integer less than or equal to t. For example, \lfloor 2.6 \rfloor = 2.
Notes
Notes: (Local storage in a cookie)
License
This work (text, mathematical images, and javascript applets) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Biographical images are from Wikipedia and have their own (similar) licenses.