How do you show from the definition of uniform convergence that $I(a) = \int_0^\infty \frac{x\sin(ax)}{x^2+1}dx$ does not converge uniformly for $a > 0$?
Context: I was trying to evaluate $\lim_{a \to 0+}I(a)$ without using known closed form to learn more general technique. If we could swap limit and integral, then the limit would be $0$ since $\lim_{a \to 0+}\sin(ax) = 0$. But I showed that the true limit is $\frac{\pi}{2}$ by changing variables: $u = ax$:
$$\lim_{a \to 0+}I(a) = \lim_{a \to 0+}\int_0^\infty\frac{u\sin(u)}{u^2 + a^2}du= \int_0^\infty\lim_{a \to 0+}\frac{u\sin(u)}{u^2 + a^2}du=\int_0^\infty \frac{\sin u}{u}du = \frac{\pi}{2}$$
In this form the integral is uniformly convergent for $a \geq 0$ (from Dirichlet test) so we can swap the limit and integral
That means $ \int_0^\infty \frac{x\sin(ax)}{x^2+1}dx$ is not uniformly convergent. The Dirichlet test conditions are not met but that doesn’t prove nonuniform convergence since that test is a sufficient but not necessary condition.
So how can you prove nonuniform convergence? It also seems odd that changing variables results in uniform convergence. Why?
If the integral converged uniformly, we would have
$$\lim_{c \to \infty} \sup_{a >0} \left|\int_c^\infty \frac{x \sin ax}{x^2 +1 } \, dx \right|= 0$$
To show the convergence is not uniform, for any $c > 0$ take $a_c = 1/c >0$. Changing variables with $u = a_c x$ we get
$$\sup_{a >0} \left|\int_c^\infty \frac{x \sin ax}{x^2 +1 } \, dx \right|\geqslant \left|\int_c^\infty \frac{x \sin a_cx}{x^2 +1 } \, dx \right|= \left|\int_{a_c c}^\infty \frac{u \sin u}{u^2 + a_c^2} \, du\right| \\ = \left|\int_1^\infty \frac{u \sin u}{u^2 + 1/c^2} \, du\right|$$
But the integral on the RHS is uniformly convergent for all $c > 0$ by the Dirichlet test (as you pointed out). Hence, we can swap the limit and integral to find
$$\lim_{c \to \infty}\int_1^\infty \frac{u \sin u}{u^2 + 1/c^2} \, du = \int_1^\infty \frac{\sin u }{u} \, du = 0.624713...$$
Thus,
$$ \lim_{c \to \infty} \sup_{a >0} \left|\int_c^\infty \frac{x \sin ax}{x^2 +1 } \, dx \right|> 0,$$
and the integral is not uniformly convergent for $a > 0$.