Can somebody please help me to prove the formula below
$\frac{1}{T} \int_{0}^{T} \operatorname{Re}\left[A e^{i \omega t}\right] \operatorname{Re}\left[B e^{i \omega t}\right] d t=\frac{1}{2} \operatorname{Re}\left[A B^{*}\right]$
Where T is the period, A and B are some complex numbers and B* denotes complex conjugate.
Just write $A$ as $x+iy$, $B$ as $u+iv$, and $e^{i\omega t}$ by Euler's formula, take their real parts, expand and integrate directly. The result will be equal to the RHS given.