What Is the Derivative of an Indicator Function, and Its Integral?
At a glance
- 1. Choose the set
For the common example, take the indicator of an interval [a,b] with a < b.
- 2. Differentiate ordinarily
The function is constant between jumps, so its derivative is zero there and undefined at the endpoints.
- 3. Integrate the indicator
Its integral over an interval is the length of the part that overlaps [a,b].
- 4. Account for jumps
In the distributional sense, the derivative is a positive point mass at a and a negative one at b.
An indicator function records whether a point belongs to a set: it equals 1 inside the set and 0 outside. Its derivative depends on what kind of derivative you mean. For the common case of an interval, the ordinary derivative vanishes wherever the function is locally constant, while the jumps at the interval’s edges have no ordinary derivative.
The integral is easier: integrating an interval’s indicator measures how much of the integration region lies inside that interval. A distributional derivative gives a precise way to represent the jumps as point masses.
Indicator of an interval
Let and define
Changing whether either endpoint is included does not change its integral or its distribution. A single point has length zero, so endpoint values do not affect these results.
Ordinary derivative
For every strictly between the endpoints, the indicator is locally constant at 1. For every outside the closed interval, it is locally constant at 0. Thus
At and , the function jumps between 0 and 1. It is discontinuous at each point, so it cannot be differentiable there. The ordinary derivative is therefore zero almost everywhere, but that does not mean the function is constant.
Integral of the indicator
For any interval with ,
In particular, over the whole real line,
This holds as a Riemann integral on finite intervals and as a Lebesgue integral. More generally, for a measurable set , the integral of its indicator over a measurable region is the measure of .
Example: Take . On , the function equals 1 from 2 to 5 and 0 elsewhere, so
Its accumulated integral from the far left is
The function has derivative except at the jump points, where its derivative does not exist. This is consistent with the fundamental theorem of calculus in its usual form for absolutely continuous functions; the indicator itself is not absolutely continuous because it has jumps.
Distributional derivative: the jumps as point masses
Ordinary differentiation does not record the jumps, but distribution theory does. The distributional derivative is defined by how it acts on every smooth, compactly supported test function :
The Dirac delta acts on a test function by . Therefore,
The positive sign at represents the jump from 0 to 1; the negative sign at represents the jump from 1 to 0. For the example , the distributional derivative is . Its total mass is zero, matching the fact that the indicator starts and ends at 0 when moving from left to right across the whole real line.
Common mistakes
- Saying the derivative is simply zero. It is zero wherever the ordinary derivative exists, but the derivative does not exist at the jump points. The distributional derivative also includes point masses there.
- Using the fundamental theorem without checking its conditions. A function with jumps is not absolutely continuous, so integrating its ordinary derivative need not recover its change in value.
- Confusing the integral with the derivative. The integral of the indicator measures interval length; the distributional derivative records the locations and directions of the jumps.
- Treating endpoint conventions as consequential here. Including or excluding the endpoints changes neither the integral nor the distribution associated with the indicator.
References
- Real Analysis: Modern Techniques and Their Applications — Gerald B. Folland
- Introduction to the Theory of Distributions — Friedlander and Joshi
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.