How to find: $\lim\limits _{n \rightarrow \infty} n^{3} \int\limits_{-\pi}^{\pi} \frac{\cos (2 n x)}{1+x^{8}} d x$ Problem:
What is the following limit?
$\lim _{n \rightarrow \infty} n^{3} \int_{-\pi}^{\pi} \frac{\cos (2 n x)}{1+x^{8}} d x$
Attempt:
Denote $ f(x) = \frac{1}{1+x^8} $ for $ x \in [ -\pi , \pi] $ ( Note that this function is infinitely differentiable. )
$ I_n = n^{3} \int_{-\pi}^{\pi} \frac{\cos (2 n x)}{1+x^{8}} d x = \frac{n^{3}}{2} \int_{-\pi}^{\pi} \frac{ e^{2inx} + e^{-2inx} }{1+x^{8}} d x =  \frac{2\pi \cdot n^{3}}{2} ( \hat{f}(2n) + \hat{f}(-2n) ) $.
Now we use  $ \hat{f^{(k)}}(n) = (in)^{k}f(n) $ ( since $ f$ is indeed differentiable on its interval ), thus
$ I_n = \frac{2\pi \cdot n^{3}}{2} ( \hat{f}(2n) + \hat{f}(-2n) ) = \pi \cdot n^3 ( \frac{\hat{f^{(3)}}(2n)}{-2^3n^3} 
 + \frac{\hat{f^{(3)}}(-2n)}{-2^3n^3} ) = \frac{-\pi}{8} ( \hat{f^{(3)}}(2n) + \hat{f^{(3)}}(-2n)  )   $
