## DyingLoveGrape.## Differential Equations: The Laplace Transform, Part 1.## Introduction.In practice differential equations are sometimes hard to solve. On the other hand, we have a ton of useful methods to solve algebraic equations. The Laplace transform is a nice way to take a differential equation and transform it into an algebraic equation. By solving the equation and taking the inverse of the Laplace transform we can get a solution for the differential equation we started with! ## The Laplace Transform.It's difficult to motivate the derivation of the transform itself, so we'll just define it and talk about some of the things it does.
This looks a bit terrifying at first glance, but it's not so bad if we cut the pieces up and talk about it. First, the left-hand side says ${\mathcal L}(f)(s)$, but maybe it should be written something like this: $[{\mathcal L}(f)](s)$. We may think about ${\mathcal L}(f)$ as a function and the points we're plugging in values of $s$. Usually $f$ is fixed and $s$ is what we plug in. The right-hand side is a little scarier, maybe. This is saying that we should take our function $f$ and multiply it by the function $e^{-st}$ and integrate that with respect to $t$. Where do we get the $s$ in $e^{-st}$? Remember, we plug that in to the left-hand side! Let's show a few examples of this before we begin. Note that this following section isn't necessary, but there are some neat pictures. ## Example Graphs of the Laplace Transform.Given the function $f(t) = t^{2}$ we have \[{\mathcal L}(f)(s) = \int_{0}^{\infty} t^{2}e^{-st}\,dt\] and, moreover, if we plug in some values for $s$ we obtain \[{\mathcal L}(f)(1) = \int_{0}^{\infty} t^{2}e^{-t}\,dt = 2,\] \[{\mathcal L}(f)(1000) = \int_{0}^{\infty} t^{2}e^{-1000t}\,dt\approx\frac{1}{500000000},\] We see that ${\mathcal L}(f)$ takes in a value of $s$ and spits out some other value. This means we could graph it! Exciting. I'll graph a few values for $f = t^{2}$. For reference, I've plotted the graph of $t^2$. The blue curve is the Laplace transform of $t^2$ from around 0.5 to 2. Let's try two more examples before continuing onwards. Let's let $g(t) = t^{3}$. Then ${\mathcal L}(g)(s)$ looks like: And let's let $h(t) = e^{2t}$. Then ${\mathcal L}(h)(s)$ looks like: As you might guess at this point, the Laplacian of functions looks pretty smooth and nice, but maybe that's because we took continuous functions. Let's try a discontinuous function. The function for the piecewise we'll be using is:
\[f(s) = \left\{
\begin{array}{lr}
5& \mbox{ for } 0\leq s \lt 1\\
s^{5}& \mbox{ for } 1\leq s \lt 2\\
5 + e^{5}\sin(s)& \mbox{ for } 2\leq s\\
0 & \mbox{ otherwise. }
\end{array}
\right\}\]
Which is shown in purple below. The much smoother blue curve is the Laplace of $f$.
The Laplace is significantly smoother and nicer than its associated piecewise function! In general, the idea of integral transforms like the Laplace transforms is to make functions "nicer" so that they become easier to work with; we see visual evidence of this here. ## Computing the Laplace transform for some common functions.Sometimes we can solve these integrals explicitly in terms of $s$. For example, if we have the function $f(t) = e^{at}$ then we can compute the Laplace transform explicitly. \[\begin{align*}{\mathcal L}(f)(s) &= \int_{0}^{\infty} e^{at}e^{-st}\,dt\\&=\int_{0}^{\infty} e^{(a-s)t}\,dt\\ &=\left[ \frac{1}{a-s}e^{(a-s)t}\right]_{0}^{\infty}\\ \end{align*}\] Here we need to think for a moment. Note that $(a-s)$ will eventually become negative (since $a$ is fixed and $s$ goes to infinity) so that multiplying this by $t\to\infty$ gives us $e^{-\infty} = 0$. The other term is easy to evaluate. We finally wind up with \[=\frac{-1}{a-s} = \frac{1}{s-a}\] which is a delightful and simple solution. We conclude that
What else is a common function? Polynomials, of course. Let's start easy with $f(t) = t$. Note that we will be using
In a frightfully similar way, we can evaluate the Laplace transform of functions like $f(t) = t^{n}$ for any natural number $n$. These problems often require a lot of integration by parts (similar to above), so I will simply quote the result.
Notice this also gives us the Laplace transform of a constant (when we plug in $n=0$ and note that $0! =1$). Neat. For now, this is all we need, but there are a number of charts which, given some $f$, will give you ${\mathcal L}(f)(s)$. ## Properties of the Laplace transform.There's a few properties that make the Laplace transform worth studying. First is linearity: if we have two numbers $a,b$ and two funtions $f(t),g(t)$, then we have
In other words: we can factor out constants, and Laplace transform of a sum is the sum of Laplace transforms. Let's quickly show this.
That's pretty nice. Using this property, we can now use the Laplace transform on general polynomials! For example, consider $f(t) = a_{0} + a_{1}t + a_{2}t^{2} + \dots + a_{m}t^{m}$. Then we have that \[\begin{align*} {\mathcal L}(f)(s) &= \frac{a_{0}}{s} + \frac{a_{1}}{s^2} + \frac{2a_{2}}{s^{3}} +\cdots\\ &\phantom{= a_{0}} +\frac{a_{m-1}(m-1)!}{s^{m}} +\frac{a_{m}m!}{s^{m+1}}\end{align*}\] and that's all kinds of exciting. Since we eventually want to be able to do differential equations with Laplace transforms, it might be nice to see what happens to ${\mathcal L}(f')(s)$ if we know ${\mathcal L}(f)(s)$ (note, for this, we will be assuming that $f$ is a "nice" function that don't get too big too fast, but, for now, one doesn't need to worry so much about that). Let's look: \[\begin{align*}{\mathcal L}(f')(s) &= \int_{0}^{\infty} f'(t)e^{-st}\,dt\\ &= \left[f(t)e^{-st}\right]_{0}^{\infty} + s\int_{0}^{\infty} f(t)e^{-st}\\ &= (0 - f(0)) + s{\mathcal L}(f)(s)\end{align*}\]
We've used integration by parts above. Notice that when I evaluated this, on the left-side of the secnd-to-last equality I needed to look at $f(t)e^{-st} = \frac{f(t)}{e^{st}}$ as $t\to\infty$. I needed this to be 0, so I needed that $f(t)$ grows slower than $e^{st}$. An $f$ like this is said to be of By repeated integration by parts, we can do this as many times as we'd like. We'll record this as a fact here,
Now that we know this, we can try to transform an entire differential equation! At this point, this might seem completely pointless (why bother transforming it...?) but this will be one of those things where the motivation comes from seeing what Laplace transforms can do. ## Transforming Differential Equations.
Let's start with an example. Let's say we have the differential equation $f'(t) + f(t) = 0$ with $f(0) = 2$. Not super-difficult, not super-exciting, but let's see what happens when we apply the Laplace transform to both sides of this equation. Note that ${\mathcal L}(0)(s) = 0$ (try to derive this from the definition).
\[{\mathcal L}(f' + f)(s) = {\mathcal L}(0)(s)\]
\[{\mathcal L}(f')(s) + {\mathcal L}(f)(s) = 0\]
\[s{\mathcal L}(f)(s) - f(0) + {\mathcal L}(f)(s) = 0\]
\[(s+1){\mathcal L}(f)(s) - f(0) = 0\]
\[(s+1){\mathcal L}(f)(s) - 2 = 0\]
\[{\mathcal L}(f)(s) = \frac{2}{s+1}\]
Here's the "ah-ha" moment: we know what kinds of functions $f$ will give us things which look like $\frac{2}{s+1}$ when we take the Laplace transform of them! Remember from one of the facts above that ${\mathcal L}(e^{at})(s) = \frac{1}{s-a}$. Hence, if we look at $e^{-t}$ then we get ${\mathcal L}(e^{-t})(s) = \frac{1}{s-(-1))} = \frac{1}{s+1}$. This is pretty close, but we're missing a 2. This is easy to fix: we simply let $f(t) = 2e^{-t}$. Then our Laplace transform of $f$ will give us exactly $\frac{2}{s+1}$ which is what we want above. What we've just done, without explicitly saying so, is take the Laplace transform of the equation, solve it, and then take the "inverse" Laplace transform (the last step where we noticed the $e^{at}$ thing) to get our solution in terms of $f$. This is the general process for solving differential equations using Laplace transforms. I could derive a whole load of "inverse" Laplace transformations, but there are usually tables giving you this data. Indeed, here is one such table from Fullerton. Once you've taken the Laplace transform of your equation, solve it for ${\mathcal L}(f)(s)$; then, look up what you get in the right side of the table (it might be the case you need to factor out a constant or add a few together, etc): the left side of the table corresponding to your value is the $f$ which solves your differential equation. ## Examples of solving differential equations using Laplace transforms.Let's do some examples.
Does this solve our differential equation? Note $f'(x) = \frac{1}{2}e^{\frac{1}{2}x}$ so \[f(x) - 2f'(x) = e^{\frac{1}{2}x} - 2(\frac{1}{2}e^{\frac{1}{2}x}) = 0\] and, moreover, $f(0) = e^{0} = 1$. This is exactly what we wanted!
## Next time...?There's some more advanced things we can do with ${\mathcal L}(f)(s)$ — in the next post, we'll explore these and solve some more difficult differential equations. |