Mathwords logoMathwords

Heaviside Step Function — Definition, Formula & Examples

The Heaviside step function is a piecewise function that equals 0 for negative inputs and 1 for positive inputs. It acts like a mathematical "on/off switch" that jumps from 0 to 1 at a specified point.

The Heaviside step function H(t)H(t) is defined as H(t)=0H(t) = 0 for t<0t < 0 and H(t)=1H(t) = 1 for t0t \geq 0. A shifted version H(tc)H(t - c) transitions from 0 to 1 at t=ct = c. The value at exactly t=0t = 0 is sometimes defined as 12\tfrac{1}{2} depending on the convention used.

Key Formula

H(t)={0,t<01,t0H(t) = \begin{cases} 0, & t < 0 \\ 1, & t \geq 0 \end{cases}
Where:
  • tt = The input variable (often representing time)
  • H(t)H(t) = Output: 0 before the jump, 1 at and after the jump

How It Works

The Heaviside function lets you "turn on" another function at a chosen time. To activate a function f(t)f(t) starting at t=ct = c, multiply it by H(tc)H(t - c). For example, sin(t)H(t3)\sin(t) \cdot H(t - 3) equals zero when t<3t < 3 and equals sin(t)\sin(t) when t3t \geq 3. In Laplace transforms, the shifted Heaviside function has the transform L{H(tc)}=ecss\mathcal{L}\{H(t-c)\} = \frac{e^{-cs}}{s}, which makes it essential for solving differential equations with discontinuous forcing functions.

Worked Example

Problem: Write a single expression for the function that equals 0 for t<2t < 2, equals 5 for 2t<62 \leq t < 6, and equals 0 again for t6t \geq 6.
Step 1: Turn on the value 5 at t=2t = 2 using a shifted Heaviside function.
5H(t2)5\,H(t - 2)
Step 2: Turn off the value 5 at t=6t = 6 by subtracting another shifted Heaviside function.
5H(t2)5H(t6)5\,H(t - 2) - 5\,H(t - 6)
Step 3: Verify: for t<2t < 2, both terms are 0. For 2t<62 \leq t < 6, the first term gives 5 and the second is still 0. For t6t \geq 6, both terms are 5, so the difference is 0.
f(t)=5[H(t2)H(t6)]f(t) = 5\bigl[H(t-2) - H(t-6)\bigr]
Answer: f(t)=5H(t2)5H(t6)f(t) = 5\,H(t-2) - 5\,H(t-6), which creates a rectangular pulse of height 5 on the interval [2,6)[2, 6).

Why It Matters

The Heaviside function is indispensable in differential equations courses when modeling systems subjected to sudden forces — a circuit switched on at a specific time, or a load suddenly applied to a beam. It pairs directly with Laplace transforms, giving you a systematic algebraic method to solve problems that would be cumbersome with purely piecewise techniques.

Common Mistakes

Mistake: Confusing H(tc)H(t - c) with H(ct)H(c - t), which reverses the on/off behavior.
Correction: H(tc)H(t - c) turns on at t=ct = c (equals 0 before, 1 after). H(ct)H(c - t) does the opposite: it equals 1 before t=ct = c and 0 after. Pay attention to the sign inside the argument.