1. ## Mysterious negative sign

why is the differential of $\frac{x}{p} - \frac{n-x}{1-p}$ = $\frac{x}{p^2} - \frac{n-x}{(1-p)^2}$ and not $\frac{x}{p^2} + \frac{n-x}{(1-p)^2}$

2. ## Re: Mysterous negative sign

Originally Posted by alyosha2
why is the differential of $\frac{x}{p} - \frac{n-x}{1-p}$ = $\frac{x}{p^2} - \frac{n-x}{(1-p)^2}$ and not $\frac{x}{p^2} + \frac{n-x}{(1-p)^2}$
I don't think you have this correct. I assume that p is the variable you are differentiating with respect to.

\begin{align*}&\frac{d}{dp} \left(\frac{x}{p}-\frac{n-x}{1-p}\right) =\\ \\&-\frac{x}{p^2} - \left(-\frac{(n-x)}{(1-p)^2}(-1)\right) = \\ \\ &-\frac{x}{p^2} - \frac{n-x}{(1-p)^2}\end{align}

in the 2nd term the first minus sign comes from $\frac{d}{dp}\frac{1}{p}=-\frac{1}{p^2}$ the second comes from the $-p$ that's part of the denominator.

3. ## Re: Mysterous negative sign

OK, got it. Thanks.

4. ## Re: Mysterous negative sign

Originally Posted by alyosha2
But why doesn't $\frac{d}{dp}(\frac{x}{p}-\frac{n-x}{1-p}) = -\frac{x}{p^2}-(\frac{(n-x)}{(1-p)^2}(-1))$? where does that extra minus sign come from in front of the second term?
that's the form of the derivative.

$\frac{d}{dp}\left(\frac{n-x}{1+p}\right)=-\frac{n-x}{(1+p)^2}$

when you change p to (-p) you have another factor of -1 that has to be included

$\frac{d}{dp}\left(\frac{n-x}{1- p}\right)=-\frac{n-x}{(1-p)^2}(-1) =\frac{n-x}{(1-p)^2}$

5. ## Re: Mysterous negative sign

Jut realised I didn't actually understand the answer given.

It's just a really basic use of the chain rule of differentiation. Chain rule - Wikipedia, the free encyclopedia

The second term is being treated as a composite function u = (1 - p) and so the -1 is just the differential of (1 - p).

Disgustingly simple.