logo

Solving Second-Order Linear Nonhomogeneous Differential Equations Using Laplace Transforms 📂Odinary Differential Equations

Solving Second-Order Linear Nonhomogeneous Differential Equations Using Laplace Transforms

Theorem1

$$ ay^{\prime \prime} + by^{\prime} + cy = g(t) $$

Let us assume that the above second-order linear inhomogeneous differential equation is given. And let’s say $\mathcal{L} \left\{ y \right\} =Y(s)$, $\mathcal{L} \left\{ g(t) \right\}=G(s)$. Then,

$$ Y(s) = \dfrac{ (as + b)y(0) + ay^{\prime}(0) } {as^2+bs+c} + \dfrac{G(s) }{as^2+bs+c} $$

Explanation

The above formula is easy to memorize if you remember the rules well. If you memorize according to the rules, you can easily memorize the general formula including the cases of the third and fourth order. The result can be easily derived if you know the result of the Laplace transform of the n-th order derivative. If you know the initial conditions $y(0)$ and $y^{\prime}(0)$, you can find the exact solution. Also, by using the Laplace transform of the n-th order derivative, it is possible to solve the third and fourth order differential equations.

Proof

All we have to do is take the Laplace transform of the given differential equation $ay^{\prime \prime} + by^{\prime} + cy = g(t)$ on both sides and arrange it for $Y(s)$.

Laplace transform of a derivative

$$ \begin{align*} \mathcal{L} \left\{ f^{\prime}(t) \right\} &= s\mathcal{L} \left\{ f(t) \right\} -f^{\prime}(0) \\ \mathcal{L} \left\{ f^{\prime \prime}(t) \right\} &= s^2\mathcal{L} \left\{ f(t) \right\} -sf(0) -f^{\prime}(0) \end{align*} $$

$$ \begin{align*} && a\left[ s^2Y(s) -sy(0) -y^{\prime}(0) \right] +b\left[ sY(s) -y(0) \right] +cY(s) = G(s) \\ \implies && (as^2+bs+c)Y(s) - (as+b)y(0) -ay^{\prime}(0) = G(s) \\ \implies && (as^2+bs+c)Y(s) = (as+b)y(0) + ay^{\prime}(0) + G(s) \\ \implies && Y(s) =\dfrac{(as+b)y(0) +ay^{\prime}(0)}{as^2+bs+c} + \dfrac{G(s)}{as^2+bs+c} \end{align*} $$

Example

1

Solve the given initial value problem as follows.

$$ y^{\prime \prime}-y^{\prime}-2y=0,\quad y(0)=1,\quad y^{\prime}(0)=0 $$

By substituting each constant and initial condition into the formula,

$$ \begin{align*} Y(s) &= \dfrac{s-1}{s^2-s-2} \\ &=\dfrac{s-1}{(s-2)(s+1)} \\ &= \dfrac{1}{3}\dfrac{1}{s-2} + \dfrac{2}{3}\dfrac{1}{s+1} \end{align*} $$

Since $\mathcal{L^{-1}} \left\{ \dfrac{1}{s-a} \right\}=e^{at}$,

$$ y(t)=\dfrac{1}{3}e^{2t} + \dfrac{2}{3}e^{-t} $$

2

Solve the given initial value problem as follows.

$$ y^{\prime \prime}+y=\sin (2t),\quad y(0)=2,\quad y^{\prime}(0)=1 $$

By substituting each constant and initial condition into the formula,

$$ \begin{align*} Y(s)&=\dfrac{2s+1}{s^2+1} + \dfrac{1}{s^2+1}\dfrac{2}{s^2+2^2} \\ &=2\dfrac{s}{s^2+1}+\dfrac{1}{s^2+1}+\dfrac{2}{3}\dfrac{1}{s^2+1}-\dfrac{1}{3}\dfrac{2}{s^2+2^2} \\ &= 2\dfrac{s}{s^2+1}+\dfrac{5}{3}\dfrac{1}{s^2+1}-\dfrac{1}{3}\dfrac{2}{s^2+2^2} \end{align*} $$

Since $\mathcal{L^{-1}} \left\{ \dfrac{s}{s^2+a^2} \right\}=\cos (at)$, $\mathcal{L^{-1}} \left\{ \dfrac{a}{s^2+a^2} \right\}=\sin (at)$,

$$ y(t)=2\cos t + \dfrac{5}{3}\sin t -\dfrac{1}{3}\sin (2t) $$


  1. William E. Boyce, Boyce’s Elementary Differential Equations and Boundary Value Problems (11th Edition, 2017), p250-251 ↩︎