I faced the following problem in a previous abstract algebra session in my university: Let $\omega$ be a non-zero real number and n be a non-zero natural integer both supposed to be fixed. Calculate the remainder of the Euclidean division of the polynomial $(\cos{\omega}+X\sin{\omega}) ^n$ by $X^2 +1$.
I tried to expand $(\cos{\omega}+X\sin{\omega}) ^n$ but it didn't look helpful for me. Can anyone help?
Write the reminder $aX+b$. You have
$$P(X) = (\cos \omega + \sin\omega X)^n =Q(X)(X^2+1) +aX+b.$$
Substitute in this equation $X$ by $i$. You get $$e^{in \omega} = ai+b.$$ Substitute now $X$ by $-i$. You get
$$e^{-in \omega} = -ai+b$$
Solving in $a,b$ you finally get $b =\cos n\omega$ and $a = \sin n\omega$.