The Laplace Transform
The Laplace transform turns a function of time into a function of a new variable :
Its power lies in one property: it turns differentiation into multiplication by . A linear ODE with constant coefficients becomes an algebraic equation, solved with ordinary algebra, and transformed back. It also handles switched-on forces and impulses gracefully, which is why engineers use it for circuits and control.
Basic transforms
Compute : for . The integral only converges for large enough , which is normal: we only need for large .
| valid for | ||
|---|---|---|
| (shifting in ) | ||
import sympy as sp
t, s = sp.symbols("t s", positive=True)
w, a = sp.symbols("omega a", positive=True)
for f in (sp.Integer(1), t**3, sp.exp(-2 * t), sp.sin(w * t), sp.cos(w * t), sp.exp(-a * t) * sp.sin(3 * t)):
print(f"L{{{f}}} =", sp.laplace_transform(f, t, s, noconds=True))L{1} = 1/s
L{t**3} = 6/s**4
L{exp(-2*t)} = 1/(s + 2)
L{sin(omega*t)} = omega/(omega**2 + s**2)
L{cos(omega*t)} = s/(omega**2 + s**2)
L{exp(-a*t)*sin(3*t)} = 3/((a + s)**2 + 9)
Linearity
, because the integral is linear. So .
The derivative rule
Integration by parts gives
Initial conditions enter automatically. This is the rule that makes the transform solve ODEs (Solving ODEs with the Laplace Transform).
import sympy as sp
t, s = sp.symbols("t s", positive=True)
f = sp.exp(-t) * sp.cos(2 * t)
F = sp.laplace_transform(f, t, s, noconds=True)
lhs = sp.laplace_transform(f.diff(t), t, s, noconds=True)
print("L{f'} =", sp.simplify(lhs))
print("s F(s) - f(0) =", sp.simplify(s * F - f.subs(t, 0)))L{f'} = (-s - 5)/((s + 1)**2 + 4)
s F(s) - f(0) = (-s - 5)/(s**2 + 2*s + 5)
The two denominators are the same polynomial, .
Existence
The transform exists when is piecewise continuous and of exponential order: for large . Every function in this course qualifies; does not.
Numerical check
The defining integral can be computed numerically, a good sanity check on a table entry:
import numpy as np
from scipy.integrate import quad
s = 2.0
F_num, _ = quad(lambda t: np.exp(-s * t) * np.sin(3 * t), 0, np.inf, limit=200)
print(f"numeric {F_num:.10f}, table 3/(s^2 + 9) = {3 / (s**2 + 9):.10f}")numeric 0.2307692308, table 3/(s^2 + 9) = 0.2307692308
In software
- Control-system tools (
scipy.signal, MATLAB's Control System Toolbox) describe systems by their Laplace-domain transfer functions (Transfer Functions and Stability). - The discrete cousin, the -transform, is how digital filters in audio software are designed.
Exercises
Exercise 1: From the table
Find .
Answer
.
Solution
and ; use linearity.
Exercise 2: By definition
Compute from the integral.
Answer
.
Solution
By parts with , : .
Exercise 3: Shifting (code)
Use the -shift rule to find and confirm with SymPy.
Answer
.
Solution
; multiplying by replaces by .
import sympy as sp
t, s = sp.symbols("t s", positive=True)
print(sp.laplace_transform(t * sp.exp(3 * t), t, s, noconds=True))(s - 3)**(-2)
Test yourself
is…
equals…
Why does the Laplace transform help solve linear ODEs?
- It removes all constants
- It turns derivatives into multiplication by , so the ODE becomes algebra
- It makes equations nonlinear
- It works only for first-order equations