Euclidean division exercise 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? 
 A: 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$.
A: This is essentially the same answer as mathcounterexamples.net's answer, but it's a slightly different explanation and thought process, which seems to me to be slightly more natural (though I did upvote mce.net's answer). Hence I'll give my thought process on seeing this question.
We can calculate the remainder on division by a polynomial $f\in k[x]$ by working in the ring $k[x]/(f)$, since the remainder of a polynomial $a$ on division by $f$ is the unique representative of $a$ in $k[x]/(f)$ of degree less than the degree of $f$.
Then recognize that $\Bbb{R}[X]/(X^2+1)\cong \Bbb{C}$ via $X\mapsto i$.
Thus $(\cos \omega +X\sin \omega)^n\mapsto (e^{i\omega})^n=e^{i\omega n} = \cos(n\omega) + i \sin(n\omega)$. Thus the remainder on division by $X^2+1$ must be $\cos(n\omega)+X\sin(n\omega)$.
