# Laplace Tranform

Laplace transform is useful in equation solving. By definition, Laplace transform transforms a function $f(x)$ defined on $x\geq 0$ into another function by calculating the convolution

$$ F(s) = \int_0^\infty e^{-s x} f(x) dx, $$or symbolically,

$$ F(s) = \mathcal L_s (f(x)). $$A table of important Laplace transforms can be found on mathworld.wolfram.com. Here we steal some of the commonly used.

$$ \begin{align} \mathcal L_s (1) =& \frac{1}{s}\\ \mathcal L_s (x^n) =& \frac{n!}{s^{n+1}}\\ \mathcal \sin(kx) =& \frac{k}{k^2+s^2} \\ \mathcal \cos(kx) =& \frac{s}{k^2+s^2}. \end{align} $$It can also be applied to differentials.

$$ \begin{align} \mathcal L_s \left(\frac{d f(x)}{dx}\right) =& s \mathcal L_s (f(x)) - f(0) \\ \mathcal L_s \left(\frac{d^2f(x)}{dx^2}\right) =& s^2 \mathcal L_s (f(x)) - s f(0) - \left.\frac{df(x)}{dx}\right\vert_{x=0}. \end{align} $$Integrals with upper limit as argument also transform nicely.

$$ \mathcal L_s \left( \int_0^x f(x') dx' \right) = \frac{\mathcal L_s(f)}{s}. $$Laplace transform is useful in solving differential equations because it transforms many equations into fractions and polynomials. A simple example is the harmonic osicllators. The equation of motion is

$$ \ddot x(t) = - \omega^2 x(t), $$which is transformed into

$$ s^2 X(s) - s x(0) - \dot x(0) = - \omega^2 X(s). $$The solution to it is

$$ X(s) = \frac{ s x(0) + \dot x(0)}{s^2 + \omega^2} = x(0)\frac{ s }{s^2 + \omega^2} + \frac{\dot x(0)}{\omega} \frac{\omega}{s^2 + \omega^2}. $$We can spot sin and cos from the solution, or more generally perform an inverse Laplace transform,

$$ x(t) = x(0) \cos(\omega t) + \frac{\dot x(0)}{\omega} \sin(\omega t). $$This example is too simple sometimes naive. However, it shows the spirit.

The more interesting application is to solve matrix differential equations. For any equations

$$ \partial_x \mathbf f(x) = \mathbf A \mathbf f(x), $$Laplace transform takes it to the form

$$ s \mathbf F(x) - f(0) = \mathbf A \mathbf F(s). $$The solution is

$$ \mathbf F(x) = \frac{1}{s \mathbf I - \mathbf A} \mathbf f(0) . $$So the final solution for $f(x)$ is

$$ \mathbf f(x) = \mathcal L^{-1} \left(\frac{1}{s \mathbf I - \mathbf A} \right)\mathbf f(0). $$We could work out the Taylor expansion of solution,

$$ \frac{1}{s \mathbf I - \mathbf A} = \frac{\mathbf I}{s}+ \frac{\mathbf A}{s^2} + \frac{\mathbf A^2}{s^3} \cdots. $$The inverse Laplace transform can be done simply term by term,

$$ \mathcal L^{-1} \left(\frac{1}{s \mathbf I - \mathbf A} \right) = \mathbf I + x \mathbf A + \frac{1}{2!} (x \mathbf A)^2 + \cdots = e^{x \mathbf A}. $$Finally we obtain the formal solution of the system, which is

$$ \mathbf f(x) = \exp\left( x \mathbf A \right)\mathbf f(0). $$Lei Ma (2020). 'Laplace Tranform', Intelligence, 10 April. Available at: https://intelligence.leima.is/toolbox/equation-solving-in-neuroscience/laplace-transform/.