<s>[INST] Prove a trigonometric identity: $\cos^2A+\cos^2B+\cos^2C+2\cos A\cos B\cos C=1$ when $A+B+C=\pi$ There is a trigonometric identity:

$$\cos^2A+\cos^2B+\cos^2C+2\cos A\cos B\cos C\equiv 1\text{ when }A+B+C=\pi$$

It is easy to prove it in an algebraic way, just like that:

$\quad\cos^2A+\cos^2B+\cos^2C+2\cos A\cos B\cos C\\=\cos^2A+\cos^2B+\cos^2\left(\pi-A-B\right)+2\cos A\cos B\cos \left(\pi-A-B\right)\\=\cos^2A+\cos^2B+\cos^2\left(A+B\right)-2\cos A\cos B\cos \left(A+B\right)\\=\cos^2A+\cos^2B+\left(\cos A\cos B-\sin A\sin B\right)^2-2\cos A\cos B\left(\cos A\cos B-\sin A\sin B\right)\\=\cos^2A+\cos^2B+\cos^2A\cos^2B+\sin^2A\sin^2B-2\sin A\cos A\sin B\cos B-2\cos^2A\cos^2B+2\sin A\cos A\sin B\cos B\\=\cos^2A+\cos^2B-\cos^2A\cos^2B+\left(1-\cos^2A\right)\left(1-\cos^2B\right)\\=\cos^2A+\cos^2B-\cos^2A\cos^2B+1-\cos^2A-\cos^2B+\cos^2A\cos^2B\\=1$

Then, I want to find a geometric way to prove this identity, as $A+B+C=\pi$ and it makes me think of the angle sum of triangle. However, it is quite hard to prove it in a geometric way. Therefore, I hope there is someone who can help. Thank you!
 [/INST] A purely geometric way doesn't look likely, because the degrees of the cosine terms (two and three respectively) don't match. For what it's worth, here is an alternative trigonometric derivation.
Writing $2\cos B\cos C$ in the second term as $\cos (B+C)+\cos(B-C)$ transforms our expression to$$\cos^2A+\cos^2B+\cos^2C+[\cos(B+C)+\cos(B-C)]\cos A.$$Notice that $\cos(B+C)=-\cos A$, and use this conversion forwards and backwards to give$$\cos^2B+\cos^2C-\cos(B-C)\cos(B+C).$$Now write the last term as  $-\frac12(\cos2B+\cos2C)$ and express the first terms also in double-angle format. Then cancellation yields the required result.
</s>