I am trying to understand the following steps my teacher did in class (from top to bottom). I tried to look up different trigonometric identities but couldn't figure out where the arrival of cosine squared came from, and the other sine values arrived to the right of the plus sign.
Thanks!
$$ \begin{align} \pi &= \frac 1 T \int_0^t F \cos \omega t \frac{F}{|{\underline{z}_m}|} \cos(\omega t - \theta) \ dt \\ &= \frac{F^2}{T |\underline{z}_m|} \int_0^t \left[ \cos^2 \omega t \cos \theta + \cos \omega t \sin \omega t \sin \theta \right] \ dt \end{align}$$
Assuming that $F$ and $\left| z_m \right|$ are constants, they can come all the way outside the integral.
This leaves you with:
$$ \cos (\omega t) \cos (\omega t - \theta) $$
as the integrand.
Note the trig identity: $$ \cos(a - b) = \cos(a) \cos(b) + \sin(a) * \sin(b) $$ substituting $$ a = \omega t \qquad and \qquad b = \theta, $$ it follows $$ \cos(\omega t - \theta) = \cos(\omega t) \cos(\theta) + \sin(\omega t) \sin(\theta) $$ From this, it follows: $$ \cos(\omega t)\cos(\omega t - \theta) = \cos^2(\omega t) \cos(\theta) + \cos(\omega t) \sin(\omega t) \sin(\theta) $$
which is the integrand on your second line.