# Why is $\frac{p(1-p)}{1−(1−p)^2}=\frac{1-p}{2-p}$? [closed]

I found this solution in an old exam:

$$\frac{p(1-p)}{1−(1−p)^2}=\frac{1-p}{2-p}$$

Without any further explanation. Could someone explain to me how to do this transition?

• $a^2-b^2=(a-b)(a+b).$ Oct 3, 2016 at 8:07
• bottom left : $$1-(1-p)^2 = 1 - 1 + 2p - p^2 = 2p - p^2 = p (2 - p)$$ or $$1-(1-p)^2 = 1^2-(1-p)^2 = (1 + (1-p))(1- (1-p)) = (2-p) p$$ Oct 3, 2016 at 10:06

\begin{align} \frac{p(1-p)}{1−(1−p)^2}&=\frac{p(1-p)}{(1+1-p)(1-1+p)}\\ &=\frac{p(1-p)}{p(2-p)}\\ &=\frac{1-p}{2-p}. \end{align}

• Considering a subtlety proposed by @YvesDaoust, this is only valid when read from left to right. Oct 3, 2016 at 8:50

You have two basic options to solve this.

First off, you can just write out the denominator to get $$1-(1-p)^2=1-(1-2p+p^2) = -p^2 +2p = p(2-p)$$

and then cancel out the $p$ top and bottom.

Or, you can "cleverly" see that $1-(1-p)^2 = 1^2-(1-p)^2$ and use the equality $$a^2-b^2 = (a-b)(a+b)$$

to get basically the same thing, since

$$1-(1-p)^2 = (1-(1-p))(1+(1-p)) = p(2-p)$$

By inspection (or by $(1-p)^2=1$), $p=0$ and $p=2$ are roots of the denominator. As the coefficient of the highest power is $-1$, it factors as $p(2-p)$. The rest is up to you.

• Note that the fact that the expressions may be undefined at $p=0$ or $p=2$ does not matter, the factorization of the denominator remains valid.
– user65203
Oct 3, 2016 at 8:41
• Yes, factorization remains valid – but reducing $\frac pp$ to $1$ changes the domain. Oct 3, 2016 at 9:00
• @CiaPan: that's why I said "The rest is up to you."
– user65203
Oct 3, 2016 at 9:00

hint: it is $$1-(1-p)^2=(1-(1-p))(1+1-p)$$

Perhaps one should say that $p=0$ and $p=2$ are excluded, because then not both terms are defined. For example, $$\frac{p(1-p)}{1−(1−p)^2}=\frac{0}{0}\neq \frac{1}{2}= \frac{1-p}{2-p}.$$ For $p\neq 0,2$ however, both terms are defined and we can cancel, i.e., $$\frac{p(1-p)}{1−(1−p)^2}=\frac{p(1-p)}{p(2-p)}=\frac{1-p}{2-p}.$$

• Well, isn't $p=0$ undefined since then the denominator $1-(1-p)^2=0$? Oct 3, 2016 at 8:22
• Yes, of course.. Oct 3, 2016 at 8:22
• By convention, the denominator $\not=0$ and so $p=0,2$ do not need to be taken into consideration. Oct 3, 2016 at 8:25
• @YuxiaoXie: I agree with you, but there is a little subtlety: for $p=0$, the RHS is defined, so the identity cannot be read "from right to left".
– user65203
Oct 3, 2016 at 8:30