Why Laplace transforms solve differential equations
Before you start: you need the Laplace transform table and the inverse Laplace transform with partial fractions.
With \(Y(s) = \mathcal{L}\{y(t)\}\):
\[\mathcal{L}\{y'\} = sY - y(0)\]
\[\mathcal{L}\{y''\} = s^2Y - s\,y(0) - y'(0)\]
Take an initial value problem such as \(y'' + 4y = 0\), \(y(0) = 1\), \(y'(0) = 2\). Transform every term and the derivatives disappear: what is left is an ordinary equation in \(Y\). Solve it for \(Y\), invert, and you have \(y(t)\).
Compare this with the classical method in higher-order linear differential equations, where you find a complementary function, then a particular integral, then use the initial conditions to fix the constants. Here the initial conditions go in at the very first step, and there are no arbitrary constants to find at the end. The method works for linear equations with constant coefficients and for forcing terms that have a Laplace transform, including ones with jumps.
The method
- Take the Laplace transform of both sides. Write \(Y\) for \(\mathcal{L}\{y\}\) and use the derivative formulas.
- Put in the initial conditions \(y(0)\) and \(y'(0)\).
- Solve for \(Y\) as a single fraction or a sum of fractions.
- Split into partial fractions (or complete the square).
- Invert term by term to get \(y(t)\).
- Check that your answer gives the right \(y(0)\). It takes ten seconds and catches most slips.
| Term in the equation | Its transform |
|---|---|
| \(y\) | \(Y\) |
| \(y'\) | \(sY - y(0)\) |
| \(y''\) | \(s^2Y - s\,y(0) - y'(0)\) |
| a constant \(k\) | \(\dfrac{k}{s}\) |
| \(t\) | \(\dfrac{1}{s^2}\) |
| \(e^{at}\) | \(\dfrac{1}{s-a}\) |
| \(\sin bt\) | \(\dfrac{b}{s^2+b^2}\) |
| \(u(t - a)\) | \(\dfrac{e^{-as}}{s}\) |
Notice what multiplies \(Y\) after step 3. For \(y'' + py' + qy\) it is always \(s^2 + ps + q\), the same polynomial as the auxiliary equation \(m^2 + pm + q = 0\) in the classical method. Its roots decide the shape of the answer: real roots give exponentials, complex roots give \(e^{\alpha t}\cos\beta t\) and \(e^{\alpha t}\sin\beta t\).
Solved examples
Example 1: First order, no forcing
EasySolve \(y' + 2y = 0\), \(y(0) = 3\).
- Transform: \(sY - 3 + 2Y = 0\).
- Solve: \(Y = \dfrac{3}{s+2}\).
- Invert: \(y = 3e^{-2t}\). Check: \(y(0) = 3\). ✓
Answer\(y = 3e^{-2t}\)
Example 2: First order with a forcing term
EasySolve \(y' + 2y = e^{-t}\), \(y(0) = 2\).
- Transform: \(sY - 2 + 2Y = \dfrac{1}{s+1}\), so \((s+2)Y = 2 + \dfrac{1}{s+1}\).
- \(Y = \dfrac{2}{s+2} + \dfrac{1}{(s+1)(s+2)}\), and \(\dfrac{1}{(s+1)(s+2)} = \dfrac{1}{s+1} - \dfrac{1}{s+2}\).
- So \(Y = \dfrac{1}{s+1} + \dfrac{1}{s+2}\). Check: \(y(0) = 1 + 1 = 2\). ✓
Answer\(y = e^{-t} + e^{-2t}\)
Example 3: Second order, simple harmonic
MediumSolve \(y'' + 4y = 0\), \(y(0) = 1\), \(y'(0) = 2\).
- Transform: \(s^2Y - s(1) - 2 + 4Y = 0\).
- So \((s^2+4)Y = s + 2\) and \(Y = \dfrac{s}{s^2+4} + \dfrac{2}{s^2+4}\).
- Invert: \(\cos 2t + \sin 2t\). Check: \(y(0) = 1\), \(y'(0) = 2\). ✓
Answer\(y = \cos 2t + \sin 2t\)
Example 4: Complex roots
MediumSolve \(y'' + 2y' + 5y = 0\), \(y(0) = 1\), \(y'(0) = 0\).
- Transform: \(s^2Y - s + 2(sY - 1) + 5Y = 0\), so \((s^2 + 2s + 5)Y = s + 2\).
- Complete the square: \(s^2 + 2s + 5 = (s+1)^2 + 4\), and \(s + 2 = (s+1) + 1\).
- \[Y = \frac{s+1}{(s+1)^2+4} + \frac{1}{(s+1)^2+4}\]
- Invert: \(e^{-t}\cos 2t + \tfrac{1}{2}e^{-t}\sin 2t\).
Answer\(y = e^{-t}\left(\cos 2t + \dfrac{1}{2}\sin 2t\right)\)
Example 5: A polynomial forcing term
MediumSolve \(y'' + y = t\), \(y(0) = 1\), \(y'(0) = -2\).
- Transform: \(s^2Y - s + 2 + Y = \dfrac{1}{s^2}\).
- \(Y = \dfrac{s - 2}{s^2+1} + \dfrac{1}{s^2(s^2+1)}\), and \(\dfrac{1}{s^2(s^2+1)} = \dfrac{1}{s^2} - \dfrac{1}{s^2+1}\).
- Collect: \(Y = \dfrac{s}{s^2+1} - \dfrac{3}{s^2+1} + \dfrac{1}{s^2}\).
- Invert: \(\cos t - 3\sin t + t\). Check: \(y(0) = 1\), and \(y'(0) = -3 + 1 = -2\). ✓
Answer\(y = t + \cos t - 3\sin t\)
Example 6: A repeated root in the answer
Exam levelSolve \(y'' - 3y' + 2y = 4e^{2t}\), \(y(0) = -3\), \(y'(0) = 5\).
- Transform: \(s^2Y + 3s - 5 - 3(sY + 3) + 2Y = \dfrac{4}{s-2}\).
- So \((s-1)(s-2)\,Y = -3s + 14 + \dfrac{4}{s-2}\), giving \[Y = \frac{-3s+14}{(s-1)(s-2)} + \frac{4}{(s-1)(s-2)^2}\]
- Cover-up on the first part: \(\dfrac{-11}{s-1} + \dfrac{8}{s-2}\).
- Second part: \(\dfrac{A}{s-1} + \dfrac{B}{s-2} + \dfrac{C}{(s-2)^2}\) with \(A = 4\), \(C = 4\), and \(A + B = 0\) from the \(s^2\) terms, so \(B = -4\).
- Total: \(Y = -\dfrac{7}{s-1} + \dfrac{4}{s-2} + \dfrac{4}{(s-2)^2}\).
- Check: \(y(0) = -7 + 4 = -3\). ✓
Answer\(y = -7e^{t} + 4e^{2t} + 4te^{2t}\)
Example 7: Resonance
Exam levelSolve \(y'' + 4y = \sin 2t\), \(y(0) = 0\), \(y'(0) = 0\).
- Transform: \((s^2 + 4)Y = \dfrac{2}{s^2+4}\), so \(Y = \dfrac{2}{(s^2+4)^2}\).
- From the inverse table, \(\mathcal{L}^{-1}\left\{\dfrac{1}{(s^2+a^2)^2}\right\} = \dfrac{\sin at - at\cos at}{2a^3}\). With \(a = 2\) that is \(\dfrac{\sin 2t - 2t\cos 2t}{16}\).
- Multiply by 2.
Answer\(y = \dfrac{\sin 2t - 2t\cos 2t}{8}\)
Example 8: A forcing term that switches on
Exam levelSolve \(y' + y = u(t - 1)\), \(y(0) = 0\).
- Transform: \((s + 1)Y = \dfrac{e^{-s}}{s}\), so \(Y = e^{-s}\cdot\dfrac{1}{s(s+1)}\).
- Without the \(e^{-s}\): \(\dfrac{1}{s(s+1)} = \dfrac{1}{s} - \dfrac{1}{s+1} \to 1 - e^{-t}\).
- Second shifting: replace \(t\) by \(t - 1\) and multiply by \(u(t - 1)\).
Answer\(y = \big(1 - e^{-(t-1)}\big)\,u(t - 1)\): zero up to \(t = 1\), then \(1 - e^{1-t}\)
Write the three transforms \(Y\), \(sY - y(0)\), \(s^2Y - sy(0) - y'(0)\) in the margin before you start, with the numbers already put in. Then the first line of your answer is copying, not thinking, and I almost never see a sign error from students who do this.
Common mistakes
1. A sign slip in \(\mathcal{L}\{y''\}\)
It is \(s^2Y - s\,y(0) - y'(0)\), with both terms subtracted. Writing \(+\,y'(0)\) in Example 3 gives \(Y = \dfrac{s - 2}{s^2+4}\) and the wrong answer \(\cos 2t - \sin 2t\).
2. Forgetting to transform a constant
In \(y' + y = 1\), the right side becomes \(\dfrac{1}{s}\), not \(1\). Leaving it as \(1\) means you have solved a different equation.
3. Dropping the unit step from the answer
In Example 8, writing \(y = 1 - e^{1-t}\) for all \(t\) is wrong: it gives \(y(0) = 1 - e \ne 0\). The \(u(t - 1)\) says the solution is zero until the forcing switches on.
Practice questions
Try each one on paper before you open the answer.
Q1Solve \(y' - 3y = 0\), \(y(0) = 2\).
\(sY - 2 - 3Y = 0\), so \(Y = \dfrac{2}{s-3}\) and \(y = 2e^{3t}\).
Q2Solve \(y' + y = 1\), \(y(0) = 0\).
\((s+1)Y = \dfrac{1}{s}\), so \(Y = \dfrac{1}{s} - \dfrac{1}{s+1}\) and \(y = 1 - e^{-t}\).
Q3Solve \(y'' - y = 0\), \(y(0) = 0\), \(y'(0) = 1\).
\(s^2Y - 1 - Y = 0\), so \(Y = \dfrac{1}{s^2-1}\) and \(y = \sinh t\).
Q4Solve \(y'' + 9y = 0\), \(y(0) = 2\), \(y'(0) = 3\).
\((s^2+9)Y = 2s + 3\), so \(Y = \dfrac{2s}{s^2+9} + \dfrac{3}{s^2+9}\) and \(y = 2\cos 3t + \sin 3t\).
Q5Solve \(y'' + 3y' + 2y = 0\), \(y(0) = 1\), \(y'(0) = 0\).
\((s^2 + 3s + 2)Y = s + 3\), so \(Y = \dfrac{s+3}{(s+1)(s+2)} = \dfrac{2}{s+1} - \dfrac{1}{s+2}\).
\(y = 2e^{-t} - e^{-2t}\).
Q6Solve \(y'' - 2y' + y = e^{t}\), \(y(0) = 0\), \(y'(0) = 0\).
\((s-1)^2Y = \dfrac{1}{s-1}\), so \(Y = \dfrac{1}{(s-1)^3}\) and \(y = \dfrac{t^2e^{t}}{2}\).
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
Why use Laplace transforms to solve differential equations?
The initial conditions are built in from the first line, so you never solve for arbitrary constants. Forcing terms with jumps, like \(u(t - a)\), are handled as easily as smooth ones.
What is the Laplace transform of y''?
\(\mathcal{L}\{y''\} = s^2Y(s) - s\,y(0) - y'(0)\), where \(Y(s) = \mathcal{L}\{y(t)\}\). For \(y'\) it is \(sY(s) - y(0)\).
Can Laplace transforms solve equations with variable coefficients?
Only some. A term like \(t\,y'\) can be handled with the multiplication-by-\(t\) rule, but it gives a differential equation in \(Y\), not an algebraic one. The method is at its best for constant coefficients.
What if the initial conditions are given at t = a instead of t = 0?
Shift the variable. Put \(\tau = t - a\), rewrite the equation in \(\tau\), so the conditions are at \(\tau = 0\), solve, and then substitute back \(\tau = t - a\).