5.4. Laplace transform#
5.4.1. Definition and properties#
The Laplace transform is used in signals/controls. It is also a way to solve differential equations using algebra. It is defined as:
The inverse Laplace transform of F is f, i.e., \(f(t) = L^{-1}[F(s)]\). The Laplace transform of many functions can be computed using integration by parts. For example, the Laplace transform of \(f(t) = t\) is:
Importantly, the Laplace transform of the first derivative of an unknown function \(f(t) = y'(t)\) is:
using \(u = e^{-st}\) and \(\d{v} = y'(t) \d{t}\). Some common Laplace transforms are:
\(f(t)\) |
\(F(s) = L[f(t)]\) |
---|---|
\(t^n\), \(n=0, 1, 2, \cdots\) |
\(\dfrac{n!}{s^{n+1}}\) |
\(e^{at}\) |
\(\dfrac{1}{s - a}\) |
\(\sin(at)\) |
\(\dfrac{a}{s^2 + a^2}\) |
\(\cos(at)\) |
\(\dfrac{s}{s^2 + a^2}\) |
\(e^{at} \sin(bt)\) |
\(\dfrac{b}{(s - a)^2 + b^2}\) |
\(e^{at} \cos(bt)\) |
\(\dfrac{s - a}{(s - a)^2 + b^2}\) |
The Laplace transform is a linear operator, so
5.4.2. Solving first-order ODEs#
Nonhomogeneous, first-order ODEs with constant coefficients are nice to solve with Laplace transforms:
Apply the Laplace transform to both sides of the equation:
where \(Y = L[y(t)]\) and \(R = L[r(t)]\). If we can invert \(y = L^{-1}[Y]\) using tables, we have a solution!
Example: Laplace transform
Solve the initial value problem
Rearrange, apply Laplace transform \(Y = L[y]\), and solve for \(Y\):
Invert Laplace transform:
Example: Laplace transform with partial fractions
Solve the initial value problem:
Rearrange, apply Laplace transform \(Y = L[y]\), and solve for \(Y\):
These terms do not immediately correspond to the Laplace transform table, but we can separate them using partial fraction decomposition:
\(A_1\) and \(A_3\) can be found using the coverup method:
To find \(A_2\), substitute and cross multiply:
then compare the coefficient of the \(s^2\) terms on either side:
So, all together:
Solve for \(y\) by applying the inverse Laplace transform
Example: Hormone level
The concentration of a hormone in the blood c varies due to sinusoidal production by the thyroid and continuous removal according to:
The concentration is \(c_0\) at 6 AM (\(t = 0\)). What is the average concentration between 6 PM and 6 AM the same day?
To solve, rearrange and use the Laplace transform:
Use partial fraction decomposition on both fractions. The first one is:
and the cover-up method gives \(c_1 = 1/k\) and \(c_2 = -1/k\). For the next one:
The cover-up method gives
while cross-multiplying and matching coefficients gives
so
Using our solution for \(c_3\) in the first equation gives \(c_1\) and in the third equation gives \(c_2\):
All together,
Invert the Laplace transforms term by term:
The average concentration is:
5.4.3. Skill builder problems#
Solve the following IVPs using Laplace transforms:
\(y' + 4y = e^{4x}\), \(y(0) = 0\)
Solution
(5.87)#\[\begin{align} L[y' + 4y] &= L[e^{4x}] \\ sY - y(0) + 4Y &= \frac{1}{s-4} \\ (s+4) Y &= \frac{1}{s-4} \\ Y &= \frac{1}{(s+4)(s-4)} \end{align}\]Use partial fractions
(5.88)#\[\begin{equation} \frac{1}{(s+4)(s-4)} = \frac{A_1}{s+4} + \frac{A_2}{s-4} \end{equation}\]and cover up to find \(A_1 = -1/8\) and \(A_2 = 1/8\).
Solve by inverting the Laplace transforms:
(5.89)#\[\begin{align} Y &= \frac{1}{8} \left(\frac{1}{s-4} - \frac{1}{s+4} \right) \\ y = L^{-1}[Y] &= \frac{1}{8}\left( L^{-1}\left[\frac{1}{s-4}\right] - L^{-1}\left[\frac{1}{s+4}\right] \right) \\ &= \frac{1}{8}(e^{4x} - e^{-4x}) \end{align}\]\(y' + 2y = 8\), \(y(0) = 1\)
Solution
(5.90)#\[\begin{align} L[y' + 2y] &= L[8] \\ sY - y(0) + 2Y &= \frac{8}{s} \\ (s+2) Y - 1 &= \frac{8}{s} \\ Y &= \frac{1}{s+2} + \frac{8}{s(s+2)} \end{align}\]Use partial fractions and the cover-up method for the second fraction:
(5.91)#\[\begin{equation} \frac{8}{s(s+2)} = \frac{A_1}{s} + \frac{A_2}{s+2} \end{equation}\]to find \(A_1 = 4\) and \(A_2 = -4\). Solve by simplifying and inverting the Laplace transforms:
(5.92)#\[\begin{align} Y &= \frac{4}{s} - \frac{3}{s+2} \\ y = L^{-1}[Y] &= 4L^{-1}\left[\frac{1}{s}\right] - 3L^{-1}\left[\frac{1}{s+2}\right] \\ &= 4 - 3e^{-2x} \end{align}\]\(y' - y = 1 - 2x + \sin(3x), \quad y(0) = -1\)
Solution
(5.93)#\[\begin{align} L[y' - y] &= L[1 - 2x + \sin 3x ] \\ sY - y(0) - Y &= \frac{1}{s} - \frac{2}{s^2} + \frac{3}{s^2 + 9} \\ (s-1)Y &= -1 + \frac{1}{s} - \frac{2}{s^2} + \frac{3}{s^2 + 9} \\ Y &= -\frac{1}{s - 1} + \frac{1}{s(s - 1)} - \frac{2}{s^2(s - 1)} + \frac{3}{(s^2 + 9)(s - 1)} \end{align}\]Use partial fractions:
(5.94)#\[\begin{align} \frac{1}{s(s-1)} &= \frac{A_1}{s} + \frac{A_2}{s-1} \\ \frac{-2}{s^2(s - 1)} &= \frac{A_3}{s} + \frac{A_4}{s^2} + \frac{A_5}{s - 1} \\ \frac{3}{(s^2 + 9)(s - 1)} &= \frac{A_6s + B_6}{s^2 + 9} + \frac{A_7}{s - 1} \end{align}\]Cover up to find:
(5.95)#\[\begin{align} A_1 &=\frac{1}{0-1} = -1 & A_4 &= \frac{-2}{0 - 1} = 2 & A_7 &= \frac{3}{1^2 + 9} = \frac{3}{10} \\ A_2 &=\frac{1}{1} = 1 & A_5 &= \frac{-2}{1} = -2 \end{align}\]Finish the rest by cross-multiplying or pluggin in values. For the first fraction, plug in \(s=-1\) and known coefficients:
(5.96)#\[\begin{equation} 1 &= -A_3 + 2 + 1 \end{equation}\]then solve \(A_3 = 2\). For the third fraction, cross-multiply
(5.97)#\[\begin{equation} 3 = (A_6 s + B_6)(s-1) + \frac{3}{10}(s^2+9) \end{equation}\]Then compare like powers of \(s\). Here, I use \(s^2\) and \(s^0\):
(5.98)#\[\begin{align} A_6 + \frac{3}{10} &= 0 \\ -B_6 + \frac{27}{10} &= 3 \end{align}\]so \(A_6 = -3/10\) and \(B_6 = -3/10\). Simplify Y
(5.99)#\[\begin{equation} Y = \frac{1}{s} + \frac{2}{s^2} - \frac{17}{10} \frac{1}{s-1} - \frac{3}{10} \frac{1}{s^2+9} - \frac{3}{10} \frac{s}{s^2+9} \end{equation}\]Apply inverse Laplace transform across the equation:
(5.100)#\[\begin{equation} y = L^{-1}\left[\frac{1}{s}\right] + 2 L^{-1}\left[\frac{1}{s^2}\right] - \frac{17}{10} L^{-1}\left[\frac{1}{s - 1}\right] - \frac{1}{10} L^{-1}\left[\frac{3}{s^2 + 9}\right] - \frac{3}{10} L^{-1}\left[\frac{s}{s^2 + 9}\right] \end{equation}\]So, the solution is
(5.101)#\[\begin{equation} y = 1 + 2x - \frac{17}{10} e^x - \frac{1}{10} \sin 3x - \frac{3}{10} \cos 3x \end{equation}\]