The Unit Step Function (Heaviside Function). Time Shifting Theorem

Real inputs switch on and off. A force acts for a minute and is removed; a voltage is applied and then cut. The unit step function u ( t c ) is the algebraic switch that describes such behavior, turning a term off up to t = c and on afterward. Combined with the time shifting theorem, it makes discontinuous forcing terms as easy to transform as smooth ones.

Quick Reference

Item Statement
Unit step u(t) = \begin{cases} 0 & t < 0 \\ 1 & t \geq 0 \end{cases}
Shifted step u(t-c) = \begin{cases} 0 & t < c \\ 1 & t \geq c \end{cases}, also written u c ( t )
Transform { u ( t c ) } = e c s s
Special case { u ( t ) } = { 1 } = 1 s
Two-piece function f = g [ u ( t ) u ( t c ) ] + h u ( t c )
"Window" on [ a , b ) u ( t a ) u ( t b )
Time shifting theorem { f ( t c ) u ( t c ) } = e c s F ( s ) , c > 0
Inverse form 1 { e c s F ( s ) } = f ( t c ) u ( t c )
Contrast s -shifting: { e c t f ( t ) } = F ( s c )

Why a Step Function

In many applications, inputs or driving forces act for some time only. An external force is applied to a body for a minute and is then completely removed; a constant voltage is applied to a circuit and then reduced to zero for all subsequent times. Such situations arise constantly.

The unit step function can suppress a given term up to a certain value of t and then insert it for all larger t . It provides a powerful tool for solving differential equations with complicated right-hand sides.

The unit step function, also called the Heaviside step function, is defined by

