Unit (Heaviside) Step Function

The Heaviside step function is defined as follows:

$$${u}_{{c}}{\left({t}\right)}={u}{\left({t}-{c}\right)}={H}{\left({t}-{c}\right)}={\left\{\begin{array}{c}{1}{\quad\text{if}\quad}{t}\ge{c}\\{0}{\quad\text{if}\quad}{t}<{c}\\ \end{array}\right.}$$$

The unit step function is useful in the sense that piecewise continuous functions can be written in terms of step functions.

Example 1. Write $$${f{{\left({t}\right)}}}={\left\{\begin{array}{c}{2}{\quad\text{if}\quad}{t}<{1}\\{5}{\quad\text{if}\quad}{1}\le{t}<{4}\\{3}{\quad\text{if}\quad}{t}\ge{4}\\ \end{array}\right.}$$$ in terms of step functions.

OK. We have here two switches at points $$${1}$$$ and $$${4}$$$, so we need 2 step functions, namely $$${u}_{{1}}{\left({t}\right)}$$$ and $$${u}_{{4}}{\left({t}\right)}$$$.

When $$${t}<{1}$$$, both step functions are $$${0}$$$, and we need $$${2}$$$; so, the first term is $$${2}$$$.

On the interval $$${\left[{1},{4}\right)}$$$, $$${u}_{{1}}{\left({t}\right)}={1}$$$, and we need $$${5}$$$; so, the second term (not forgetting about the first term $$${2}$$$) is $$${\left({5}-{2}\right)}{u}_{{1}}{\left({t}\right)}$$$.

On the last interval, both step functions are $$${1}$$$; so, the third term (don't forget that summing up the first and second terms gives us $$${5}$$$) is $$${\left({3}-{5}\right)}{u}_{{4}}{\left({t}\right)}$$$.

Thus, $$${f{{\left({t}\right)}}}={2}+{\left({5}-{2}\right)}{u}_{{1}}{\left({t}\right)}+{\left({3}-{5}\right)}{u}_{{4}}{\left({t}\right)}={2}+{3}{u}_{{1}}{\left({t}\right)}-{2}{u}_{{2}}{\left({t}\right)}$$$.

This process can be extended on functions that are not constant.

Example 2. Write $$${f{{\left({t}\right)}}}={\left\{\begin{array}{c}{{t}}^{{2}}{\quad\text{if}\quad}{t}<{1}\\{t}{\quad\text{if}\quad}{1}\le{t}<{4}\\{t}-{1}{\quad\text{if}\quad}{t}\ge{4}\\ \end{array}\right.}$$$ in terms of step functions.

OK. We have here two switches at points $$${1}$$$ and $$${4}$$$; so, we need 2 step functions, namely $$${u}_{{1}}{\left({t}\right)}$$$ and $$${u}_{{4}}{\left({t}\right)}$$$.

When $$${t}<{1}$$$, both step functions are $$${0}$$$, and we need $$${{t}}^{{2}}$$$; so, the first term is $$${{t}}^{{2}}$$$.

On the interval $$${\left[{1},{4}\right)}$$$, $$${u}_{{1}}{\left({t}\right)}={1}$$$, and we need $$${t}$$$; so, the second term (not forgetting about the first term $$${{t}}^{{2}}$$$) is $$${\left({t}-{{t}}^{{2}}\right)}{u}_{{1}}{\left({t}\right)}$$$.

On the last interval, both step functions are $$${1}$$$; so, the third term (don't forget that summing up the first and second terms gives us $$${t}$$$) is $$${\left({t}-{1}-{t}\right)}{u}_{{4}}{\left({t}\right)}$$$.

Hence, $$${f{{\left({t}\right)}}}={{t}}^{{2}}+{\left({t}-{{t}}^{{2}}\right)}{u}_{{1}}{\left({t}\right)}+{\left({t}-{1}-{t}\right)}{u}_{{4}}{\left({t}\right)}={{t}}^{{2}}+{\left({t}-{{t}}^{{2}}\right)}{u}_{{1}}{\left({t}\right)}-{u}_{{2}}{\left({t}\right)}$$$.

You've already noticed that each next term is the difference between the function values multiplied by the corresponding step function:

$$${f{{\left({t}\right)}}}={\left\{\begin{array}{c}{f}_{{1}}{\left({t}\right)}{\quad\text{if}\quad}{t}<{c}_{{1}}\\{f}_{{2}}{\left({t}\right)}{\quad\text{if}\quad}{c}_{{1}}\le{t}<{c}_{{2}}\\{f}_{{3}}{\left({t}\right)}{\quad\text{if}\quad}{t}\ge{c}_{{3}}\\ \end{array}\right.}={f}_{{1}}{\left({t}\right)}+{\left({f}_{{2}}{\left({t}\right)}-{f}_{{1}}{\left({t}\right)}\right)}{u}_{{{c}_{{1}}}}{\left({t}\right)}+{\left({f}_{{3}}{\left({t}\right)}-{f}_{{2}}{\left({t}\right)}\right)}{u}_{{{c}_{{2}}}}{\left({t}\right)}$$$

This can be extended on any number of terms.

Now, let's return to the question of taking the Laplace transforms of such functions.

First, let's see what the Laplace trasform of $$${u}_{{c}}{\left({t}\right)}{f{{\left({t}-{c}\right)}}}$$$ is:

$$${L}{\left({u}_{{c}}{\left({t}\right)}{f{{\left({t}-{c}\right)}}}\right)}={\int_{{0}}^{\infty}}{{e}}^{{-{s}{t}}}{u}_{{c}}{\left({t}\right)}{f{{\left({t}-{c}\right)}}}{d}{t}={\int_{{c}}^{\infty}}{{e}}^{{-{s}{t}}}\cdot{1}\cdot{f{{\left({t}-{c}\right)}}}{d}{t}$$$

Notice how we used above definition of the step function: on the interval $$${\left[{0},{t}\right)}$$$, the step function is $$${0}$$$; so, the integral is also $$${0}$$$, and on the interval $$${\left[{t},\infty\right)}$$$, the step function is $$${1}$$$.

Now, using the change of variable, substitute $$${t}-{c}={u}$$$ (or $$${t}={u}+{c}$$$); then, $$${d}{u}={d}{t}$$$, and, since $$${t}$$$ is changing from $$${c}$$$ to $$$\infty$$$, $$${u}$$$ is changing from $$${c}-{c}={0}$$$ to $$$\infty-{c}=\infty$$$.

So, $$${\int_{{c}}^{\infty}}{{e}}^{{-{s}{t}}}{f{{\left({t}-{c}\right)}}}{d}{t}={\int_{{0}}^{\infty}}{{e}}^{{-{s}{\left({u}+{c}\right)}}}{f{{\left({u}\right)}}}{d}{u}={{e}}^{{-{s}{c}}}{\int_{{0}}^{\infty}}{{e}}^{{-{s}{u}}}{f{{\left({u}\right)}}}{d}{u}={{e}}^{{-{s}{c}}}{F}{\left({s}\right)}$$$

$$${L}{\left({u}_{{c}}{\left({t}\right)}{f{{\left({t}-{c}\right)}}}\right)}={{e}}^{{-{s}{c}}}{F}{\left({s}\right)}$$$.

Taking the inverse Laplace of both sides gives that $$${u}_{{c}}{\left({t}\right)}{f{{\left({t}-{c}\right)}}}={{L}}^{{-{{1}}}}{\left({{e}}^{{-{s}{c}}}{F}{\left({s}\right)}\right)}$$$.

Now, if we take $$${f{{\left({t}\right)}}}={f{{\left({t}-{c}\right)}}}={1}$$$, we have that $$${F}{\left({s}\right)}={L}{\left({f{{\left({t}\right)}}}\right)}=\frac{{1}}{{s}}$$$ and

$$${L}{\left({u}_{{c}}{\left({t}\right)}\right)}=\frac{{{e}}^{{-{s}{c}}}}{{s}}$$$, or $$${u}_{{c}}{\left({t}\right)}={{L}}^{{-{{1}}}}{\left(\frac{{{e}}^{{-{s}{c}}}}{{s}}\right)}$$$.

All these results give a way to find the Laplace transform of piecewise functions: write a function in terms of step functions, perform the necessary shift, and take the Laplace transform of the given terms.

Example 3. Find the Laplace transform of $$${f{{\left({t}\right)}}}={\left\{\begin{array}{c}{3}{\quad\text{if}\quad}{t}<{1}\\{t}{\quad\text{if}\quad}{t}\ge{1}\\ \end{array}\right.}$$$

First, write the function in terms of step functions: $$${f{{\left({t}\right)}}}={3}+{\left({t}-{3}\right)}{u}_{{1}}{\left({t}\right)}$$$.

The second term must be in the form $$${u}_{{1}}{\left({t}\right)}{f}_{{1}}{\left({t}-{1}\right)}$$$; so, rewrite $$${f}_{{1}}{\left({t}-{1}\right)}={t}-{3}$$$ as $$${t}-{1}-{2}$$$, so that it looks like $$${f}_{{1}}{\left({t}\right)}={t}-{2}$$$.

Thus, $$${L}{\left({f{{\left({t}\right)}}}\right)}={3}{L}{\left({1}\right)}+{L}{\left({\left({t}-{1}-{2}\right)}{u}_{{1}}{\left({t}\right)}\right)}=\frac{{3}}{{s}}+{{e}}^{{-{s}}}{L}{\left({t}-{2}\right)}=\frac{{3}}{{s}}+{{e}}^{{-{s}}}{\left(\frac{{1}}{{{s}}^{{2}}}-\frac{{2}}{{s}}\right)}$$$

Example 4. Find the Laplace transform of $$${f{{\left({t}\right)}}}={\left\{\begin{array}{c}{0}{\quad\text{if}\quad}{t}<{3}\\{{t}}^{{2}}{\quad\text{if}\quad}{3}\le{t}<{5}\\{\cos{{\left({2}{t}\right)}}}+{{t}}^{{2}}{\quad\text{if}\quad}{t}\ge{5}\\ \end{array}\right.}$$$

Writing the function in terms of the Heaviside function gives $$${f{{\left({t}\right)}}}={{t}}^{{2}}{u}_{{3}}{\left({t}\right)}+{\cos{{\left({2}{t}\right)}}}{u}_{{5}}{\left({t}\right)}$$$. However, neither of the functions is shifted, so there is a work to shift them.

$$${{t}}^{{2}}$$$ should be in the form of $$${f}_{{1}}{\left({t}-{3}\right)}$$$; so, rewrite it: $$${{\left({t}-{3}+{3}\right)}}^{{2}}={{\left({t}-{3}\right)}}^{{2}}+{6}{\left({t}-{3}\right)}+{9}$$$. This gives that $$${f}_{{1}}{\left({t}\right)}={{t}}^{{2}}+{6}{t}+{9}$$$.

Next, $$${\cos{{\left({2}{t}\right)}}}$$$ should be in the form of $$${f}_{{2}}{\left({t}-{5}\right)}$$$; so, rewrite it: $$${\cos{{\left({2}{\left({t}-{5}\right)}+{10}\right)}}}$$$. Therefore, $$${f}_{{2}}{\left({t}\right)}={\cos{{\left({2}{t}+{10}\right)}}}$$$.

So,

$$${L}{\left({f{{\left({t}\right)}}}\right)}={{e}}^{{-{3}{s}}}{L}{\left({{t}}^{{2}}+{6}{t}+{9}\right)}+{{e}}^{{-{5}{s}}}{L}{\left({\cos{{\left({2}{t}+{10}\right)}}}\right)}={{e}}^{{-{3}{s}}}{\left(\frac{{2}}{{{s}}^{{3}}}+\frac{{6}}{{{s}}^{{2}}}+\frac{{9}}{{s}}\right)}+{{e}}^{{-{5}{s}}}\frac{{{s}{\cos{{\left({10}\right)}}}-{2}{\sin{{\left({10}\right)}}}}}{{{{s}}^{{2}}+{4}}}$$$

Of course, finding the Laplace transform of piecewise functions with the help of the Heaviside function can be a messy thing. Another way is to find the Laplace transform on each interval directly by definition (a step function is not needed, we just use the property of additivity of an integral). However, a step function is really useful when we need to find the inverse Laplace transform.

There will not be many examples on finding the inverse Laplace transform, because partial fraction decomposition and the convolution integral are the same main techniques. Just one thing has changed: if you see $$${{e}}^{{-{c}{s}}}$$$ in the numerator, factor it out and keep in mind that the inverse transform will involve $$${u}_{{c}}{\left({t}\right)}$$$. The rest is the same as in the previous sections.

Example 5. Calculate $$${{L}}^{{-{{1}}}}{\left(\frac{{{e}}^{{-{5}{s}}}}{{{{s}}^{{2}}+{1}}}\right)}$$$.

This is a simple example. Factor out $$${{e}}^{{-{5}{s}}}$$$ and use the fact that $$${{L}}^{{-{{1}}}}{\left(\frac{{1}}{{{{s}}^{{2}}+{1}}}\right)}={\sin{{\left({t}\right)}}}$$$.

$$${L}{\left({{e}}^{{-{5}{s}}}\frac{{1}}{{{{s}}^{{2}}+{1}}}\right)}={u}_{{5}}{\left({t}\right)}{\sin{{\left({t}-{5}\right)}}}$$$

Example 6. Calculate $$${{L}}^{{-{{1}}}}{\left(\frac{{{s}{{e}}^{{-{3}{s}}}+{{e}}^{{-{2}{s}}}+{s}{{e}}^{{-{5}{s}}}}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}\right)}$$$.

As always, factor out the exponents:

$$$\frac{{{s}{{e}}^{{-{3}{s}}}+{{e}}^{{-{2}{s}}}+{s}{{e}}^{{-{5}{s}}}}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}={{e}}^{{-{3}{s}}}\frac{{s}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}+{{e}}^{{-{2}{s}}}\frac{{1}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}+{{e}}^{{-{5}{s}}}\frac{{s}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}$$$

Again, the problem simplifies to finding the inverse transforms of functions not involving exponents.

Since $$$\frac{{s}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}=-{2}\frac{{1}}{{{s}+{2}}}+{3}\frac{{1}}{{{s}+{3}}}$$$, we have that $$${{L}}^{{-{{1}}}}{\left(\frac{{s}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}\right)}=-{2}{{e}}^{{-{2}{t}}}+{3}{{e}}^{{-{3}{t}}}$$$.

Since $$$\frac{{1}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}=\frac{{1}}{{{s}+{2}}}-\frac{{1}}{{{s}+{3}}}$$$, we have that $$${{L}}^{{-{{1}}}}{\left(\frac{{1}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}\right)}={{e}}^{{-{2}{t}}}-{{e}}^{{-{3}{t}}}$$$.

Finally,

$$${{L}}^{{-{{1}}}}{\left(\frac{{{s}{{e}}^{{-{3}{s}}}+{{e}}^{{-{2}{s}}}+{s}{{e}}^{{-{5}{s}}}}}{{{\left({s}+{2}\right)}{\left({s}+{3}\right)}}}\right)}={u}_{{3}}{\left({t}\right)}{\left(-{2}{{e}}^{{-{2}{\left({t}-{3}\right)}}}+{3}{{e}}^{{-{3}{\left({t}-{3}\right)}}}\right)}+{u}_{{2}}{\left({t}\right)}{\left({{e}}^{{-{2}{\left({t}-{2}\right)}}}-{{e}}^{{-{3}{\left({t}-{2}\right)}}}\right)}+{u}_{{5}}{\left({t}\right)}{\left(-{2}{{e}}^{{-{2}{\left({t}-{5}\right)}}}+{3}{{e}}^{{-{3}{\left({t}-{5}\right)}}}\right)}$$$

The answers are a bit messy and longer, but don't be afraid. The same principles apply, and we did the same work, just adding some minor effort.