This question already has an answer here:
Prove that for $x>0$, $x + \frac1x \ge 2$ and equality holds if and only if $x=1$.
I have proven that $x+ \frac1x \ge 2$ by re-writing it as $x^2 -2x +1 \ge0$ and factoring to $(x-1)^2\ge0$ which is true because you cannot square something and it be negative.
Now I am stuck on the part where I have to prove equality to hold if and only if $x=1$. Any suggestions?