Step Functions, Second Shifting & Convolution

Handling Real-World Signals and System Responses

Learning Objectives:
  • Express piecewise functions using unit step functions
  • Apply the second shifting theorem to find Laplace transforms of delayed signals
  • Compute convolution integrals and use the convolution theorem
  • Solve differential equations involving discontinuous forcing functions
  • Connect convolution to system impulse response and signal processing

Real engineering inputs aren't smooth forever — machines switch on, forces suddenly change, signals have discontinuities. This section gives us the tools to handle ALL of these: the unit step function for modeling switches, the second shifting theorem for delayed signals, and convolution for understanding system response.

"Nature uses only the longest threads to weave her patterns, so each small piece of her fabric reveals the organization of the entire tapestry."
— Richard Feynman (1918–1988)
يُؤْتِي الْحِكْمَةَ مَن يَشَاءُ ۚ وَمَن يُؤْتَ الْحِكْمَةَ فَقَدْ أُوتِيَ خَيْرًا كَثِيرًا
"He gives wisdom to whom He wills, and whoever has been given wisdom has certainly been given much good."
— Quran, Surah Al-Baqarah (2:269)

Unit Step Function (Heaviside Function)

Definition

The Unit Step Function:
$$u(t - \tau) = \begin{cases} 0, & t < \tau \\ 1, & t \geq \tau \end{cases}$$
Engineering Insight: The function $u(t-\tau)$ is like a switch that turns ON at time $t = \tau$. Every piecewise function in engineering — a motor starting, a valve opening, a load being applied — can be written using step functions. This is why the step function is also called the Heaviside function, named after engineer Oliver Heaviside.

Writing Piecewise Functions with Step Functions

Any piecewise function can be converted to a sum of step functions:

$$f(t) = \begin{cases} f_1(t), & 0 \leq t < a \\ f_2(t), & a \leq t < b \\ f_3(t), & t \geq b \end{cases}$$ $$= f_1(t) + [f_2(t) - f_1(t)]u(t-a) + [f_3(t) - f_2(t)]u(t-b)$$

Key Idea: Add the first piece, then "turn on" the difference each time you switch to a new piece.

Example Conversions

Example A: Express $f(t) = \begin{cases} 2, & 0 \leq t < 3 \\ 5, & t \geq 3 \end{cases}$

Solution: Start with 2, then add $(5-2) = 3$ at $t=3$:
$$f(t) = 2 + 3u(t-3)$$
Example B: Express $f(t) = \begin{cases} 0, & 0 \leq t < 1 \\ t, & 1 \leq t < 4 \\ 1, & t \geq 4 \end{cases}$

Solution:
$$f(t) = 0 + (t - 0)u(t-1) + (1 - t)u(t-4) = tu(t-1) + (1-t)u(t-4)$$

Laplace Transform of Step Function

$$\mathcal{L}\{u(t-\tau)\} = \frac{e^{-\tau s}}{s}, \quad s > 0$$

This is straightforward to derive: $\mathcal{L}\{u(t-\tau)\} = \int_\tau^\infty e^{-st} dt = \frac{e^{-s\tau}}{s}$

Second Shifting Theorem (t-Domain Shifting)

Second Shifting Theorem:

If $\mathcal{L}\{f(t)\} = F(s)$, then:

$$\mathcal{L}\{f(t-\tau)u(t-\tau)\} = e^{-\tau s} F(s)$$

In the inverse direction:

$$\mathcal{L}^{-1}\{e^{-\tau s} F(s)\} = f(t-\tau)u(t-\tau)$$

Comparison with First Shifting Theorem

First vs. Second Shifting:
  • First Shifting (Section 3.1): Multiplying by $e^{at}$ in time shifts in s-domain: $\mathcal{L}\{e^{at}f(t)\} = F(s-a)$ (frequency shift)
  • Second Shifting: Multiplying by $e^{-\tau s}$ in s-domain shifts in t-domain: $\mathcal{L}\{f(t-\tau)u(t-\tau)\} = e^{-\tau s}F(s)$ (time delay)
First = frequency shift, Second = time delay. Don't confuse them!

Important Caution

⚠️ The function must match the shift!

The second shifting theorem requires the function to be in the form $f(t-\tau) \cdot u(t-\tau)$ — the same shift $\tau$ in both the function and the step function.