u(t) = \left\{ \begin{aligned} &0, && \text{if } t < 0 \\ &1, && \text{if } t \geq 0 \end{aligned} \right.

In words, u ( t ) is zero when its input is negative and one when its input is positive or zero.

Graph of the unit step function: zero along the negative t-axis, jumping to the value 1 at t = 0 and staying there.
The unit step function u ( t ) . It is the simplest possible switch: off before the origin, on from the origin onward.

It follows from the definition that

u(t-c) = \left\{ \begin{aligned} &0, && \text{if } t < c \\ &1, && \text{if } t \geq c \end{aligned} \right.

Note that u ( t c ) is a unit step shifted c units to the right. The argument t c becomes non-negative exactly when t c , which is where the step turns on. It is sometimes denoted u c ( t ) .

Graph of the shifted unit step function u(t - c): zero until t = c, then jumping to 1.
The shifted step u ( t c ) , which switches on at t = c .

Sketch the graph of f ( t ) = 1 u ( t c ) .

Solutionf(t) = 1 - u(t-c) = \left\{ \begin{aligned} &1, && \text{if } t < c \\ &0, && \text{if } t \geq c \end{aligned} \right.

Subtracting the step from 1 reverses it: instead of switching on at c , the function switches off at c . This is how a term is removed after a given time.

Graph of one minus the shifted unit step: constant at 1 until t = c, then dropping to zero.
The function 1 u ( t c ) , a switch that turns off at t = c .

Expressing Piecewise-Defined Functions

The unit step function writes piecewise-defined functions in a compact form, which makes their Laplace transforms much quicker to evaluate.

If

f(t) = \left\{ \begin{aligned} &g(t), && \text{if } 0 \leq t < c \\ &h(t), && \text{if } c \leq t < \infty \end{aligned} \right.

then

f ( t ) = g ( t ) [ u ( t ) u ( t c ) ] + h ( t ) u ( t c ) .

The bracket u ( t ) u ( t c ) is a window: it equals 1 on [ 0 , c ) and 0 elsewhere, so it selects the first piece. The final term selects the second piece. More generally, u ( t a ) u ( t b ) is the window that is 1 exactly on [ a , b ) .

Write f(t) = \begin{cases} t^{2} & 0 \leq t < 3 \\ 5 & t \geq 3 \end{cases} using unit step functions.

Solution

Applying the formula with g ( t ) = t 2 , h ( t ) = 5 , and c = 3 ,

f ( t ) = t 2 [ u ( t ) u ( t 3 ) ] + 5 u ( t 3 ) = t 2 + ( 5 t 2 ) u ( t 3 )

for t 0 , where u ( t ) = 1 throughout the region of interest.

The second form is often the more useful one. It reads: start with t 2 , then at t = 3 add the correction 5 t 2 that converts it into 5 .

Laplace Transform of the Unit Step Function

{ u ( t c ) } = e c s s ( c 0 )
Calculation\begin{aligned} \mathscr{L}\left\{u(t-c)\right\} &= \int_0^{\infty}e^{-st}u(t-c)\,dt \\ &= \int_0^{c}e^{-st}(0)\,dt + \int_c^{\infty}e^{-st}(1)\,dt \\ &= \lim_{R\to\infty}\int_c^{R}e^{-st}\,dt \\ &= \lim_{R\to\infty}\left[-\frac{e^{-st}}{s}\right]_{t=c}^{t=R} \\ &= \frac{e^{-cs}}{s} \end{aligned}

The step function did nothing except move the lower limit of integration from 0 to c , which is exactly what produces the factor e c s .

Since u ( t ) = 1 throughout [ 0 , ) , which is the entire interval of integration,

{ u ( t ) } = { 1 } = 1 s ,

the case c = 0 of the general formula.

The Time Shifting Theorem

The meaning of f ( t c ) u ( t c )

Let f ( t ) be the input to a system and let c > 0 . Suppose the input is delayed by c seconds, after which it begins in exactly the same fashion as before, as when one waits a few seconds before turning on a generator. Then the input is described by

f_c(t) = \left\{ \begin{aligned} &0, && \text{if } 0 \leq t < c \\ &f(t-c), && \text{if } c \leq t < \infty \end{aligned} \right.

The graph of f c ( t ) is obtained by translating the graph of f ( t ) to the right by c units and making it identically zero between t = 0 and t = c . We call f c the shifted function.

The unit step function describes this translation compactly:

f c ( t ) = f ( t c ) u ( t c )

provided f ( t ) is defined for c t < 0 . The values of f on that range have no bearing on the result, since they are multiplied by zero; they merely need to exist so that f ( t c ) is defined for all t 0 .

Two stacked panels. The upper shows f(t) and its right-translate f(t-c), with an arrow marking the shift of c units. The lower shows f(t-c)u(t-c), identically zero until t = c and then following the translated curve.
Panel (a): the original f ( t ) and its translate f ( t c ) , shifted right by c . Panel (b): the product f ( t c ) u ( t c ) , which discards everything before t = c and starts the translated signal there.

The next figure compares three closely related functions. Imagine a signal generator feeding a system.

  • If the generator is on and connected from the beginning, the input is f ( t ) .
  • If the generator has been running from the beginning but is not connected until t = c , the input is f ( t ) u ( t c ) : the signal is already partway through its cycle when it arrives.
  • If the generator is off but connected, and is switched on at t = c , the input is f ( t c ) u ( t c ) : the signal starts from its beginning at time c .
Three stacked panels comparing f(t), f(t)u(t-c) which is f truncated before c, and f(t-c)u(t-c) which is f translated to begin at c.
(a) f ( t ) , running from the start. (b) f ( t ) u ( t c ) , the same signal with everything before t = c deleted, so it arrives mid-cycle. (c) f ( t c ) u ( t c ) , the signal delayed so that it begins at t = c . Only the third has a clean transform, and the distinction between (b) and (c) is the most common source of error in this section.

Previously we saw that multiplying f ( t ) by e c t translates F ( s ) along the s -axis, giving { f ( t ) e c t } = F ( s c ) , the Exponential Scaling or s -shifting theorem. Dually, if f ( t ) is shifted along the t -axis by c > 0 , the transform F ( s ) is multiplied by e c s .

Time Shifting ( t -Shifting) Theorem, also called the second shifting theorem. If { f ( t ) } = F ( s ) and c > 0 , then

{ f ( t c ) u ( t c ) } = e c s F ( s ) .
Proof\begin{aligned} \mathscr{L}\left\{f(t-c)u(t-c)\right\} &= \int_0^{\infty}e^{-st}f(t-c)u(t-c)\,dt \\ &= \int_0^{c}e^{-st}f(t-c)\underbrace{u(t-c)}_{0}\,dt + \int_c^{\infty}e^{-st}f(t-c)\underbrace{u(t-c)}_{1}\,dt \\ &= \int_c^{\infty}e^{-st}f(t-c)\,dt \end{aligned}

Substitute t = τ + c , so τ = t c and d τ = d t . When t = c we have τ = 0 , so the lower limit becomes zero:

\begin{aligned} \mathscr{L}\left\{f(t-c)u(t-c)\right\} &= \int_0^{\infty}e^{-s(\tau+c)}f(\tau)\,d\tau \\ &= \int_0^{\infty}e^{-cs}e^{-s\tau}f(\tau)\,d\tau \\ &= e^{-cs}\underbrace{\int_0^{\infty}e^{-s\tau}f(\tau)\,d\tau}_{F(s)} \\ &= e^{-cs}F(s) \end{aligned}

The constant e c s came out of the integral because it does not involve τ .

The two shifting theorems side by side.


s -shifting: multiplying by e c t in time shifts the transform, F ( s ) F ( s c ) .


t -shifting: delaying in time multiplies the transform, F ( s ) e c s F ( s ) .



Both are used constantly, and confusing them is easy. The presence of a factor e c s multiplying the transform always signals a time delay; an s appearing only as s c always signals an exponential factor in t .

Worked Examples

Find { f ( t ) } where f(t) = \begin{cases} 0 & 0 \leq t < 2 \\ (t-2)^{3} & t \geq 2 \end{cases}.

Solution

This is already in the exact form f ( t c ) u ( t c ) with c = 2 and the underlying function t 3 :

f ( t ) = ( t 2 ) 3 u ( t 2 ) .

Since { t 3 } = 6 s 4 , the time shifting theorem gives

{ f ( t ) } = 6 e 2 s s 4 .

Find { t 2 u ( t 1 ) } .

Solution

This is not in the form f ( t c ) u ( t c ) , because the argument of the power is t rather than t 1 . Rewrite t 2 in powers of t 1 :

t 2 = [ ( t 1 ) + 1 ] 2 = ( t 1 ) 2 + 2 ( t 1 ) + 1 .

Therefore

t 2 u ( t 1 ) = [ ( t 1 ) 2 + 2 ( t 1 ) + 1 ] u ( t 1 ) ,

and each term is now correctly shifted. Applying the theorem term by term with { t 2 } = 2 s 3 , { t } = 1 s 2 , { 1 } = 1 s ,

{ t 2 u ( t 1 ) } = e s ( 2 s 3 + 2 s 2 + 1 s ) .

Rewriting in powers of t c is the standard preparation step whenever the function multiplying the step is not already shifted.

Find 1 { e 3 s s 2 + 4 } .

Solution

Ignore the exponential first. Since 1 s 2 + 4 = 1 2 2 s 2 + 4 ,

f ( t ) = 1 { 1 s 2 + 4 } = 1 2 sin 2 t .

The factor e 3 s then delays this by 3 :

1 { e 3 s s 2 + 4 } = 1 2 sin ( 2 ( t 3 ) ) u ( t 3 ) .

Note that every t in f becomes t 3 , including the one inside the sine.

Solve y' + y = f(t) with y ( 0 ) = 0 , where f(t) = \begin{cases} 1 & 0 \leq t < 2 \\ 0 & t \geq 2 \end{cases}.

Solution

Write the forcing function with steps: f ( t ) = 1 u ( t 2 ) , so

F ( s ) = 1 s e 2 s s .

Transforming the equation, s Y + Y = F ( s ) , so

Y ( s ) = 1 s ( s + 1 ) ( 1 e 2 s ) .

Since 1 s ( s + 1 ) = 1 s 1 s + 1 , the inverse of the first piece is 1 e t . Writing g ( t ) = 1 e t ,

y ( t ) = g ( t ) g ( t 2 ) u ( t 2 ) = ( 1 e t ) ( 1 e ( t 2 ) ) u ( t 2 ) .

Explicitly,

y(t) = \begin{cases} 1 - e^{-t} & 0 \leq t < 2 \\ e^{-(t-2)} - e^{-t} & t \geq 2 \end{cases}

The solution rises toward 1 while the input is on, then decays once it is switched off. Note that y is continuous at t = 2 even though the forcing is not: both branches give 1 e 2 there. Solving this by the methods of Chapter 4 would have required treating the two intervals separately and matching by hand.

Exercises

Express f(t) = \begin{cases} 0 & 0 \leq t < 1 \\ t & 1 \leq t < 4 \\ 0 & t \geq 4 \end{cases} using step functions and find its transform.

Solution

Using a window, f ( t ) = t [ u ( t 1 ) u ( t 4 ) ] .

Rewrite each piece in shifted form: t u ( t 1 ) = [ ( t 1 ) + 1 ] u ( t 1 ) and t u ( t 4 ) = [ ( t 4 ) + 4 ] u ( t 4 ) . Therefore

{ f } = e s ( 1 s 2 + 1 s ) e 4 s ( 1 s 2 + 4 s ) .

Find 1 { e 2 s s 3 } .

Solution

Since 1 { 1 s 3 } = t 2 2 , delaying by 2 gives

( t 2 ) 2 2 u ( t 2 ) .

Find { cos t u ( t π ) } .

Solution

The cosine is not shifted, so rewrite it. Using cos t = cos ( ( t π ) + π ) = cos ( t π ) ,

cos t u ( t π ) = cos ( t π ) u ( t π ) ,

which is now in standard form. Therefore

{ cos t u ( t π ) } = s e π s s 2 + 1 .

Frequently Asked Questions

What is the unit step function used for?

To switch terms on and off at prescribed times. Multiplying a term by u ( t c ) suppresses it before t = c and admits it afterward, which is how inputs that start, stop, or change form are written as a single formula rather than a case list.


How do I write a piecewise function using steps?

Multiply each piece by the window that selects its interval. The window for [ a , b ) is u ( t a ) u ( t b ) , and the window for [ c , ) is u ( t c ) . Adding the products gives a single expression valid for all t 0 .


What is the difference between f ( t ) u ( t c ) and f ( t c ) u ( t c ) ?

The first truncates f , deleting it before t = c but leaving the rest where it was; the second translates f so that it begins at t = c . Only the second has the clean transform e c s F ( s ) . The comparison figure above shows all three cases side by side.


What do I do when the function is not already shifted?

Rewrite it in powers of t c , or use a trigonometric addition formula. For t 2 u ( t 1 ) , expand t 2 = ( t 1 ) 2 + 2 ( t 1 ) + 1 . For cos t u ( t π ) , use cos t = cos ( t π ) . Then apply the theorem to each term.


How do I recognize a time shift in an inverse transform?

By the factor e c s multiplying the transform. Set it aside, invert what remains to get f ( t ) , then replace every t by t c and multiply by u ( t c ) . Forgetting the step function is the most common mistake, and it produces an answer that is wrong for t < c .


How do the two shifting theorems differ?

s -shifting concerns e c t f ( t ) , giving F ( s c ) : an exponential in time translates the transform. t -shifting concerns f ( t c ) u ( t c ) , giving e c s F ( s ) : a delay in time multiplies the transform by an exponential. The roles of "multiply" and "translate" are exactly swapped between the two.


Does the value of u at the jump matter?

No. Defining u ( 0 ) as 0 , 1 , or 1 2 changes nothing, because the Laplace transform is an integral and cannot detect the value at a single point, as Lerch's theorem in Section 7.3 makes precise.