0

Having

$$P=Nn_1n_2\qquad (n_1+n_2=N),$$

I compute the total derivative $\frac{dP}{dn_1}$ in two ways:

1)

$$\frac{dP}{dn_1}=\frac{d}{dn_1}\Big[(n_1+n_2)n_1n_2\Big]=n_1n_2+(n_1+n_2)n_2$$

2)

$$\frac{dP}{dn_1}=\frac{d}{dn_1}\Big[Nn_1(N-n_1)\Big]=N(N-n_1)-Nn_1$$

Which are not equal after the substitution $N=n_1+n_2$: One gives $2n_1n_2+n_2^2$, while the other gives $n_2^2-n_1^2$.

Where am I going wrong? I am confused.

AHB
  • 1,469
  • 1
    For the second you neglect the fact that $N$ is a function of $n_1$. – lulu Apr 22 '20 at 10:48
  • @lulu, then what is wrong with the following line of reasoning? "The first one is wrong for I am neglecting the fact that $n_1$ is a function of $N$: $n_1(N)=N-n_2$" – AHB Apr 22 '20 at 10:53
  • You are differentiating with respect to $n_1$, you need to track all the dependencies on $n_1$. – lulu Apr 22 '20 at 10:58
  • @lulu, then what is wrong with the following line of reasoning? "The first one is wrong for I am neglecting the fact that $n_2$ is a function of $n_1$: $n_2(n_1)=N−n_1$" – AHB Apr 22 '20 at 11:02
  • $N$ is not fixed, so there is no dependency of that form. If you fix $N$, then of course you create a dependency. – lulu Apr 22 '20 at 11:05
  • You have created a function of two variables, $F(x,y)=(x+y)xy$. These two variables can vary independently. That is, we can move $x$ while holding $y$ fixed, and conversely. In that sense, it certainly makes sense to compute the two partial derivatives. Giving a new name to $x+y$ doesn't change anything. – lulu Apr 22 '20 at 11:07

0 Answers0