How to Solve Differential Equations by Laplace Transform

Laplace Transform

This page explains how to solve differential equations using Laplace transform. We present detailed method, common patterns, and many examples.

Summary
  • A differential equation is solved by considering the Laplace transform of the equation, deriving the solution in $s$-domain, and then finding the inverse Laplace transform of the solution.
  • The inverse Laplace transform shows common patterns, so it is helpful to keep them in mind.
  • The common patterns also facilitate partial fractional decomposition within the procedure.
For Mobile Users
If the equation extends beyond the screen, please scroll it horizontally or hold your phone horizontally to view it.
Sponsered link

How to Solve Differential Equations by Laplace Transform

Laplace Transform Table

First, let’s review the major Laplace transforms you should remember as formulas.

Basic Properties Table

$t$-domain$s$-domainRemark
$af(t)+bg(t)$$aF(s)+bG(s)$Linearity
$\dot{f}(t)$$sF(s)-f(0)$Derivative
$\int_0 ^t f(\tau)d\tau$$\frac{1}{s}F(s)$Integral
$e^{at}f(t)$$F(s-a)$Frequency Shift

Basic Transformation Table

$t$-domain$s$-domainRemark
#1$t^n$$\frac{n!}{s^{n+1}}$This is the base.
#2$1$$\frac{1}{s}$#1 with $n=0$
#3$t$$\frac{1}{s^2}$#1 with $n=1$
#4$t^2$$\frac{2}{s^3}$#1 with $n=2$
#5$e^{at}$$\frac{1}{s-a}$#2 & Frequency Shift
#6$t^n e^{at}$$\frac{n!}{(s-a)^{n+1}}$#1 & Frequency Shift
$t$-domain$s$-domainRemark
#1$\sin\omega t$$\frac{\omega}{s^2+\omega ^2}$This is the base.
#2$\cos\omega t$$ \frac{s}{s^2+\omega ^2}$This is the base too.
#3$e^{at}\sin\omega t$$\frac{\omega}{(s-a)^2+\omega ^2}$#1 & Frequency Shift
#4$e^{at}\cos\omega t$$\frac{s-a}{(s-a)^2+\omega ^2}$#2 & Frequency Shift

Procedure for Solving Differential Equations

The procedure for solving differential equations using the above formulas can be summarized as follows:

  • Convert a problem into $s$-domain by applying Laplace transform to a differential equation.
  • Organize the equation and derive the solution in $s$-domain.
  • Carry out partial fraction decomposition of the obtained solution until it cannot be factorized further.
  • Obtain the solution in $t$-domain by applying inverse Laplace transform.
Procedure for solving differential equations using the Laplace transform
Sponsered link

Common Inverse Laplace Transformation Patterns

The inverse Laplace transform at the end of the procedure has common patterns. Therefore, it will be helpful if you keep them in mind. Let’s look at them in detail.

Basic Form

The first case in which a denominator is of the form $s+\alpha$ (where $\alpha$ is a constant). This is the basic pattern that we can just apply to the formula.

$$\begin{align}\color{green}{\text{Formula to use:}}&\quad \color{green}{\frac{1}{s-a} \ \xrightarrow{\ \mathcal{L}^{-1}\ }\ e^{at}}\\[7pt] \text{Example:} &\quad \frac{1}{s+3}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ e^{-3t}\end{align}$$

“Square of s + Constant α” Form

If the denominator is of the form $s^2+\alpha$, we aim to convert it to a trigonometric function.

$$\color{green}{\text{Formula to use:}\quad \frac{\omega}{s^2+\omega ^2}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ \sin\omega t,\quad \frac{s}{s^2+\omega ^2}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ \cos\omega t}$$

$$\begin{align}\text{Example 1:}\quad & \frac{6}{s^2+4}=3\cdot \frac{2}{s^2+4}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ 3 \sin 2t \\[7pt] \text{Example 2:} \quad & \frac{2s}{s^2+4} = 2 \cdot \frac{s}{s^2+4}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ 2 \cos 2t \end{align}$$

If the numerator has multiple terms, you can simply break it into additions as follows:

$$\frac{2s+6}{s^2+4} = \frac{2s}{s^2+4} + \frac{6}{s^2+4}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ 2\cos 2t + 3\sin 2t$$

