Compute $$\lim\limits_{n\to \infty} \int_a^b \sin x \arctan(nx) dx$$ for $a,b \in \mathbb{R}, a<b$.
Let $I_n= \int_a^b \sin x \arctan(nx) dx$ for $n\in \mathbb{N}$.
By IBP we have that
$$
\begin{split}
I_n &= \int_a^b(-\cos x)'\arctan(nx)dx \\
&= -\cos b \arctan(nb)+\cos a \arctan(na)+\int_a^b \cos x\frac{n}{1+(nx)^2}dx
\end{split}
$$
By applying the MVT for integrals we have that $\exists c_n \in (a,b)$ such that $$\int_a^b \cos x \cdot \frac{n}{1+(nx)^2}dx=\cos c_n \int_a^b \frac{n}{1+(nx)^2}dx=\cos c_n(\arctan(nb)-\arctan(na)).$$
As a result, $I_n=\arctan(na)(\cos a-\cos c_n)+\arctan(nb)(\cos c_n-\cos b)$ for $n\in \mathbb{N}$.
Since the arctangent is increasing and $a<b$, we have that $\arctan(na)<\arctan (nb)$.
We get that $$\arctan(na)(\cos a-\cos b) < I_n < \arctan(nb)(\cos a-\cos b), \forall n\in \mathbb{N}.$$
If $a>0$, then $\lim\limits_{n\to \infty} I_n=\frac{\pi}{2}(\cos a- \cos b)$.
We are left with the case $a\le 0$. I would like to know if the solution I presented for $a>0$ is correct. If it is, I will try to find a way to also deal with $a \le 0$.
EDIT: Thanks to an idea from an user in the comments the approach I presented can be extended to the remaining cases. A good observation is that this limit becomes significantly easier if we use the Dominated Convergence Theorem (honestly, I didn't even think about it because I got this problem from a magazine for high school students and they don't learn this theorem, but nevertheless the DCT is the most efficient way here).
The Dominated Convergence Theorem guarantees that
$$\lim_{n\to\infty }\int_0^b \sin(x)\arctan(nx)\,dx=\frac\pi2\,\text{sgn}(b)\,(1-\cos(b))$$
and
$$\lim_{n\to\infty }\int_a^0 \sin(x)\arctan(nx)\,dx=-\frac\pi2\,\text{sgn}(a)(1-\cos(a))$$
Putting it together we find that
$$\lim_{n\to \infty}\int_a^b \sin(x)\arctan(nx)\,dx= \frac\pi2\,\text{sgn}(b)\,(1-\cos(b))-\frac\pi2\,\text{sgn}(a)\,(1-\cos(a))$$