Derivative of an indicator function [duplicate]

This question already has an answer here:

I was wondering what the derivative is of an indicator function. So we have the function:

$$f(Y, a) = \Bbb1(Y \le a).$$

I am trying to differentiate this function to $a$. Is this equal to $0$?

Thank you

marked as duplicate by caverac, Stefan4024, José Carlos Santos, uniquesolution, Dietrich BurdeDec 3 '17 at 19:24

• Hey Nina! Welcome to MSE. I've taken the liberty of editing your post to use MathJax (which I highly recommend you learn because it makes it so much easier to read your questions.) Feel free to edit it if you don't like how I've edited it – eepperly16 Dec 3 '17 at 10:40

The indicator function $\Bbb 1_{Y\ge a}$ has a jump discontinuity at $a$ since
$$\lim_{y\to a^-} \Bbb 1_{Y\ge a}(y) = 0 \ne \lim_{y\to a^+} \Bbb 1_{Y\ge a}(y) = 1.$$
So $\Bbb 1_{Y\ge a}$ is not even continuous at $a$, and certainly not differentiable.
If you are a physicist, you might say that the derivative of $\Bbb 1_{Y\ge a}$ is a dirac delta function $\delta(y-a)$, but this is outside of the purview of the analysis taught in most undergraduate classes. The rigorous mathematics of delta functions requires some care.
• The derivative of the indicator function exists and equals $0$ everywhere except at $y = a$. Thus, in this paper you cite, I imagine that in the context the author is writing in, they don't need to evaluate the derivative at every point, but almost every point. – eepperly16 Dec 3 '17 at 10:54
• It is not uncommon in applications of math for one to ignore points at which the function is not differentiable if there are finitely many. For example, in Machine Learning, when training certain algorithms, the derivative of a certain cost function is not defined at the point $x = 0$. But since its just a single point out of the infinitely many possible points, in applications we don't actually need to care. I imagine your paper is very similar: in your actual Matlab implementation, you can treat the derivative of the indicator function as $0$ in practice – eepperly16 Dec 3 '17 at 10:58