$${P = Iu = i^2 R = i^2_m R \sin^2 \omega t = \frac {I^2_m R} {2} (1 - \cos(2\omega t))}$$