\[\frac{1}{2}a^{2} + ab + \frac{1}{2}b^{2} =\]
\[= \frac{1}{2} \cdot \left( a^{2} + 2ab + b^{2} \right) =\]
\[= \frac{1}{2} \cdot (a + b)^{2}.\]