Given that $$\int_{-\infty}^{\infty}\frac{\cos x+x \sin x}{x^2+\cos^2x} dx$$
I've tried many methods but ended up it didn't work. Is there any substitution which is good for this problem? I've looked WA, if this question is in indefinite integral,its answer will be $\tan^{-1}(x\sec (x))+c$ which is a pretty decent answer.
Hope someone would point me for it. Thanks in advance.