# derivative of indicator function

I have an indicator function $I(D\leq Q)$which is equal to $1$ if $D\leq Q$ and $0$ otherwise. What would be derivative of this function with respect to different variables such as $D$ or $Q$ or $P$ ($D$ is a function of $P$).

Clarification to what I am trying to do:

• $D$ represents demand which is a function of price, assume $D=a-bp$
• $Q$ represents quantity or supply, which is assumed to be fixed

$$\text{profit} = p\min(D,Q)= PDI(D\lt Q)+PQI(Q\leq D)$$

I want to take derivative of profit with respect to price.

-
On what domain is your indicator function defined? What do the variables D, Q, and P represent? Have you verified wether you can derive such function? – Vitalij Zadneprovskij May 9 '12 at 22:29
Thanks for the answers. Please see the clarification made to original question. Also I would be grateful if you briefly explain what you mean by derivative in the sense of distribution. Thanks – Eln May 14 '12 at 19:34
@Elnaz: Please consider registering, so that you don't log in as two different people and have to get "permission" to edit your own post. Thank you. – Arturo Magidin May 14 '12 at 19:42
Thank you. I just registered. Also I am trying to delete my answer but can't find how to do it. Sorry – Eln May 14 '12 at 19:51

The derivative in the usual sense does not exist at a discontinuity, and is $0$ everywhere else. If you're talking about a derivative in the sense of distributions, $\dfrac{\partial}{\partial D} I(D \le Q) = -\delta(D-Q)$.
$\delta$ is symmetric, so $\delta(D-Q) = \delta(Q-D)$. $\delta$ can be thought of as the derivative of the Heaviside function $H(x) = 1$ for $x > 0$, $0$ for $x < 0$, so if $f(x)$ is smooth except for a jump discontinuity at $x = a$ with $\lim_{x \to a+} f(x) - \lim_{x \to a-} f(x) = c$, then $\dfrac{\partial f}{\partial x} = c \delta(x-a) +$ (some smooth function). – Robert Israel May 14 '12 at 21:44
The second part is the derivative of $f(x)$ away from $x=a$. – Robert Israel May 14 '12 at 23:24