If A + B + C = π, prove that
$\cos ^{2} A+\cos ^{2} B+\cos ^{2} C=1-2 \cos A \cos B \cos C$
$=\cos ^{2} A+\cos ^{2} B+\cos ^{2} C$
Using formula,
$\frac{1+\cos 2 A}{2}=\cos ^{2} A$
$=\frac{1+\cos 2 \mathrm{~A}}{2}+\frac{1+\cos 2 \mathrm{~B}}{2}+\frac{1+\cos 2 \mathrm{C}}{2}$
$=\frac{1+\cos 2 \mathrm{~A}+1+\cos 2 \mathrm{~B}+1+\cos 2 \mathrm{C}}{2}$
$=\frac{3+\cos 2 \mathrm{~A}+\cos 2 \mathrm{~B}+\cos 2 \mathrm{C}}{2}$
Using,
$\cos A+\cos B=2 \cos \left(\frac{A+B}{2}\right) \cos \left(\frac{A-B}{2}\right)$
$=\frac{3+\cos 2 \mathrm{~A}+2 \cos \left(\frac{2 \mathrm{~B}+2 \mathrm{C}}{2}\right) \cos \left(\frac{2 \mathrm{~B}-2 \mathrm{C}}{2}\right)}{2}$
$=\frac{3+\cos 2 \mathrm{~A}+2 \cos (\mathrm{B}+\mathrm{C}) \cos (\mathrm{B}-\mathrm{C})}{2}$
Using, since $A+B+C=\pi$
$\rightarrow \mathrm{B}+\mathrm{C}=180-\mathrm{A}$
And, $\cos (\pi-A)=-\cos A$
$=\frac{3+\cos 2 A+2 \cos (\pi-A) \cos (B-C)}{2}$
$=\frac{3+\cos 2 A-2 \cos (A) \cos (B-C)}{2}$
Using $\cos 2 A=2 \cos ^{2} A-1$
$=\frac{3+2 \cos ^{2} A-1-2 \cos (A) \cos (B-C)}{2}$
$=\frac{2+2 \cos ^{2} A-2 \cos (A) \cos (B-C)}{2}$
$=1+\cos ^{2} A-\cos A \cos (B-C)$
$=1+\cos A\{\cos A-\cos (B-C)\}$
Using,
$\cos A-\cos B=2 \sin \left(\frac{A+B}{2}\right) \sin \left(\frac{B-A}{2}\right)$
$=1+\cos A\left(2 \sin \left(\frac{A+B-C}{2}\right) \sin \left(\frac{B-C-A}{2}\right)\right)$
Since,$A+B+C=\pi$
$=1+\cos A\left(2 \sin \left(\frac{\pi-C-C}{2}\right) \sin \left(\frac{B-(\pi-B)}{2}\right)\right)$
$=1+\cos A\left(2 \cos C \sin \left(\frac{B}{2}-\frac{\pi}{2}\right)\right)$
$=1-2 \cos A \cos C \cos C$
$=$ R.H.S