Inverse Transforms and Partial Fractions
After solving for , we must get back to . The inverse Laplace transform undoes : for continuous functions the transform is one-to-one (Lerch's theorem), so reading the table backwards is legitimate. The work is to rewrite as a sum of table entries, almost always with partial fractions.
Partial fractions in three cases
A rational function with splits according to the factors of :
| Factor of | Terms | Inverse |
|---|---|---|
These are exactly the solution types of constant-coefficient ODEs: the roots of are the characteristic roots.
Example: distinct real roots
Cover-up: and . So .
import sympy as sp
t, s = sp.symbols("t s", positive=True)
F = (s + 7) / (s**2 - s - 6)
print("apart:", sp.apart(F, s))
print("inverse:", sp.inverse_laplace_transform(F, s, t))apart: -1/(s + 2) + 2/(s - 3)
inverse: 2*exp(3*t) - exp(-2*t)
Example: complex roots
. Complete the square: . Write the numerator in terms of : . So
import sympy as sp
t, s = sp.symbols("t s", positive=True)
F = (2 * s + 3) / (s**2 + 4 * s + 13)
f = sp.inverse_laplace_transform(F, s, t)
print(f)
print("transform back:", sp.simplify(sp.laplace_transform(f, t, s, noconds=True) - F) == 0)-exp(-2*t)*sin(3*t)/3 + 2*exp(-2*t)*cos(3*t)
transform back: True
Example: a repeated root
, so the inverse is .
Numerically: residues
For large problems, the partial fractions come from the poles (roots of the denominator) and their residues. scipy.signal.residue computes them from polynomial coefficients:
import numpy as np
from scipy.signal import residue
r, p, k = residue([1, 7], [1, -1, -6]) # (s + 7) / (s^2 - s - 6)
for ri, pi in zip(r, p):
print(f"{ri.real:+.4f} / (s - ({pi.real:+.4f}))")-1.0000 / (s - (-2.0000))
+2.0000 / (s - (+3.0000))
In software
scipy.signal.residueandinvresconvert between transfer functions and pole-residue form; circuit simulators use pole-residue models to fit measured frequency responses ("vector fitting").- Partial fractions also show up in probability (sums of exponential random variables) and in generating functions in combinatorics (Discrete Mathematics).
Exercises
Exercise 1: Cover-up
Find .
Answer
.
Solution
.
Exercise 2: Complete the square
Find .
Answer
.
Solution
and .
Exercise 3: Repeated root (code)
Find by hand and with SymPy.
Answer
.
Solution
.
import sympy as sp
t, s = sp.symbols("t s", positive=True)
print(sp.apart((s + 3) / (s + 1)**2, s), "|", sp.inverse_laplace_transform((s + 3) / (s + 1)**2, s, t))1/(s + 1) + 2/(s + 1)**2 | 2*t*exp(-t) + exp(-t)
Test yourself
is…
A denominator factor produces which kind of terms?
- and
- and
The poles of for a constant-coefficient ODE are…
- unrelated to the ODE
- the characteristic roots (and roots coming from the forcing)
- always real
- always zero