They both start from: $\cos^2(x) - \sin^2(x)$ We also know:$\cos^2(x) + \sin^2(x) = 1$ Now we can either substitute $1 - \cos^2(x) =\sin^2(x)$or $1 - \sin^2(x) = \cos^2(x)$ Depending on which substitution we do, we get either (Substitution 1):$\cos^2(x) - (1 - \cos^2(x)) = 2\cos^2(x) - 1$ or (Substitution 2):$(1 - \sin^2(x)) - \sin^2(x) = 1 - 2\sin^2(x)$