Solution (source code)

= Solution

Square the two-term form and integrate directly:
$$
\int_0^{2\pi}(\sin x-\sqrt3\cos x)^2dx
=\int_0^{2\pi}\sin^2x\,dx+3\int_0^{2\pi}\cos^2x\,dx
-2\sqrt3\int_0^{2\pi}\sin x\cos x\,dx.
$$
The first two integrals are each $\pi$ before their prefactors, while the cross term is zero because its integrand is $\tfrac12\sin2x$. Thus the result is again \b[$4\pi$], agreeing with <Parseval's identity>.