Properties of Triangles

In any $\triangle ABC$, prove that $\;$ $c^2 = \left(a - b\right)^2 \cos^2 \left(\dfrac{C}{2}\right) + \left(a + b\right)^2 \sin^2 \left(\dfrac{C}{2}\right)$


$\begin{aligned} RHS & = \left(a - b\right)^2 \cos^2 \left(\dfrac{C}{2}\right) + \left(a + b\right)^2 \sin^2 \left(\dfrac{C}{2}\right) \\\\ & \left[\text{Note: } \cos^2 \left(\dfrac{\theta}{2}\right) = \dfrac{1 + \cos \theta}{2}, \; \sin^2 \left(\dfrac{\theta}{2}\right) = \dfrac{1 - \cos \theta}{2}\right] \\\\ & = \left(a - b\right)^2 \left(\dfrac{1 + \cos C}{2}\right) + \left(a + b\right)^2 \left(\dfrac{1 - \cos C}{2}\right) \\\\ & = \dfrac{1}{2} \left[\left(a - b\right)^2 \left(1 + \cos C\right) + \left(a + b\right)^2 \left(1 - \cos C\right)\right] \\\\ & = \dfrac{1}{2} \left[\left(a^2 + b^2 - 2 a b\right) + \cos C \left(a^2 + b^2 - 2 a b\right) \right. \\ & \hspace{2cm} \left. + \left(a^2 + b^2 + 2 a b\right) - \cos C \left(a^2 + b^2 + 2 a b\right)\right] \\\\ & = \dfrac{1}{2} \left[2 a^2 + 2 b^2 + \cos C \left(- 4 a b\right)\right] \\\\ & = a^2 + b^2 - 2 a b \cos C \\\\ & \left[\text{Note: Cosine rule: } \cos C = \dfrac{a^2 + b^2 - c^2}{2 a b} \right. \\ & \hspace{3cm} \left. \implies c^2 = a^2 + b^2 - 2 a b \cos C\right] \\\\ & = c^2 = LHS \end{aligned}$

Hence proved.