If you have $g(t) \cdot u(t-\tau)$ where $g$ is not of the form $f(t-\tau)$, you must rewrite $g(t)$ as a function of $(t-\tau)$ first, or use partial fractions to break it down.

Step-by-Step Using Second Shifting

  1. Identify the shift $\tau$: From the argument of the step function $u(t-\tau)$
  2. Rewrite the other function: Express $f(t-\tau)$ in terms of $(t-\tau)$
  3. Find the transform of $f$: Calculate $F(s) = \mathcal{L}\{f(t)\}$
  4. Apply the theorem: $\mathcal{L}\{f(t-\tau)u(t-\tau)\} = e^{-\tau s}F(s)$
  5. For inverse transforms: Extract the exponential, recognize the inside, apply the inverse with the step

Convolution and the Convolution Theorem

Definition of Convolution

Convolution of two functions:
$$(f * g)(t) = \int_0^t f(\tau) g(t - \tau) \, d\tau$$

The integral runs from $\tau = 0$ to $\tau = t$, and we multiply $f(\tau)$ by $g(t-\tau)$, the time-reversed and shifted version of $g$.

Convolution Theorem

The Convolution Theorem:
$$\mathcal{L}\{f * g\} = F(s) \cdot G(s)$$

In inverse form:

$$\mathcal{L}^{-1}\{F(s) \cdot G(s)\} = (f * g)(t) = \int_0^t f(\tau)g(t-\tau)\,d\tau$$

Why is Convolution Important?

Engineering Insight: Convolution is the mathematical description of how a system processes an input signal. If $G(s)$ is the transfer function (the Laplace transform of the impulse response), then the output is:
$$Y(s) = G(s) \cdot F(s)$$
Taking the inverse transform:
$$y(t) = g(t) * f(t)$$
The system "convolves" the input signal $f(t)$ with its impulse response $g(t)$ to produce the output. This is the foundation of signal processing and control theory!
Impulse Response: The impulse response $g(t) = \mathcal{L}^{-1}\{G(s)\}$ is the system's response to a unit impulse $\delta(t)$. Once you know $g(t)$, you can find the system's response to ANY input — just convolve!

Properties of Convolution

Key Properties:
  • Commutative: $f * g = g * f$
  • Associative: $(f*g)*h = f*(g*h)$
  • Distributive: $f*(g+h) = f*g + f*h$
  • With constant: $\mathcal{L}^{-1}\{F(s)\} = f(t) \Rightarrow \mathcal{L}^{-1}\{c \cdot F(s)\} = c \cdot f(t)$

How to Compute Convolution

  1. Write out both functions: $f(\tau)$ and $g(t-\tau)$ (g is shifted and flipped)
  2. Multiply them together: $f(\tau) \cdot g(t-\tau)$
  3. Integrate from $\tau=0$ to $\tau=t$: $\int_0^t f(\tau) g(t-\tau) d\tau$
  4. Simplify the result — it will be a function of $t$

Worked Examples

Problem: Express $f(t) = \begin{cases} 2, & 0 \leq t < 3 \\ 5, & t \geq 3 \end{cases}$ using step functions, then find $\mathcal{L}\{f(t)\}$.

Solution:

Step 1: Write as step functions:

$$f(t) = 2 + 3u(t-3)$$

Step 2: Transform each term:

$$\mathcal{L}\{f(t)\} = \mathcal{L}\{2\} + 3\mathcal{L}\{u(t-3)\}$$
$$= \frac{2}{s} + 3 \cdot \frac{e^{-3s}}{s} = \frac{2 + 3e^{-3s}}{s}$$

Answer: $\mathcal{L}\{f(t)\} = \frac{2 + 3e^{-3s}}{s}$

Problem: Find $\mathcal{L}\{(t-2)^2 u(t-2)\}$.

Solution:

Step 1: Identify the function and shift: $f(t) = t^2$, $\tau = 2$

Step 2: Find $F(s)$:

$$F(s) = \mathcal{L}\{t^2\} = \frac{2!}{s^3} = \frac{2}{s^3}$$

Step 3: Apply second shifting theorem:

$$\mathcal{L}\{(t-2)^2 u(t-2)\} = e^{-2s} \cdot \frac{2}{s^3}$$

Answer: $\mathcal{L}\{(t-2)^2 u(t-2)\} = \frac{2e^{-2s}}{s^3}$

Problem: Find $\mathcal{L}^{-1}\left\{\frac{e^{-3s}}{s^2+4}\right\}$.

Solution:

Step 1: Recognize the pattern: $e^{-3s}$ suggests $\tau = 3$

Step 2: Find the base inverse: Let $F(s) = \frac{1}{s^2+4}$

$$f(t) = \mathcal{L}^{-1}\left\{\frac{1}{s^2+4}\right\} = \frac{1}{2}\sin(2t)$$

Step 3: Apply second shifting theorem (inverse form):

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

Answer: $\frac{1}{2}\sin(2(t-3)) u(t-3)$

Problem: Solve $y' + y = u(t-2)$ with $y(0) = 0$.

Solution:

Step 1: Take Laplace transform of both sides:

$$\mathcal{L}\{y'\} + \mathcal{L}\{y\} = \mathcal{L}\{u(t-2)\}$$
$$sY(s) - 0 + Y(s) = \frac{e^{-2s}}{s}$$

Step 2: Solve for $Y(s)$:

$$Y(s)(s+1) = \frac{e^{-2s}}{s}$$
$$Y(s) = \frac{e^{-2s}}{s(s+1)}$$

Step 3: Use partial fractions on $\frac{1}{s(s+1)} = \frac{1}{s} - \frac{1}{s+1}$:

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

Step 4: The base inverse is $f(t) = 1 - e^{-t}$, so:

$$y(t) = (1 - e^{-(t-2)})u(t-2)$$

Answer: $y(t) = (1 - e^{-(t-2)})u(t-2)$

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

Solution:

Step 1: Write $f(t) = 1 - u(t-\pi)$ (constant 1, then subtract 1 at $t=\pi$)

Step 2: Transform:

$$s^2Y + Y = \frac{1}{s} - \frac{e^{-\pi s}}{s}$$

Step 3: Solve:

$$Y(s) = \frac{1}{s(s^2+1)} - \frac{e^{-\pi s}}{s(s^2+1)}$$

Step 4: Partial fractions: $\frac{1}{s(s^2+1)} = \frac{1}{s} - \frac{s}{s^2+1}$

So $f(t) = 1 - \cos(t)$ and the general solution is:

$$y(t) = (1 - \cos(t)) - (1 - \cos(t-\pi))u(t-\pi)$$

Answer: $y(t) = (1 - \cos(t)) - (1 + \cos(t))u(t-\pi)$ (since $\cos(t-\pi) = -\cos(t)$)

Problem: Evaluate $(1 * e^t)(t) = \int_0^t 1 \cdot e^\tau d\tau$.

Solution:

Directly compute the integral:

$$(1 * e^t)(t) = \int_0^t e^\tau d\tau = [e^\tau]_0^t = e^t - 1$$

Step 2: Verify using convolution theorem:

$$\mathcal{L}\{1\} \cdot \mathcal{L}\{e^t\} = \frac{1}{s} \cdot \frac{1}{s-1} = \frac{1}{s(s-1)}$$

Partial fractions: $\frac{1}{s(s-1)} = -\frac{1}{s} + \frac{1}{s-1}$, so the inverse is $-1 + e^t = e^t - 1$ ✓

Answer: $(1 * e^t)(t) = e^t - 1$

Problem: Find $\mathcal{L}^{-1}\left\{\frac{1}{(s+1)(s+3)}\right\}$ using convolution.

Solution:

Step 1: Write as a product: $F(s) \cdot G(s)$ where

$$F(s) = \frac{1}{s+1}, \quad G(s) = \frac{1}{s+3}$$

Step 2: Find the base functions:

$$f(t) = e^{-t}, \quad g(t) = e^{-3t}$$

Step 3: Compute convolution:

$$(f*g)(t) = \int_0^t e^{-\tau} \cdot e^{-3(t-\tau)} d\tau = e^{-3t} \int_0^t e^{2\tau} d\tau$$
$$= e^{-3t} \cdot \frac{e^{2t}-1}{2} = \frac{e^{-t} - e^{-3t}}{2}$$

Answer: $\mathcal{L}^{-1}\left\{\frac{1}{(s+1)(s+3)}\right\} = \frac{e^{-t} - e^{-3t}}{2}$

Problem: A system with transfer function $G(s) = \frac{1}{s+2}$ receives input $f(t) = \sin(t)$. Find the output $y(t)$.

Solution:

Step 1: Find $F(s) = \mathcal{L}\{\sin(t)\} = \frac{1}{s^2+1}$

Step 2: Compute $Y(s) = G(s) \cdot F(s)$:

$$Y(s) = \frac{1}{(s+2)(s^2+1)}$$

Step 3: Partial fractions: $\frac{1}{(s+2)(s^2+1)} = \frac{A}{s+2} + \frac{Bs+C}{s^2+1}$

Solving: $A = \frac{1}{5}$, $B = -\frac{1}{5}$, $C = \frac{2}{5}$

Step 4: Inverse transform:

$$y(t) = \frac{1}{5}e^{-2t} - \frac{1}{5}\cos(t) + \frac{2}{5}\sin(t)$$

Interpretation: The transient response $\frac{1}{5}e^{-2t}$ decays quickly, leaving the steady-state sinusoidal response $-\frac{1}{5}\cos(t) + \frac{2}{5}\sin(t)$. The system attenuates and phase-shifts the input — this is frequency response in action!

Answer: $y(t) = \frac{1}{5}e^{-2t} + \frac{1}{5}(-\cos(t) + 2\sin(t))$

📝 Exam-Style Practice Problems

These problems are similar in style and difficulty to past exam questions. Click each problem to reveal the step-by-step solution.

Practice 1: Find $\mathcal{L}^{-1}\left\{\dfrac{3e^{-2s}}{s^2+9}\right\}$

Solution

Step 1: Identify the base transform (without the delay $e^{-2s}$):

$$\mathcal{L}^{-1}\left\{\frac{3}{s^2+9}\right\} = \mathcal{L}^{-1}\left\{3 \cdot \frac{1}{s^2+3^2}\right\} = \sin(3t)$$

Step 2: Apply the second shifting theorem. The factor $e^{-2s}$ indicates a delay of 2 units:

$$\mathcal{L}^{-1}\{e^{-as}F(s)\} = u_a(t) \cdot f(t-a)$$

Step 3: With $a = 2$ and $f(t) = \sin(3t)$:

$$\mathcal{L}^{-1}\left\{\frac{3e^{-2s}}{s^2+9}\right\} = u_2(t) \sin(3(t-2))$$

Answer: $\boxed{u_2(t)\sin(3(t-2))}$ or written as $\begin{cases} 0 & t < 2 \\ \sin(3(t-2)) & t \geq 2 \end{cases}$

Practice 2: Find $\mathcal{L}^{-1}\left\{\dfrac{se^{-\pi s}}{s^2+2s+5}\right\}$

Solution

Step 1: Complete the square in the denominator:

$$s^2+2s+5 = (s+1)^2 + 4$$

Step 2: Rewrite the numerator: $s = (s+1) - 1$:

$$\frac{s}{(s+1)^2+4} = \frac{(s+1)-1}{(s+1)^2+4} = \frac{s+1}{(s+1)^2+4} - \frac{1}{(s+1)^2+4}$$

Step 3: Find the base inverse transform (without delay):

$$\mathcal{L}^{-1}\left\{\frac{s+1}{(s+1)^2+4}\right\} = e^{-t}\cos(2t)$$
$$\mathcal{L}^{-1}\left\{\frac{1}{(s+1)^2+4}\right\} = \frac{1}{2}e^{-t}\sin(2t)$$

Step 4: So the base function is:

$$f(t) = e^{-t}\cos(2t) - \frac{1}{2}e^{-t}\sin(2t)$$

Step 5: Apply the second shifting theorem with delay $\pi$:

$$\mathcal{L}^{-1}\left\{\frac{se^{-\pi s}}{s^2+2s+5}\right\} = u_\pi(t)\left[e^{-(t-\pi)}\cos(2(t-\pi)) - \frac{1}{2}e^{-(t-\pi)}\sin(2(t-\pi))\right]$$

Answer: $\boxed{u_\pi(t)\left[e^{-(t-\pi)}\cos(2(t-\pi)) - \dfrac{1}{2}e^{-(t-\pi)}\sin(2(t-\pi))\right]}$

Practice 3: Use convolution to find $\mathcal{L}^{-1}\left\{\dfrac{1}{s^2(s^2+1)}\right\}$

Solution

Step 1: Write the product as a product of two transforms:

$$\frac{1}{s^2(s^2+1)} = \frac{1}{s^2} \cdot \frac{1}{s^2+1}$$

Step 2: Find the individual inverse transforms:

$$\mathcal{L}^{-1}\left\{\frac{1}{s^2}\right\} = t$$
$$\mathcal{L}^{-1}\left\{\frac{1}{s^2+1}\right\} = \sin(t)$$

Step 3: Apply the convolution theorem: If $\mathcal{L}^{-1}\{F(s)\} = f(t)$ and $\mathcal{L}^{-1}\{G(s)\} = g(t)$, then

$$\mathcal{L}^{-1}\{F(s)G(s)\} = \int_0^t f(\tau)g(t-\tau) \, d\tau = (f * g)(t)$$

Step 4: Set up the convolution integral:

$$(t * \sin(t)) = \int_0^t \tau \sin(t-\tau) \, d\tau$$

Step 5: Use integration by parts. Let $u = \tau$, $dv = \sin(t-\tau) \, d\tau$:

$$du = d\tau, \quad v = \cos(t-\tau)$$

Step 6: Apply integration by parts:

$$\int_0^t \tau \sin(t-\tau) \, d\tau = \left[\tau\cos(t-\tau)\right]_0^t - \int_0^t \cos(t-\tau) \, d\tau$$
$$= t\cos(0) - 0 - \left[-\sin(t-\tau)\right]_0^t = t - (-\sin(0) + \sin(t)) = t - \sin(t)$$

Answer: $\boxed{t - \sin(t)}$

Interactive Visualizer

Convolution Visualizer

Select two functions below to visualize how convolution works. The animation shows $f(\tau)$ (blue), $g(t-\tau)$ (red), and their product (green) as $\tau$ varies from 0 to $t$. The integral of the product gives the convolution value!

Convolution Components at t = 2.0
Convolution Result: (f * g)(t)

Practice Quiz

Question 1

Express $f(t) = \begin{cases} 0, & t < 1 \\ 3, & t \geq 1 \end{cases}$ using step functions:

  • $f(t) = 3u(t)$
  • $f(t) = 3u(t-1)$
  • $f(t) = 3(t-1)u(t-1)$
  • $f(t) = 3u(t-1) - 3$

Question 2

Find $\mathcal{L}\{\sin(t-\pi/2) \cdot u(t-\pi/2)\}$:

  • $\frac{e^{-\pi s/2}}{s^2+1}$
  • $\frac{1}{s(s^2+1)}$
  • $e^{-\pi s/2} \cdot \frac{1}{s}$
  • $\frac{\cos(\pi/2)}{s^2+1}$

Question 3

The convolution $e^{-t} * e^{-2t}$ equals:

  • $e^{-3t}$
  • $e^{-t} - e^{-2t}$
  • $\frac{1}{2}(e^{-t} - e^{-2t})$
  • $e^{-t} e^{-2t}$

Question 4

Find $\mathcal{L}^{-1}\{e^{-2s} \cdot \frac{3}{s+1}\}$:

  • $3e^{-(t-2)}$
  • $3e^{-(t-2)}u(t-2)$
  • $3e^{-2t}u(t-2)$
  • $e^{-2s-t}$

Question 5

For a system with transfer function $G(s) = \frac{2}{s+3}$ and input $f(t)$, the output $y(t)$ is given by:

  • $y(t) = 2e^{-3t}f(t)$
  • $y(t) = (2e^{-3t} * f(t)) = 2\int_0^t e^{-3(t-\tau)} f(\tau) d\tau$
  • $y(t) = 2f(t-3)$
  • $y(t) = \frac{2f(t)}{s+3}$

Question 6

What is $\mathcal{L}\{u(t-4)\}$?

  • $\frac{1}{s}$
  • $\frac{e^{-4s}}{s}$
  • $e^{-4s}$
  • $\frac{4}{s}$