Solve ODEs with Laplace Transforms – Worked Examples

Core algebraic rules (compact)

The standard substitutions for unilateral Laplace transforms are:

  • ℒ{f'(t)} = sF(s) − f(0⁺).
  • ℒ{f''(t)} = s²F(s) − s f(0⁺) − f'(0⁺).
  • Time-shift: u(t−a)f(t−a) ↔ e^(−a s) F(s).
  • Linearity, convolution ℒ{f*g}=F(s)G(s), and frequency shift e^{a t}f(t) ↔ F(s−a).

A compact Laplace table and worked partial-fraction patterns are essential; authoritative tables and worked examples are available from course material and online references such as MIT OpenCourseWare — Differential Equations and Paul’s Online Math Notes.

Method outline for ODEs

  1. Take unilateral Laplace transforms of both sides of the ODE, using initial conditions explicitly.
  2. Rearrange the resulting algebraic equation to solve for the unknown transform Y(s).
  3. Decompose Y(s) into canonical pieces by partial fractions, time shifts, or known transforms.
  4. Invert termwise with a table or a symbolic inverse routine; if needed, use numeric inversion.
  5. Validate by forward-transforming the obtained y(t) and verifying the original Y(s) at representative s-values.

Software that supports laplace transform step-by-step or a laplace transform calculator online helps validate intermediate algebra and numerical inversions.

Worked Example 1 — First-order forced ODE

Solve

y'(t) + 3y(t) = sin t, y(0)=2.

Step 1 (transform). Let Y(s)=ℒ{y(t)}. Apply rules:

sY(s) − y(0) + 3Y(s) = ℒ{sin t} = 1/(s²+1).

Insert y(0)=2:

(s+3)Y(s) − 2 = 1/(s²+1).

Step 2 (algebra).

Y(s) = 2/(s+3) + 1/((s+3)(s²+1)).

Step 3 (partial fractions). Decompose

1/((s+3)(s²+1)) = A/(s+3) + (Bs + C)/(s²+1).

Solving yields A = 1/10, B = −1/10, C = 3/10, so

Y(s) = (21/10)/(s+3) + (−(1/10)s + 3/10)/(s²+1).

Step 4 (invert). Use table entries:

  • ℒ⁻¹{1/(s+3)} = e^{−3t}.
  • ℒ⁻¹{s/(s²+1)} = cos t, ℒ⁻¹{1/(s²+1)} = sin t.

Therefore

y(t) = (21/10)e^{−3t} − (1/10)cos t + (3/10)sin t.

This result can be checked by forward transformation or by using a laplace transform practice solver or symbolic engine.

Worked Example 2 — Second-order with unit step forcing

Solve

y'' + 4y = u(t−1), y(0)=0, y'(0)=0,

where u(t−1) is the unit step delayed by 1.

Step 1 (transform).

s²Y(s) + 4Y(s) = ℒ{u(t−1)} = e^{−s}/s,

so

Y(s) = e^{−s}/(s(s²+4)).

Step 2 (time-shift inversion). Recognise Y(s)=e^{−s}G(s) with G(s)=1/(s(s²+4)). Invert G(s) first, then apply the time shift: y(t) = u(t−1) g(t−1) where g = ℒ⁻¹{G}.

Step 3 (partial fractions for G).

1/(s(s²+4)) = A/s + (Bs + C)/(s²+4)

Solving gives A = 1/4, B = −1/4, C = 0, so

g(t) = 1/4 − (1/4)cos(2t).

Apply time shift:

y(t) = u(t−1) [1/4 − (1/4)cos(2(t−1))].

This causal response matches the expected delayed-step behaviour and can be validated with a laplace s-domain calculator or symbolic check.

When analytic inversion is infeasible: numeric inversion

If Y(s) resists closed-form partial-fraction inversion, numeric inversions are the operational path. Common algorithms include:

  • Gaver–Stehfest — light-weight weighted-sum method (sensitive to rounding).
  • Talbot’s method — contour deformation for robust Bromwich integral evaluation.
  • Abate–Whitt / Fourier-series variants — series-based inversions with controlled error, useful for probability-distribution inversions.

For production code prefer vetted library implementations of Talbot or Abate–Whitt; for quick verification use an inverse laplace transform solver or a laplace transform calculator online such as Wolfram|Alpha or Symbolab.

Tools and verification

  • Symbolic: Mathematica (Wolfram Mathematica) and SymPy (SymPy) support exact inversions.
  • Numeric: numerical libraries implement Talbot and Abate–Whitt; use those for nonrational transforms or complex kernels.
  • Online: use a laplace transform step-by-step or a laplace transform practice solver to validate manual calculations and a laplace transform calculator online for rapid checks.

Practical verification workflow

  1. Apply Laplace transform to the ODE and solve for Y(s).
  2. Attempt analytic inversion via partial fractions and a laplace transform table lookup (see Paul’s Online Math Notes).
  3. If necessary, use a numeric inversion routine and validate by forward re-transformation of the computed y(t).

Final Considerations

Solving ODEs with Laplace transforms is an engineering trade-off: algebraic inversion (partial fractions and residues) delivers closed-form time responses at modest manual cost, while numeric inversion trades compute resources for generality. For typical initial-value problems the recommended approach is a compact transform table plus partial-fraction inversion, aided by symbolic verification. Keep a numeric inversion routine available for noncanonical transforms, and confirm numeric inversions by forward re-transformation. For reproducible work use symbolic libraries (SymPy, Mathematica) or validated numeric libraries, and support learning with a laplace transform practice solver or a laplace transform step-by-step tool.