TITLE: Evaluate $\int(x^{91}+x^{327})\cos(x)\mathrm{d}x \quad .$
QUESTION [9 upvotes]: Evaluate  $$\int\left(x^{91}+x^{327}\right)\cos(x)\mathrm{d}x \quad .$$
It's my first time to face integration like that. I just need a clue to start because I tried, but it's not working
Thanks in advance

REPLY [3 votes]: By brute force and with the help of previous answers, I think the answer is:
If $n$ is even, then:
$$I_n = \sum_{k=0}^{n-2} (-1)^k (2k)!\, x^{n-2k} \sin x + \sum_{k=0}^{n-2} (-1)^k k!\, x^{n-(2k+1)} \cos x + (-1)^{n/2} n!\, I_0,$$
with $I_n=\int x^n \cos x\, dx$ and $I_0=\sin x$. If $n$ is odd, then:
$$I_n = \sum_{k=0}^{n-1} (-1)^k (2k)!\, x^{n-2k} \sin x + \sum_{k=0}^{n-1} (-1)^k k!\, x^{n-(2k+1)} \cos x + (-1)^{(n-1)/2}(n-1)!\,(x \sin x+\cos x)$$