# The Laplace transform

*Definition*: let $f: (0,\infty) \to \mathbb{R}$ be a piecewise continuous function that complies to the demand: $\exists s_0 \geq 0, \mu > 0: |f(t)| \leq \mu e^{s_0 t}$, then the **Laplace transform** $\mathcal{L}[f]$ is defined by

$$
\mathcal{L}[f](s) := \int_0^\infty e^{-st} f(t)dt = F(s),
$$

where $F(s)$ exists for all $s > s_0$.

## Basic properties

**Linearity**: if $f,g: (0,\infty) \to \mathbb{R}$ both have Laplace transforms, then $f + g$ also has a Laplace transform, and

$$
\mathcal{L}[f + g] = \mathcal{f} + \mathcal{g},
$$

on the interval where both are defined. 

??? note "*Proof*:"

    Will be added later.

If $c \in \mathbb{R}$ then $cf$ also has a Laplace transform and, 

$$
\mathcal{L}[cf] = c \mathcal{L}[f].
$$

**Shifting**: if $f$ has a Laplace transform $F$ on $(s_0,\infty)$ and $a \in \mathbb{R}$ then the function $g$ given by

$$
g(t) = e^{at} f(t)
$$

has a Laplace transform $G$ on $(\mathrm{max}(s_0 + a),0),\infty$, and

$$
G(s) = F(s-a)
$$

on this interval

??? note "*Proof*:"

    Will be added later.

**More shifting**: let $a>0$, if $f$ has a Laplace transform $F$ on $s_0, \infty$ then the function $g$ given by

$$
g(t) = \begin{cases} f(t-a) \qquad &\text{if } t \geq a, \\ 0 \qquad &\text{if } t < a \end{cases}
$$

has a Laplace transform G on $(s_0,\infty)$, and

$$
G(s) = e^{-as}F(s)
$$

on this interval.

??? note "*Proof*:"

    Will be added later.

**Scaling**: let $a > 0$. If $f$ has a Laplace transform $F$ on $(s_0, \infty)$ then the function $g$ given by 

$$
g(t) = f(at)
$$

has a Laplace transform G on $(as_0, \infty)$, and 

$$
G(s) = \frac{1}{a} F\Big(\frac{s}{a}\Big)
$$

on this interval.

??? note "*Proof*:"

    Will be added later.

**Derivatives**: if $f$ has a derivative $g$ having a Laplace transform $G$ on the interval $(s_0,\infty)$ then $f$ has a Laplace transform on the same interval, and

$$
G(s) = sF(s) - f(0).
$$

More generally, for higher derivatives we have (under analogous assumptions)

$$
\mathcal{L}[f^{(n)}](s) = s^n F(s) - \sum_{k=0}^{n-1} s^k f^{(n-1-k)}(0)
$$

??? note "*Proof*:"

    For large enough $s$, the case $n=1$ follows by integration by parts

    $$
    \begin{align*} \mathcal{L}[f'](s) &= \int_0^\infty e^{-st} f'(t)dt, \\ &= \Big[e^{-st} f(t) \Big]_0^\infty + s\int_0^\infty e^{-st}f(t), \\ &= sF(s) - f(0) \end{align*},
    $$

    suppose $\mathcal{L}[f^{k}](s) = s^k F(s) - \sum_{r=0}^{k-1} s^r f^{(k-1-r)}(0)$ is true for $k \in \mathbb{N}$, then by assumption

    $$
    \begin{align*} \mathcal{L}[f^{k+1}](s) &= \int_0^\infty e^{-st} f^{(k+1)}(t)dt , \\ &= \Big[e^{-st} f^{(k+1)}(t) \Big]_0^\infty + s\int_0^\infty e^{-st}f^{(k)}(t), \\ &= s \mathcal{L}[f^{(k)}] - f^{(k)}(0), \\ &= s \Big(s^k F(s) - \sum_{r=0}^{k-1} s^r f^{(k-1-r)}(0)\Big) - f^{(k)}(0), \\ &= s^{k+1} F(s) - \sum_{r=0}^{k} s^r f^{(k-r)}(0) \end{align*}.
    $$

## Examples

**Solving a second order linear ODE**: with $y: \mathbb{K} \to \mathbb{R}$ given by 

$$
\ddot y + 4 \dot y + 4y = t \qquad \text{with } y(0) = 1 \text{ and } \dot y(0) = 0
$$

using the Laplace transform

$$
\begin{align*}
\mathcal{L}[\ddot y + 4 \dot y + 4y](s) &= \frac{1}{s^2} \qquad \text{let } \mathcal{L}[y](s) = Y(s), \\ 
s^2 Y(s) -s + 4(sY(s) - 1) + 4 Y(s) &= \frac{1}{s^2}, \\ 
(s^2 + 4s + 4)Y(s) &= \frac{1}{s^2} + s + 4, \\ Y(s) &= \frac{s^3 + 4s^2 +1}{s^2(s+2)^2}, 
\end{align*}
$$

then it may be solved with partial fraction decomposition and the inverse transform.

**Solving a linear system of ODEs**: with $\mathbf{y}: \mathbb{K} \to \mathbb{R}^2$ given by

$$
\mathbf{\dot y}(t) = \begin{pmatrix} 5 & 1 \\ 1 & 5 \end{pmatrix} \mathbf{y}(t) \qquad \text{with } \mathbf{y}(0) = \begin{pmatrix} -3 \\ 7 \end{pmatrix} 
$$

using the Laplace transform

$$
\begin{align*} 
    \mathcal{L}[\mathbf{\dot y}](s) &= \begin{pmatrix} 5 & 1 \\ 1 & 5 \end{pmatrix} \mathcal{L}[\mathbf{y}](s) \qquad \text{let } \mathcal{L}[\mathbf{y}](s) = \mathbf{Y}(s), \\ 
    s \mathbf{Y}(s) - \mathbf{y}(0) &= \begin{pmatrix} 5 & 1 \\ 1 & 5 \end{pmatrix} \mathbf{Y}(s), \\ 
    s \mathbf{Y}(s) + \begin{pmatrix} 3 \\ -7 \end{pmatrix} &= \begin{pmatrix} 5 & 1 \\ 1 & 5 \end{pmatrix} \mathbf{Y}(s), \\
    \begin{pmatrix} 5 - s & 1 \\ 1 & 5 - s \end{pmatrix} \mathbf{Y}(s) &= \begin{pmatrix} 3 \\ -7 \end{pmatrix}, 
\end{align*}
$$

using Cramer's rule

$$
\begin{align*}
    &Y_1(s) = \frac{\mathrm{det}\begin{pmatrix} 3 & 1 \\ -7 & 5 - s \end{pmatrix}}{(5-s^2)-1}, \\
    \\
    &Y_2(s) = \frac{\mathrm{det}\begin{pmatrix} 5 - s & 3 \\ 1 & -7\end{pmatrix}}{(5-s^2)-1},
\end{align*}
$$

both can be solved with partial fraction decomposition and the inverse transform.