Uniform convergence of a parametric integral. Which solution is correct? I was given a simple problem on uniform convergence of parametric integrals. The integral was
$$
I(a)=\int_0^{+\infty}\frac{\cos(x)}{x+a}dx, \qquad a>0
$$
It seems like a straightforward application of the Abel-Dirichlet test. Just to be clear here is my argument.
Set $f(x,a)=\cos(x)$, $g(x,a)=\frac{1}{x+a}$. Clearly

*

*There exist $C=2$ such that for any $R>0$ and $a>0$ we have
$$
\left|\int_0^R f(x,a)dx\right|<C.
$$


*For any $a>0$ the function $g(x,a)$ is strictly decreasing;


*Since
$$
\lim\limits_{x\to+\infty}\sup\limits_{a>0}g(x,a)=0
$$
the function $g$ converges to $0$ as $x\to+\infty$ uniformly for $a>0$.
Therefore by the Dirichlet test, the parametric integral $I$ converges uniformly. However, I was told that this is solution is wrong.
The official solution says that the integral does not converge uniformly. Itsays that the integral does not converge uniformly "because" even the integral
$$
J(a)=\int_0^{1}\frac{\cos(x)}{x+a}dx, \qquad a>0
$$
does not converge uniformly. Here is a "proof":
$$
\int_0^1\frac{\cos(x)}{x+a}dx 
\geq\cos(1)\int_{0}^{1}\frac{1}{x+a}dx
=\cos(1)\lim_{s\to +0}\int_{s}^{1}\frac{1}{x+a}dx
$$
Then we claim that
$$
\exists \varepsilon_0\quad
\forall\Delta>0\quad
\exists s_1(\Delta)\quad 
\exists s_2(\Delta)\quad 
\left|\sup_{a>0} 
\int_{s_1(\Delta)}^{s_2\Delta)}
\frac{1}{x+a}dx
\right|
\geq \varepsilon_0
$$
I agree with it. By construction $s_1(\Delta)\in(0,\Delta)$, $s_2(\Delta)\in (0,\Delta)$. Don't forget that fact, we'll recall it later. Finally we claim that
$$
\exists \varepsilon=\varepsilon_0\cos(1)\quad
\forall\tilde{\Delta}>0\quad
\exists \tilde{s}_1(\tilde{\Delta})=s_1(\tilde{\Delta})\quad
\exists \tilde{s}_2(\tilde{\Delta})=s_2(\tilde{\Delta})\quad 
$$
$$
\left|\sup_{a>0} 
\int_{\tilde{s}_1(\tilde{\Delta})}^{\tilde{s}_2(\tilde{\Delta})}
\frac{\cos(x)}{x+a}dx
\right|
\geq \varepsilon
$$
The last statement has an error (imho), because it lacks the requirements $\tilde{s}_1(\tilde{\Delta})>\tilde{\Delta}$, $\tilde{s}_2(\tilde{\Delta})>\tilde{\Delta}$. If you agree with me on this point, then one cannot set $\tilde{s}_1(\tilde{\Delta})=s_1(\tilde{\Delta})$, $\tilde{s}_2(\tilde{\Delta})=s_2(\tilde{\Delta})$ since $s_1(\Delta)\in(0,\Delta)$, $s_2(\Delta)\in (0,\Delta)$. Therefore the official solution is disproving another statement, not the one describing uniform convergence.
Question 1: Is my solution correct? If not where is a mistake?
Question 2: Is my argument against official solution correct? If not, what am I missing?
 A: The problem here is subtle. Uniform convergence is a condition pertaining to a specific limiting process.
Because the integrand $\frac{\cos x}{x+a}$ is Riemann integrable for each fixed $a > 0$ on any finite interval $[0,K]$, we can focus first on uniform convergence of the improper integral
$$\lim_{R \to \infty} \int_K^R\frac{\cos x}{x+a} \, dx = \int_K^\infty\frac{\cos x}{x+a} \, dx, $$
and extend the conclusion to
$$\int_0^K\frac{\cos x}{x+a} \, dx +\lim_{R \to \infty} \int_K^R\frac{\cos x}{x+a} \, dx = \int_0^\infty\frac{\cos x}{x+a} \, dx$$
Your application of the Dirichlet test is correct (regardless of $K$) in proving the uniform convergence to this specific limit.  In particular, note that the convergence $g(x,a) = \frac{1}{x+a}\to 0$ is uniform for all $a > 0$ since
$$\sup_{a >0}\frac{1}{x+a} = \frac{1}{x} \underset{x \to \infty}\longrightarrow0$$
Uniform convergence of $\int_0^1 \frac{\cos x}{x+a} \, dx$
Since $\int_0^1 \frac{\cos x}{x+a} \, dx$ exists as a Riemann integral for each fixed $a$ , there is no need to consider an improper integral here and the question of uniform convergence is irrelevant.
Nevertheless, any Riemann integral can be viewed as an improper integral limit since it must hold that
$$\tag{*}\lim_{\delta \to 0+}\int_\delta^1 \frac{\cos x}{x+a} \, dx = \int_0^1  \frac{\cos x}{x+a} \, dx,$$
and we can show that, technically, the convergence for this specific limiting process is not uniform for all $a > 0$.
Note that for all $\Delta \in (0,1)$ and $a_\Delta = \Delta$ we have
$$\left|\int_{\Delta/2}^\Delta\frac{\cos x}{x+a_\Delta} \, dx\right| \geqslant \int_{\Delta/2}^\Delta\frac{\cos1}{\Delta +a_\Delta}\, dx= \frac{\cos 1}{\Delta +\Delta} \frac{\Delta}{2} = \frac{\cos 1}{4} $$
Since the RHS does not converge to $0$ as $\Delta \to 0$ we have shown -- by violation of the uniform Cauchy criterion -- that the convergence to the limit in (*) is not uniform for all $a > 0$.