And by Riemann-Lebesgue we get $ I_n \to 0  $.
I'm not really sure whether the limit I calculated is justified or the proof's specious ( Which, I think it is but I don't know why, probably where I said that $ \hat{f^{(k)}}(n) = (in)^{k}f(n) $ ). then I had doubts whether the limit is $ 0, \infty, -\infty $ or none of them, I think it's none of them but don't have a gist of justification as to why. Can you please help as to how to find the limit? thanks very much for the help in advance!
 A: Too long for a comment
Using the recommendation of @Gribouillis, integrating by part several times, using the fact that the integrand is even and denoting $\,\Big[\frac{1}{1+x^8}\Big]^{(k)}=\frac{d^k}{dx^k}\frac{1}{1+x^8}$
$$I(n)=2\int_0^\pi \frac{\cos (2 n x)}{1+x^{8}} d x=\frac{1}{n}\frac{\sin 2nx}{1+x^8}\bigg|_{x=0}^{x=\pi}+\frac{1}{n}\int_0^\pi \sin (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(1)}d x$$
$$=-\frac{1}{2n^2}\cos (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(1)}\bigg|_{x=0}^{x=\pi}+\frac{1}{2n^2}\int_0^\pi \cos (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(2)}d x$$
$$=-\frac{4}{n^2}\frac{\pi^7}{(1+\pi^8)^2}+\frac{1}{4n^3}\sin (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(2)}\bigg|_{x=0}^{x=\pi}-\frac{1}{4n^3}\int_0^\pi \sin (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(3)}d x$$
$$=-\frac{4}{n^2}\frac{\pi^7}{(1+\pi^8)^2}+\frac{1}{8n^4}\cos (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(3)}\bigg|_{x=0}^{x=\pi}-\frac{1}{8n^4}\int_0^\pi \cos (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(4)}d x$$
Evaluating the third term:
$$\frac{1}{8n^4}\bigg|\int_0^\pi \cos (2 n x)\Big[\frac{1}{1+x^8}\Big]^{(4)}d x\bigg|<\frac{1}{8n^4}\bigg|\int_0^\pi \Big[\frac{1}{1+x^8}\Big]^{(4)}d x\bigg|<\frac{\operatorname{Const}}{8n^4}$$
Therefore,
$$I(n)=-\frac{4}{n^2}\frac{\pi^7}{(1+\pi^8)^2}+O\Big(\frac{1}{n^4}\Big)$$
and
$$\lim_{n\to\infty}n^3I(n)=\lim_{n\to\infty}\Big(-n\frac{4\pi^7}{(1+\pi^8)^2}\Big)=-\infty$$
Numeric check at WolframAlpha confirms the result. At $n=10 \,000$
$$10^{12}\int_{-\pi}^\pi\frac{\cos(20\,000\, x)}{1+x^8}dx=-1.341589316...$$
while
$$-\frac{4\pi^7}{(1+\pi^8)^2}\cdot 10\,000=-1.341589346...$$
A: This is not an answer - just the investigation of the idea whether the method of complex integration can be used to find the solution (a questions in one the comments).
In my opinion, complex integration is not an adequate method to find the asymptotics of this integral. However, it can be used to rewrite the integral in more convenient form.
Let's consider a more general case:
$$\boxed{\,\,I(n)=I(n,a,b)=\int_{-a}^b \frac{\cos (2 n x)}{1+x^8} d x\,\,}$$
where $a,b>0$ - some constants. Making the substitution $t=\frac{x}{n}$
$$I(n)=n^7\int_{-an}^{bn} \frac{\cos (2 t)}{n^8+t^8} d t=n^7\int_{-\infty}^\infty \frac{\cos (2 t)}{n^8+t^8} d t-n^7\int_{-\infty}^{-an} \frac{\cos (2 t)}{n^8+t^8} d t-n^7\int_{bn}^\infty \frac{\cos (2 t)}{n^8+t^8} d t$$
$$=n^7\int_{-\infty}^\infty \frac{\cos (2 t)}{n^8+t^8} d t-n^7\int_{an}^\infty \frac{\cos (2 t)}{n^8+t^8} d t-n^7\int_{bn}^\infty \frac{\cos (2 t)}{n^8+t^8} d t\qquad(1)$$
The first integral can be evaluated via complex integration. As usual, adding a big half-circle of the radius $R$, we get a closed contour. Integral along this half-circle $\to 0$ as $R\to\infty$.
$$n^7\int_{-\infty}^\infty \frac{\cos (2 t)}{n^8+t^8} d t=Re \,n^7\int_{-\infty}^\infty \frac{e^{2 iz}}{n^8+z^8} dz=n^7 \Re \,2\pi i \sum\operatorname{Res}\frac{e^{2 iz}}{n^8+z^8}$$
The integrand has poles at $z_k=n\,e^{\frac{\pi i}{8}+\frac{\pi i k}{4}}, \, k=0,1,2 ... 7$, and we have to take only $z_k$ from the upper half-plane (where our contour lies), and where $\Im\, z_k>0$.
Therefore, all the residues contain the factor $\sim n^7\frac{e^{-\beta n}}{n^7}\sim e^{-\beta n}, \beta>0$ and are exponentially small at $n\to\infty$.
It means that with the accuracy up to exponentially small corrections, we can consider only two last terms in $(1)$. Making the inverse substitution $t=nx$
$$I(n)\sim -\int_{a}^\infty \frac{\cos (2 nx)}{1+x^8} d x-\int_{b}^\infty \frac{\cos (2 nt)}{1+x^8} d x\qquad(2)$$
The asymptotics can be easily found via integration by part (please, note that $a,b>0$ - the arbitrary constants, so we do not impose any special requirement to the boundaries).
$$I(n)\sim -\frac{1}{2n}\frac{\sin (2 nx)}{1+x^8}\bigg|_a^\infty -\frac{1}{2n}\frac{\sin (2 nx)}{1+x^8}\bigg|_b^\infty$$
$$+\frac{1}{2n}\int_{a}^\infty \sin (2 nx)\Big(\frac{1}{1+x^8}\Big)^{(1)} d x+\frac{1}{2n}\int_{b}^\infty \sin (2 nx)\Big(\frac{1}{1+x^8}\Big)^{(1)} d x$$
$$I(n)\sim -\frac{1}{2n}\frac{\sin (2 na)}{1+a^8}-\frac{1}{2n}\frac{\sin (2 nb)}{1+b^8}+\frac{\cos (2 na)}{(2n)^2}\Big(\frac{1}{1+a^8}\Big)^{(1)}+\frac{\cos (2 na)}{(2n)^2}\Big(\frac{1}{1+b^8}\Big)^{(1)}+...$$
Where $\big(\frac{1}{1+x^8}\big)^{(k)}=\frac{d^k}{dx^k}\frac{1}{1+x^8}$.
Integrating as many times as we want, we get the asymptotics as the series of powers $\frac{1}{2n}$.
