A trigonometric identity!
1 – cos(x) is equal to 2 * sin^2(x/2)
This is known as the “half-angle formula” for cosine.
Here’s the derivation:
1 – cos(x) = 1 – (1 – 2 * sin^2(x/2)) (using the half-angle formula for cosine)
= 2 * sin^2(x/2)
So, 1 – cos(x) is equal to 2 * sin^2(x/2).