Taking the derivative of a constraint equation

91 Views Asked by At

Suppose I have a probability distribution $\rho$ with the constraint:

$$ \sum_{q\in\mathbb{Q}} \rho[q]=1 $$

I take the total derivative on each side with respect to $\rho[r]$ where $r\in\mathbb{Q}$, and I get:

$$ \frac{\partial}{\partial \rho[r]}\sum_{q\in\mathbb{Q}} \rho[q]=\frac{\partial}{\partial \rho[r]}1 $$

Thus,

$$ 1=0 $$

Where is my mistake? Please I need some sleep.

1

There are 1 best solutions below

0
On

A simple example, to clarify the issue. Suppose you want to take the derivative of $$\sum_{i=1}^3 x_i=1 $$ with respect to $x_3$. The issue is that you have only two independent variables, say $x_2 $ and $ x_3$. Then $x_1$ is not an independent variable. So when you take the derivative of $x_1$ with respect to $x_3$, you really need to take the derivative of $1-x_2-x_3$, that is $-1$. So the derivative of the left hand side is $$\frac{\partial}{\partial x_3}\left(\sum_{i=1}^3 x_i\right)=\frac{\partial}{\partial x_3}(x_1)+\frac{\partial}{\partial x_3}(x_2)+\frac{\partial}{\partial x_3}(x_3)=-1+0+1=0.$$