This is sample work of factorising with fractions in an inequality. I've been told that the 3rd line is incorrect, as $\displaystyle a^2+b^2$ cannot be factored over a real number. Can anyone help me determine if the factoring simply stops at the second line, or is there a correct way to continue?

Many thanks.

$\displaystyle \frac{a^2+b^2}{2} \geq ab$

$\displaystyle (a^2 + b^2/ 2) - ab$> 0

$\displaystyle \frac{(a+b)(a-b)}{2}-ab\geq0$

$\displaystyle \frac{a^2-ab+ab+b^2}{2}-ab\geq0$

$\displaystyle \frac{a^2+b^2-2ab}{2}\geq0$

$\displaystyle (a^2 - 2ab + b^2)/2$>0

$\displaystyle \frac{(a-b)^2}{2}\geq0$