Unit (Heaviside) Step Function

Heaviside function is defined as follows:

`u_c(t)=u(t-c)=H(t-c)={(1 if t>=c),(0 if t<c):}`

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

Example 1. Write `f(t)={(2 if t<1),(5 if 1<=t<4),(3 if t>=4):}` 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(t)` and `u_4(t)`. When `t<1` both step functions are 0 and we need 2, so, first term is 2. On interval `[1,4)` `u_1(t)=1` and we need 5, so second term (not forgetting about first term 2) is `(5-2)u_1(t)` . On last interval both step functions are 1, so third term (don't forget that first and second term gives us 5) is `(3-5)u_4(t)`. So, `f(t)=2+(5-2)u_1(t)+(3-5)u_4(t)=2+3u_1(t)-2u_2(t)` .

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

Example 2. Write `f(t)={(t^2 if t<1),(t if 1<=t<4),(t-1 if t>=4):}` 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(t)` and `u_4(t)`. When `t<1` both step functions are 0 and we need `t^2` , so, first term is `t^2` . On interval `[1,4)` `u_1(t)=1` and we need t, so second term (not forgetting about first term `t^2` ) is `(t-t^2)u_1(t)` . On last interval both step functions are 1, so third term (don't forget that first and second term gives us t) is `(t-1-t)u_4(t)`. So, `f(t)=t^2+(t-t^2)u_1(t)+(t-1-t)u_4(t)=t^2+(t-t^2)u_1(t)-u_2(t)` .

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

`f(t)={(f_1(t) if t<c_1),(f_2(t) if c_1<=t<c_2),(f_3(t) if t>=c_3):}=f_1(t)+(f_2(t)-f_1(t))u_(c_1)(t)+(f_3(t)-f_2(t))u_(c_2)(t)` .

This can be extended on any number of terms.

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

First let's see what is Laplace trasform of the `u_c(t)f(t-c)` :

`L(u_c(t)f(t-c))=int_0^oo e^(-st)u_c(t)f(t-c)dt=int_c^oo e^(-st)*1*f(t-c)dt`

Notice how we used above definition of step function: on interval `[0,t)` step function is 0, so the integral is also 0, on interval `[t,oo)` step function is 1.

Now using change of variable, substitute `t-c=u` (or `t=u+c`) then `du=dt` and since `t` is changing from c to `oo` then u is changing from `c-c=0` to `oo-c=oo` .

` `So, `int_c^oo e^(-st)f(t-c)dt=int_0^oo e^(-s(u+c))f(u)du=e^(-sc) int_0^oo e^(-su)f(u)du=e^(-sc)F(s)`

`L(u_c(t)f(t-c))=e^(-sc)F(s)`

Taking inverse Laplace of both sides gives that `u_c(t)f(t-c)=L^-1(e^(-sc)F(s))` .

Now, if we take `f(t)=f(t-c)=1` then `F(s)=L(f(t))=1/s` and

`L(u_c(t))=e^(-sc)/s` or `u_c(t)=L^-1(e^(-sc)/s)` .

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

Example 3. Find Laplace transform of `f(t)={(3 if t<1),(t if t>=1):}`

First, write function in terms of step functions: `f(t)=3+(t-3)u_1(t)`

Second term must be in the form `u_1(t)f_1(t-1)` , so rewrite `f_1(t-1)=t-3` as `t-1-2` , so it looks like `f_1(t)=t-2` .

So, `L(f(t))=3L(1)+L((t-1-2)u_1(t))=3/s+e^(-s)L(t-2)=3/s+e^(-s)(1/s^2-2/s)`

Example 4. Find Laplace transform of `f(t)={(0 if t<3),(t^2 if 3<=t<5),(cos(2t)-t^2 if t>=5):}`

Writing function in terms of heaviside function gives `f(t)=t^2u_3(t)+cos(2t)u_5(t)` . However neither of functions are shifted, so there is a work to shift them.

`t^2` should be in the form of `f_1(t-3)` , so rewrite it: `(t-3+3)^2=(t-3)^2+6(t-3)+9` , this gives that `f_1(t)=t^2+6t+9` .

Next, `cos(2t)` should be in the form of `f_2(t-5)` , so rewrite it: `cos(2(t-5)+10)` and `f_2(t)=cos(2t+10)` .

So,

`L(f(t))=e^(-3s)L(t^2+6t+9)+e^(-5s)L(cos(2t+10))=e^(-3s)(2/s^3+6/s^2+9/s)+e^(-5s)(scos(10)-2sin(10))/(s^2+4)`

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

There will not be many examples on finding inverse Laplace transform, because partial fraction decomposition and convolution integral are same main techniques. Just one thing changed: if you see `e^(-cs)` in numerator, factor it out and keep in mind that inverse transform will involve `u_c(t)` . The rest is same as in previous sections.

Example 5. Calculate `L^-1(e^(-5s)/(s^2+1))`

This is a simple example. Factor out `e^(-5s)` and use the fact that `L^-1(1/(s^2+1))=sin(t)` .

`L(e^(-5s)1/(s^2+1))=u_5(t)sin(t-5)`

Example 6. Calculate `L^-1((se^(-3s)+e^(-2s)+se^(-5s))/((s+2)(s+3)))`

As always factor out exponents:

`(se^(-3s)+e^(-2s)+se^(-5s))/((s+2)(s+3))=e^(-3s)s/((s+2)(s+3))+e^(-5s)s/((s+2)(s+3))+e^(-2s)1/((s+2)(s+3))` .

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

Since `1/((s+2)(s+3))=1/(s+2)-1/(s+3)` then `L^-1(1/((s+2)(s+3)))=e^(-2t)-e^(-3t)`

Since `s/((s+2)(s+3))=-2 1/(s+2)+3 1/(s+3)` then `L^-1(s/((s+2)(s+3)))=-2e^(-2t)+3e^(-3t)`

Finally,

`L^-1((se^(-3s)+e^(-2s)+se^(-5s))/((s+2)(s+3)))=u_3(t)(-2e^(-2(t-3))+3e^(-3(t-3)))+u_2(t)(e^(-2(t-2))-e^(-2(t-3)))+u_5(t)(-2e^(-2(t-5))+3e^(-3(t-5)))`

Answers are messy, but don't afraid. Same principles apply and we did same work, just added a bit new work and answers are longer.