“Square of s – Constant α” Form

If the denominator is of the form $s^2-\alpha$, we can further decompose it into partial fractions. Let’s proceed steadily.

$$\color{green}{\text{Formula to use:} \quad \frac{1}{s-a} \ \xrightarrow{\ \mathcal{L}^{-1}\ }\ e^{at}}$$

$$\begin{align}\text{Example:}\quad \frac{16}{s^2-16} &= \frac{16}{(s+4)(s-4)}\\[7pt] &= 2 \bigg( \frac{1}{s-4}-\frac{1}{s+4} \bigg) \ \xrightarrow{\ \mathcal{L}^{-1}\ }\ 2e^{4t} – 2e^{-4t}\end{align}$$

Sponsered link

“Square of s + s + Constant α” Form

If the denominator is of the form $s^2+\alpha s+\beta$, we aim to complete the square of the denominator and convert it to $e^{-at}\sin \omega t$ or $e^{-at}\cos \omega t$.

$$\color{green}{\text{Formula to use:}\quad \frac{\omega}{(s-a)^2+\omega ^2} \ \xrightarrow{\ \mathcal{L}^{-1}\ }\ e^{at}\sin\omega t,\quad \frac{s-a}{(s-a)^2+\omega ^2}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ e^{at}\cos\omega t}$$

$$\begin{align}\text{Example 1:}\quad & \frac{2}{s^2+2s+3}=\sqrt{2}\cdot \frac{\sqrt{2}}{(s+1)^2+2}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ \sqrt{2}e^{-t} \sin \sqrt{2}t \\[7pt] \text{Example 2:} \quad & \frac{s+1}{s^2+2s+3} = \frac{s+1}{(s+1)^2+2}\ \xrightarrow{\ \mathcal{L}^{-1}\ }\ e^{-t} \cos \sqrt{2}t \end{align}$$

The above are the patterns that often appear.

Halt! Before the inverse Laplace transform, there is a process of partial fraction decomposition of the solution in $s$-domain. Remember it makes the decompositon easy if you aim for the above form.

Examples of First-Order Differential Equations

Now, let’s solve differential equations using the patterns identified above.

Note: To make the formulas easy to read, we denote the function $x(t)$ by $x$ and the Laplace transform $X(s)$ of $x(t)$ by $X$, as long as there is no confusion.

Simple Example

$$2\dot{x}+3x=0; \quad x(0)=1$$

Here’s successive steps to find the solution.

$$\begin{align}\color{green}{\text{Laplace transform:}}\quad &2\big\{ sX – x(0) \big\} +3X=0\\[12pt] \color{green}{\text{Substituting }x(0):}\quad &2sX – 2 +3X=0\\[10pt] \color{green}{\text{For evaluating }X:}\quad & \big(2s+3\big)X = 2\\[5pt] &X = \frac{2}{2s+3}=\frac{1}{s+\frac{3}{2}}\\[5pt] \color{green}{\text{Inverse Laplace transform}:}\quad& x(t)=e^{-\frac{3}{2}t}\end{align}$$

Sponsered link

Example with Partial Fraction Decomposition

$$\dot{x}+5x=1; \quad x(0)=2$$

First, let’s find the solution in $s$-domain.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad & \big\{ sX-x(0)\big\}+5X=\frac{1}{s}\\[7pt] \color{green}{\text{Substituting }x(0):}\quad &sX-2+5X=\frac{1}{s} \\[7pt] \color{green}{\text{For evaluating }X:}\quad &\big( s + 5 \big)X = \frac{1}{s} + 2 \\[7pt] & X =\color{blue}{\frac{1}{s(s+5)}}+\frac{2}{s+5}\end{align}$$

Looks like we cannot directly apply inverse Laplace transform, let us solve the blue part for partial fractions.

Note: We decompose partial fractions using the numerator expansion method, which is recommended on this site as a handy tip. The method consists of partial fraction decomposition by expanding the numerator into the form of the addition or subtraction of the denominator factors. For more information, please see this page:

