Laplace Transform

Application to ODEs

The Laplace Transform can be used to solve ODEs by converting to an algebraic equation. Consider the linear constant coefficient second order nonhomogeneous ODE $$ y''(t) + a y'(t) + b y(t) = r(t) $$ Apply the transform using linearity $$ L(y'' + a y' + b y) = L(r) $$ $$ L(y'') + a L(y') + b L(y) = L(r) $$ Defining \( Y(s) = L(y(t)), \;\; R(s) = L(r(t)) \) and using derivative formulas $$ s^2 Y - s y(0) - y'(0) + a (s Y - y(0)) + b Y = R $$ $$ (s^2 + a s + b) Y = R + (s + a) y(0) + y'(0) $$ Solving this algebraic equation we get the Laplace Transform of the solution $$ Y = \frac{R}{s^2 + a s + b} + \frac{(s + a) y(0) + y'(0)}{s^2 + a s + b} $$

Example 1

Solve the initial value problem $$ y'' + y = 1 $$ with initial conditions $$ y(0) = 0, \;\; y'(0) = 0 $$

solution:

$$ a = 0, \;\; b = 1, L(1) = \frac{1}{s} $$ $$ Y = \frac{1/s}{s^2 + 1} = \frac{1}{s} \frac{1}{s^2 + 1} = \frac{1}{s} - \frac{s}{s^2 + 1}$$ $$ y(t) = 1 - \cos{t} $$

Example 2

Solve the initial value problem $$ y'' + y = (1-t)(u(t)-u(t-1)) $$ with initial conditions $$ y(0) = 0, \;\; y'(0) = 0 $$

solution:

t 1 1 r(t) $$ a = 0, \;\; b = 1 , \;\;\; r(t) = (1-t) \left[ u(t) - u(t-1) \right] $$ $$ L(r(t)) = L( (t-1) u(t-1) ) + L(1) - L(t) = \frac{e^{-s}}{s^2} + \frac{1}{s} - \frac{1}{s^2}$$ or $$ L(r(t)) = \int_0^{\infty}{ e^{-st} f(t) dt} = \int_0^{1}{ e^{-st} (1-t) dt } = \frac{e^{-s}}{s^2} + \frac{1}{s} - \frac{1}{s^2} $$ $$ Y = \frac{1}{s^2 + 1} (\frac{e^{-s}}{s^2} + \frac{1}{s} - \frac{1}{s^2}) = \frac{1}{s^2 + 1} \frac{(e^{-s}-1)}{s^2} + \frac{1}{s}\frac{1}{s^2 + 1} $$ $$ Y = (\frac{1}{s^2} - \frac{1}{s^2+1}) (e^{-s}-1) + \frac{1}{s} - \frac{s}{s^2 + 1} $$ $$ L^{-1}(\frac{1}{s}) = 1, \;\; L^{-1}(\frac{1}{s^2}) = t $$ $$ L^{-1}(\frac{1}{s^2+1})) = \sin{t},\;\; L^{-1}(\frac{s}{s^2+1})) = \cos{t} $$ Using the Second Shifting Theorem $$ y(t) = (t-1) u(t-1) - t - \sin{(t-1)} u(t-1) + \sin{t} + 1 - \cos{t} $$ $$ y(t) = (t-1) u(t-1) - (t-1) - \sin{(t-1)} u(t-1) + \sin{t} - \cos{t} $$ $$ y(t) = \Biggl\{ \begin{array}{cc} 1- t + \sin{t} - \cos{t} && 0 \lt t \lt 1 \\ - \sin{(t-1)} + \sin{t} - \cos{t}&& t \gt 1 \end{array} $$

Example 3

Solve the initial value problem $$ y'' + y = δ(t) $$ with initial conditions $$ y(0) = 0, \;\; y'(0) = 0 $$

solution:

$$ a = 0, \;\; b = 1, \;\;\; L(δ(t)) = 1 $$ $$ Y = \frac{1}{s^2 + 1} $$ $$ y(t) = \sin{t} $$ Notice that the solution satisfies the first initial condition but not the second. It is actually valid for \(t \gt 0\) but not for \(t = 0\). Because the impulse is applied at \(t = 0\). That means \(y'(0^+) \ne 0\). So the problem is equivalent to the following problem $$ y'' + y = 0, \;\;\;\; y(0) = 0, \;\; y'(0) = 1$$