On the surface it’s one of the most boring possible functions. Two straight horizontal lines: the Heaviside step function.

Usually denoted θ(x), it’s equal to 0 if x is less than zero, and it’s equal to one if x is greater than zero. At x = 0 exactly it doesn’t really matter what it is for physics purposes so it’s generally taken to be 1. Mathematicians tend to define it as 0.5 at x = 0, but they’re kind of weird.

Believe it or not, there’s some pretty good reasons for having the Heaviside function around. Walk into a dark room and flip on the lights. Before you hit the switch, the electrical current was a constant 0. After, it’s a 60 Hz alternating sine wave. You can express the whole thing by saying that the current is described by that sine wave multiplied by the step function. And since the step function is in fact a nice function with mathematically well-defined properties you can do calculus on the moment of transition.

Take for instance the harmonic oscillator – say, a weight oscillating on a spring. At time t = 0 you turn on a frictional force. With a little bit of math you can write the differential equation in terms of the step function and find an exact mathematical expression for the behavior of the system. It’s going to look kind of like this:

There’s one kind of behavior before t = 0, and a different kind after. The step function formalism is a little superfluous in this slightly contrived case from a problem-solving standpoint, but it’s a good example of the type of situation where you have to deal analytically with an instant change in the behavior of a system.

Like all math, even the easy-seeming stuff usually has deep waters nearby. The Heviside step function is just a stone’s throw away from the Dirac delta function, which (so to speak) represents whacking something with a hammer rather than flipping on a switch. We’ll save that for later.