Minimizing a symmetric sum of fractions without calculus

This is elementary:

$$\frac{(1-p)^2}p+\frac{p^2}{1-p}=\frac{1-3p+3p^2-p^3+p^3}{p(1-p)}=\frac1{p(1-p)}-3.$$

The minimum is achieved by the vertex of the parabola $p(1-p)$, i.e. $p=\dfrac12\to\dfrac1{\frac14}-3$, as can be shown by completing the square.


By Rearrangement inequality assuming wlog $p\ge(1-p)$

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

with equality for

$$p=1-p \implies p=\frac12$$


** I modified this to give a proof with elementary methods only, no inequality theorems needed**

Simple transformations lead to $$ \frac{(1-p)^2}{p} + \frac{p^2}{1-p} = - 3 + \frac{4}{1 - 4 (p-1/2)^2} $$ Now it is easy to see that the global minimum of $f(p)$ for $p \in (0 , \; 1/2]$ occurs at $p = 1/2$.