$$\begin{align} X &= \color{blue}{\frac{1}{5}\cdot \frac{(s+5)-s}{s(s+5)}} + \frac{2}{s+5}\\[5pt] &= \color{blue}{\frac{1}{5}\bigg( \frac{1}{s}\ -\ \frac{1}{s+5}\bigg) }+ \frac{2}{s+5}\ =\ \frac{1}{5}\cdot\frac{1}{s}\ +\ \frac{9}{5}\cdot\frac{1}{s+5}\end{align}$$

We got all decomposed terms, and the solution is obtained by applying inverse Laplace transform to each term.

$$x(t)=\frac{1}{5}\ +\ \frac{9}{5}e^{-5t}$$

Example with Trigonometric Functions

$$\dot{x}+2x=\sin t; \quad x(0)=0$$

As before, first find the solution in $s$-domain.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad & \big\{ sX-x(0) \big\}+2X=\frac{1}{s^2+1}\\[7pt] \color{green}{\text{For evaluating }X\text{ at }x(0):}\quad & X=\frac{1}{(s+2)(s^2+1)}\end{align}$$

As a product term appears in the denominator, we do a partial fraction decomposition. Transform the numerator into a form that includes the factors of the denominator.

$$\begin{alignat}{2} X&\ =\frac{1}{5}\cdot \frac{(s^2+1)-(s+2)(s-2)}{(s+2)(s^2+1)}& &=\ \frac{1}{5} \bigg( \frac{1}{s+2}\ -\ \frac{s-2}{s^2+1} \bigg) \\[5pt] &=\ \frac{1}{5}\bigg( \frac{1}{s+2}\ -\ \frac{s}{s^2+1} + 2\cdot \frac{1}{s^2+1}\bigg)& &\end{alignat}$$

The solution is obtained by applying the inverse Laplace transform on the decomposed terms.

$$x(t)=\frac{1}{5} \big(e^{-2t} – \cos t + 2\sin t \big)$$

Sponsered link

Examples of Second-Order Differential Equations

Next, we consider a second-order derivative based differential equation. Here, the successive steps are the same as before.

Example with Partial Fraction Decomposition

$$\ddot{x}-3\dot{x}+2x=0; \quad\ x(0)=0,\ \dot{x}(0)=-1$$

As before, we first convert the problem to $s$-domain.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad &\big\{ s^2 X – sx(0) – \dot{x}(0) \big\} -3\big\{ sX-x(0) \big\} + 2X=0\\[10pt] \color{green}{\text{Substituting }x(0) \text{ and }\dot{x}(0):}\quad & s^2X+1-3sX + 2X=0\\[10pt] \color{green}{\text{For evaluating }X:}\quad & \big( s^2 -3s+2\big)X = -1 \\[7pt] &X\ =\ \frac{-1}{s^2-3s+2}\ =\ \frac{-1}{(s-1)(s-2)}\end{align}$$

As usual, let’s solve for partial fractions.

$$X\ =\ \frac{(s-2)-(s-1)}{(s-1)(s-2)}\ =\ \frac{1}{s-1}\ -\ \frac{1}{s-2}$$

The solution of the inverse Laplace transform is expressed as:

$$x(t)=e^t – e^{2t}$$

Example with Trigonometric Function

$$\ddot{x}-{x}=-10\sin 2t; \quad\ x(0)=-1,\ \dot{x}(0)=0$$

Find the solution in $s$-domain.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad &\big\{ s^2 X – sx(0) – \dot{x}(0) \big\} – X =-10\cdot \frac{2}{s^2+4}\\[10pt] \color{green}{\text{Substituting }x(0) \text{ and }\dot{x}(0):}\quad & s^2X+s-X=-\ \frac{20}{s^2+4}\\[7pt] \color{green}{\text{For evaluating }X:}\quad & \big( s^2-1\big)X = -\ \frac{20}{s^2+4}-s\\[7pt] &X =-\ \color{blue}{\frac{20}{(s^2+4)(s^2-1)}}- \color{black}{\frac{s}{s^2-1}}\end{align}$$

Let’s decompose the blue part into partial fractions.

