TExcelTAD
Home › Differential Equations › Inverse Transforms and Partial Fractions

Inverse Transforms and Partial Fractions

After solving for Y(s)Y(s), we must get back to y(t)y(t). The inverse Laplace transform L−1\mathcal{L}^{-1} undoes L\mathcal{L}: for continuous functions the transform is one-to-one (Lerch's theorem), so reading the table backwards is legitimate. The work is to rewrite Y(s)Y(s) as a sum of table entries, almost always with partial fractions.

Partial fractions in three cases

A rational function P(s)Q(s)\frac{P(s)}{Q(s)} with deg⁡P<deg⁡Q\deg P < \deg Q splits according to the factors of QQ:

Factor of Q(s)Q(s) Terms Inverse
s−as - a As−a\frac{A}{s - a} AeatAe^{at}
(s−a)2(s - a)^2 As−a+B(s−a)2\frac{A}{s - a} + \frac{B}{(s - a)^2} Aeat+BteatAe^{at} + Bte^{at}
(s−α)2+β2(s - \alpha)^2 + \beta^2 C(s−α)+Dβ(s−α)2+β2\frac{C(s - \alpha) + D\beta}{(s - \alpha)^2 + \beta^2} eαt(Ccos⁡βt+Dsin⁡βt)e^{\alpha t}(C\cos\beta t + D\sin\beta t)

These are exactly the solution types of constant-coefficient ODEs: the roots of Q(s)Q(s) are the characteristic roots.

Example: distinct real roots

s+7s2−s−6=s+7(s−3)(s+2)=As−3+Bs+2.\frac{s + 7}{s^2 - s - 6} = \frac{s + 7}{(s - 3)(s + 2)} = \frac{A}{s - 3} + \frac{B}{s + 2}.

Cover-up: A=3+73+2=2A = \frac{3 + 7}{3 + 2} = 2 and B=−2+7−2−3=−1B = \frac{-2 + 7}{-2 - 3} = -1. So L−1=2e3t−e−2t\mathcal{L}^{-1} = 2e^{3t} - e^{-2t}.

python · try it yourself
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

2s+3s2+4s+13\frac{2s + 3}{s^2 + 4s + 13}. Complete the square: s2+4s+13=(s+2)2+9s^2 + 4s + 13 = (s + 2)^2 + 9. Write the numerator in terms of s+2s + 2: 2s+3=2(s+2)−1=2(s+2)−13⋅32s + 3 = 2(s + 2) - 1 = 2(s + 2) - \frac{1}{3}\cdot 3. So

L−1{2s+3(s+2)2+9}=e−2t(2cos⁡3t−13sin⁡3t).\mathcal{L}^{-1}\left\{\frac{2s + 3}{(s + 2)^2 + 9}\right\} = e^{-2t}\left(2\cos 3t - \tfrac{1}{3}\sin 3t\right).
python · try it yourself
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

1s(s+1)2=1s−1s+1−1(s+1)2\frac{1}{s(s + 1)^2} = \frac{1}{s} - \frac{1}{s + 1} - \frac{1}{(s + 1)^2}, so the inverse is 1−e−t−te−t1 - e^{-t} - te^{-t}.

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:

python · try it yourself
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.residue and invres convert 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 L−1{4s(s+2)}\mathcal{L}^{-1}\left\{\frac{4}{s(s + 2)}\right\}.

Answer

2−2e−2t2 - 2e^{-2t}.

Solution

4s(s+2)=2s−2s+2\frac{4}{s(s + 2)} = \frac{2}{s} - \frac{2}{s + 2}.

Exercise 2: Complete the square

Find L−1{ss2+2s+5}\mathcal{L}^{-1}\left\{\frac{s}{s^2 + 2s + 5}\right\}.

Answer

e−t(cos⁡2t−12sin⁡2t)e^{-t}\left(\cos 2t - \frac{1}{2}\sin 2t\right).

Solution

s2+2s+5=(s+1)2+4s^2 + 2s + 5 = (s + 1)^2 + 4 and s=(s+1)−12⋅2s = (s + 1) - \frac{1}{2} \cdot 2.

Exercise 3: Repeated root (code)

Find L−1{s+3(s+1)2}\mathcal{L}^{-1}\left\{\frac{s + 3}{(s + 1)^2}\right\} by hand and with SymPy.

Answer

e−t+2te−te^{-t} + 2te^{-t}.

Solution

s+3(s+1)2=(s+1)+2(s+1)2=1s+1+2(s+1)2\frac{s + 3}{(s + 1)^2} = \frac{(s + 1) + 2}{(s + 1)^2} = \frac{1}{s + 1} + \frac{2}{(s + 1)^2}.

python · try it yourself
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

L−1{3s−5}\mathcal{L}^{-1}\left\{\frac{3}{s - 5}\right\} is…

  1. 3e−5t3e^{-5t}
  2. 3e5t3e^{5t}
  3. 5e3t5e^{3t}
  4. 3sin⁡5t3\sin 5t

A denominator factor (s+1)2+16(s + 1)^2 + 16 produces which kind of terms?

  1. e−tcos⁡4te^{-t}\cos 4t and e−tsin⁡4te^{-t}\sin 4t
  2. ete^{t} and e16te^{16t}
  3. te−tte^{-t}
  4. cos⁡16t\cos 16t

The poles of Y(s)Y(s) for a constant-coefficient ODE are…

  1. unrelated to the ODE
  2. the characteristic roots (and roots coming from the forcing)
  3. always real
  4. always zero