Finding $\lim_{n\to\infty}\int_0^{\infty}\frac{x^{n-2}}{1+x^n}|\sin(nx)|$. 
Consider the following integral 
$$J_n=\int_0^{\infty}\frac{x^{n-2}}{1+x^n}|\sin(nx)|,\:\:\:n\geq1.$$
1) Show that the above integral exists for each $n\geq 1$
2) compute $\lim_{n\to\infty}J_n$. 

To show $J_n $ exists for all $n$. For a given $\epsilon$, we need to find $T\geq\frac{1}{\epsilon}$, such that  
$$\int_T^{\infty}\frac{x^{n-2}}{1+x^n}|\sin(nx)|\leq \epsilon.$$
Now let $T\geq\frac{1}{\epsilon}.$ Hence
$$\big{|}\int_0^{\infty}\frac{x^{n-2}}{1+x^n}|\sin(nx)|dx-\int_0^T\frac{x^{n-2}}{1+x^n}|\sin(nx)|dx\big{|}\leq\int_T^{\infty}\big{|}\frac{x^{n-2}}{1+x^n}|\sin(nx)|dx\leq\int_T^{\infty}\frac{1}{x^2}dx=\lim_{M\to\infty}{\frac{-1}{M}}+\frac{1}{T}\leq\epsilon.$$
Now for the second part I'm thinking about using the Riemann Lebesgue lemma.
Note that $\lim_{n\to\infty}\frac{x^{n-2}}{1+x^n}=0$, when $x\in[0,1)$, and $\lim_{n\to\infty}\frac{x^{n-2}}{1+x^n}=\frac{1}{x^2}$, when $x\in[1,\infty).$
Now, by extended Riemann Lebesgue lemma, we have  $\lim_{n\to\infty}\int_0^{\infty}\frac{1}{x^2}|\sin(nx)|dx=\frac{2}{\pi}. $
So I'm gussing the limit must be $\frac{2}{\pi}$. However I don't know hwo to make a vigorous argument. Also, I'm not sure about the first part. Thank you.
 A: 1. For the first part, when $x \geq 1$ we have
$$ \frac{x^{n-2}}{1+x^n}|\sin(nx)| \leq \frac{x^{n-2}}{1+x^n}  \leq \frac{1}{x^2}$$
and if $0\leq x \leq 1$ we have
$$ \frac{x^{n-2}}{1+x^n}|\sin(nx)| \leq x^{n-2}|\sin(nx)| \leq 1. $$
(Indeed, when $n \geq 2$, the last inequality its trivial by bounding $x^{n-2} \leq 1$ and $|\sin(nx)|\leq 1$. When $n = 1$, we can utilize the bound $|\sin x| \leq |x|$ to obtain $x^{n-2}|\sin x| = x^{-1}|\sin x| \leq 1$.)
So the integrand is bounded by the integrable function $1 \wedge x^{-2}$ and hence the integral exists.
2. For the second part, let me prove the following general proposition.

Proposition. (1) If $f$ is integrable on $\mathbb{R}$, then 
  $$\lim_{n\to\infty} \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx = \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx.$$
  (2) If $(f_n)$ is a sequence of measurable functions which is dominated by an integrable function $g$ (i.e. $|f_n| \leq g$ for all $n$) and $f_n \to f$ a.e., then 
  $$\lim_{n\to\infty} \int_{\mathbb{R}} f_n(x)|\sin(nx)| \, dx = \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx.$$

Before proving this proposition, let us first enjoy its consequence. Since we know that $x \mapsto \frac{x^{n-2}}{1+x^n}$ is bounded by $1\wedge x^{-2}$ for $n \geq 2$ and converges to $x^{-2} \mathbf{1}_{(1,\infty)}(x)$ a.e., by (2) we have
$$ \lim_{n\to\infty} J_n
= \frac{2}{\pi} \int_{1}^{\infty} x^{-2} \, dx
= \frac{2}{\pi}. $$

Proof of Proposition. (1) First consider the case where $f \in C_c(\mathbb{R})$ is continuous and compactly supported. Then
\begin{align*}
\int_{\mathbb{R}} f(x)|\sin(nx)| \, dx
&= \frac{1}{n}\int_{\mathbb{R}} f(x/n)|\sin(x)| \, dx \\
&= \frac{1}{n}\sum_{k\in\mathbb{Z}}\int_{0}^{\pi} f\left(\frac{x+k\pi}{n}\right)\sin(x) \, dx \\
&= \int_{0}^{\pi} \left( \frac{1}{n}\sum_{k\in\mathbb{Z}}f\left(\frac{x}{n}+\frac{k\pi}{n}\right) \right) \sin(x) \, dx
\end{align*}
Here, the sum and the integral can be interchanged freely because for each fixed $n$ there are only finitely many non-zero terms. Also, using the assumption on $f$ it is not hard to show that
$$  \frac{1}{n}\sum_{k\in\mathbb{Z}}f\left(\frac{x}{n}+\frac{k\pi}{n}\right) \xrightarrow[n\to\infty]{} \frac{1}{\pi}\int_{\mathbb{R}} f(t) \, dt $$
uniformly in $x$. So it follows that
$$ \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx \xrightarrow[n\to\infty]{} \frac{1}{\pi} \left( \int_{\mathbb{R}} f(x) \, dx \right)\left( \int_{0}^{\pi} \sin x \, dx \right)
= \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx. $$
For general integrable $f$, the usual approximation argument works perfectly: Let $\varphi \in C_c(\mathbb{R})$ be any continuous and compactly supported function and notice taht
\begin{align*}
&\left| \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx - \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx \right|\\
&\hspace{2em} \leq \left| \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx - \int_{\mathbb{R}} \varphi(x)|\sin(nx)| \, dx \right| \\
&\hspace{3em} + \left| \int_{\mathbb{R}} \varphi(x)|\sin(nx)| \, dx  - \frac{2}{\pi} \int_{\mathbb{R}} \varphi(x) \, dx \right| \\
&\hspace{3em} + \left| \frac{2}{\pi} \int_{\mathbb{R}} \varphi(x) \, dx - \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx \right| \\
&\hspace{2em} \leq \left(1 + \frac{2}{\pi}\right) \| f - \varphi\|_{L^1} + o(1).
\end{align*}
So it follows that
$$ \limsup_{n\to\infty} \left| \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx - \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx \right|
\leq \left(1 + \frac{2}{\pi}\right) \| f - \varphi\|_{L^1}. $$
But since the LHS is a constant independent of $\varphi$ and $C_c(\mathbb{R})$ is dense in $L^1(\mathbb{R})$, we may let $\varphi \to f$ to show that the LHS is $0$. Therefore (1) follows.
(2) We have
\begin{align*}
&\left| \int_{\mathbb{R}} f_n(x)|\sin(nx)| \, dx - \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx \right|\\
&\hspace{2em} \leq \left| \int_{\mathbb{R}} f_n(x)|\sin(nx)| \, dx - \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx \right| \\
&\hspace{3em} + \left| \int_{\mathbb{R}} f(x)|\sin(nx)| \, dx - \frac{2}{\pi} \int_{\mathbb{R}} f(x) \, dx \right| \\
&\hspace{2em} \leq \| f_n - f \|_{L^1} + o(1).
\end{align*}
By the dominated convergence theorem, we know that $f_n \to f$ in $L^1$. Therefore (2) follows from the previous part.
