How to prove $x^2+1$ is a factor of $f(x)=(\cos(a)+x\sin(a))^n-\cos(na)-x\sin(na)$. I am not sure if I can expand $(\cos(a)+x\sin(a))^n$ by using Binomial theorem or De Moivre's theorem. I am stuck, please help.

Thank you!