$$\begin{alignat}{2} X &=\color{blue}{-\ 4\cdot \frac{(s^2+4)-(s^2-1)}{(s^2+4)(s^2-1)}}- \color{black}{\frac{s}{s^2-1}} & &\ =\color{blue}{\ – 4\bigg\{ \frac{1}{s^2-1}\ -\ \frac{1}{s^2+4}\bigg\}} – \frac{s}{s^2-1} \\[5pt] & =\color{green}{ -\ \frac{4}{s^2-1}\ -\ \frac{s}{s^2-1}} + \frac{4}{s^2+4}& &\end{alignat}$$

As in the pattern described earlier, the green terms can be further decomposed. It is a bit tedious, but let’s do it steadily.

$$\begin{align} X &=\color{green}{-\ 2\cdot \frac{(s+1)-(s-1)}{(s-1)(s+1)}\ -\ \frac{1}{2}\cdot\frac{(s+1)+(s-1)}{(s-1)(s+1)}} + \frac{4}{s^2+4}\\[5pt] &= \color{green}{ -2 \bigg\{ \frac{1}{s-1}\ -\ \frac{1}{s+1} \bigg\}\ -\ \frac{1}{2} \bigg\{ \frac{1}{s-1} + \frac{1}{s+1} \bigg\} } + \frac{4}{s^2+4} \\[5pt] &= -\frac{5}{2}\cdot\frac{1}{s-1}\ +\ \frac{3}{2}\cdot\frac{1}{s+1}\ +\ 2\cdot \frac{2}{s^2+4}\end{align}$$

Finally, apply inverse Laplace transform to obtain the solution in $t$-domain.

$$x(t)=-\frac{5}{2}e^t + \frac{3}{2} e^{-t} + 2\sin 2t$$

Sponsered link

Example with Square Completion

$$\ddot{x}+2\dot{x}+3x=3; \quad\ x(0)=0,\ \dot{x}(0)=1$$

First get the equation in $s$-domain.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad &\big\{ s^2 X – sx(0) – \dot{x}(0) \big\} +2\big\{ sX-x(0) \big\} + 3X=\frac{3}{s}\\[10pt] \color{green}{\text{Substituting }x(0) \text{ and }\dot{x}(0):}\quad & s^2X -1 + 2sX + 3X = \frac{3}{s}\\[10pt] \color{green}{\text{For evaluating }X:}\quad & \big( s^2 +2s+3\big)X = \frac{3}{s}+1 \\[7pt] &X = \color{blue}{\frac{3}{s(s^2+2s+3)}}+\frac{1}{s^2 + 2s + 3}\end{align}$$

We decompose the blue term into partial fractions.

$$\begin{align} X &= \color{blue}{ \frac{(s^2+2s+3)-s(s+2)}{s(s^2+2s+3)} } +\frac{1}{s^2 + 2s + 3} \\[5pt] & = \color{blue}{\frac{1}{s}\ -\ \frac{s+2}{s^2 + 2s + 3}} + \frac{1}{s^2 + 2s +3} \\[5pt] &= \frac{1}{s}\ -\ \frac{s+1}{s^2+2s+3}\end{align}$$

This is the quadratic denominator pattern, so let’s complete the square.

$$X = \frac{1}{s}\ -\ \frac{s+1}{(s+1)^2+2}$$

Get the solution by applying inverse Laplace transform:

$$\quad x(t) = 1 – e^{-t}\cos \sqrt{2} t$$

Examples of Simultaneous Differential Equations

Simple Example

The approach for simultaneous differential equations is the same as before.

$$\left\{ \begin{array}[l]\ \dot{x} = 2x – 3y \\ \dot{y} = y -2x,\end{array}\right. \qquad x(0)=8,\ y(0)=3$$

Since there are two variables: $x$ and $y$ in $t$-domain, let’s first find each solution in $s$-domain.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad &\left\{ \begin{array}[l]\ sX-x(0) = 2X – 3Y \\ sY-y(0) = Y -2X\end{array}\right.\\[7pt] \color{green}{\text{Substituting }x(0) \text{ and }y(0):}\quad &\left\{ \begin{array}[l]\ sX-8 = 2X – 3Y \\ sY-3 = Y -2X\end{array}\right.\\[7pt] \color{green}{\text{For evaluating }X\text{ and }Y:}\quad & \left\{ \begin{array}[l]\ (s-2)X + 3Y = 8 \\ 2X + (s-1)Y=3 \end{array}\right.\\[7pt] & X=\frac{8s-17}{(s+1)(s-4)},\quad Y=\frac{3s-22}{(s+1)(s-4)}\end{align}$$

Decompose $X$ into partial fractions and find the solution in $t$-domain by inverse Laplace transform.

$$\begin{gather}X\ =\ \frac{3(s+1) + 5(s-4)}{(s+1)(s-4)}\ =\ \frac{3}{s-4} + \frac{5}{s+1}\\[10pt]x(t) = 3e^{4t} + 5e^{-t}\end{gather}$$

Although $y$ can be obtained similarly, note that $y$ can also be obtained without partial fraction decomposition using the relation in $t$-domain. Specifically, using $\dot{x} = 2x – 3y$ defined in the differential equation, $y$ is derived as follows:

$$\begin{align} y(t) &= \frac{1}{3}\big(2x-\dot{x}\big) \\[7pt] &= \frac{1}{3} \bigg\{ 2\big( 3e^{4t} + 5e^{-t} \big) – \big( 12e^{4t} – 5e^{-t}\big)\bigg\} \\[7pt] &=\frac{1}{3}\big( -6e^{4t} + 15e^{-t}\big) \\[7pt]&= -2e^{4t} + 5e^{-t}\end{align}$$

Incidentally, it is not necessary to find the solution $Y$ in $s$-domain when solving with this procedure.

Sponsered link

Complex Example

Let’s look at a more complex example.

$$\left\{ \begin{array}[l]\ 4\dot{x} + 8x +\dot{y}=8\\ \dot{x} – y =10, \end{array}\right. \qquad x(0)=0,\ y(0)=0$$

Let us find the solution in $s$-domain first. Both $x$ and $y$ have an initial value of 0; the Laplace transform is straightforward.

$$\begin{align}\color{green}{\text{Laplace transform}:}\quad &\left\{ \begin{array}[l]\ 4sX + 8X + sY = \frac{8}{s} \\ sX-Y = \frac{10}{s} \end{array}\right.\\[7pt] \color{green}{\text{Solving for }X \text{ and } Y :}\quad & X=\color{blue}{\frac{8}{s(s^2+4s+8)}} + \frac{10}{s^2+4s+8}\\[7pt] &Y=\frac{8}{s^2+4s+8} + \frac{10s}{s^2+4s+8}\ -\ \frac{10}{s}\end{align}$$

To derive the inverse Laplace transform of $X$, we decompose the blue highlighted term into partial fractions.

$$\begin{alignat}{2} X &= \color{blue}{\frac{(s^2+4s+8)-s(s+4)}{s(s^2+4s+8)}} + \frac{10}{s^2+4s+8} & &\\[7pt] &= \color{blue}{\bigg\{ \frac{1}{s}\ -\ \frac{s+4}{s^2+4s+8}\bigg\}} + \frac{10}{s^2+4s+8} & &= \frac{1}{s}\ \color{green}{-\ \frac{s-6}{s^2+4s+8}}\end{alignat}$$

Now all that remains is to complete the square in the green part, and the inverse Laplace transformation becomes possible.

$$\begin{align} X &= \frac{1}{s} \ \color{green}{- \ \frac{(s+2)-8}{(s+2)^2+4}}\\[7pt] &= \frac{1}{s}\ \color{green}{-\ \frac{s+2}{(s+2)^2+4} + 4\cdot \frac{2}{(s+2)^2+4}}\end{align}$$

The inverse Laplace transform yields

$$x(t) = 1 – e^{-2t} \cos 2t + 4e^{-2t}\sin 2t $$

To avoid lengthy calculation of partial fractions of $Y$, let’s derive $y$ using the original relation: $\dot{x} – y =10$.

$$y(t)\ =\ \dot{x} – 10\ =\ -6 e^{-2t} \sin 2t + 10 e^{-2t}\cos 2t – 10$$

Summary
  • A differential equation is solved by considering the Laplace transform of the equation, deriving the solution in $s$-domain, and then finding the inverse Laplace transform of the solution.
  • The inverse Laplace transform shows common patterns, so it is helpful to keep them in mind.
  • The common patterns also facilitate partial fractional decomposition within the procedure.

Comments

Copied title and URL