TITLE: Finding a limit - is my argument correct?
QUESTION [6 upvotes]: The limit is:
$$ \lim_{\lambda\to 0} \frac{\int_{\lambda}^{a}{\frac{\cos(x)}{x}dx}}{\ln\lambda}. $$
My argument is:
First rewrite the integral:
$$ \lim_{\lambda\to 0} \frac{\int_{0}^{a}{\frac{\cos(x)}{x}dx} - \int_{0}^{\lambda}{\frac{\cos(x)}{x}dx}}{\ln\lambda}. $$
Then use l'Hopital's rule. The first term on the top vanishes as it has not $\lambda$ dependence. The second term is found by applying fundamental theorem of calculus. So I get:
$$ \lim_{\lambda\to 0} \frac{-{\frac{\cos(\lambda)}{\lambda}dx}}{\frac{1}{\lambda}} = \lim_{\lambda\to 0}{-\cos(\lambda)} = -1. $$
Are there any problems with my argument?

REPLY [3 votes]: There are just two small problems.
You cannot compute the two-sided limit, because
$$
\int_{0}^{a}\frac{\cos x}{x}\,dx
$$
does not converge. So, assuming $a>0$, the limit can only be computed for $\lambda\to0^+$.
You have
$$
\int_{\lambda}^a\frac{\cos x}{x}\,dx=
-\int_a^{\lambda}\frac{\cos x}{x}\,dx
$$
and the derivative is
$$
-\frac{\cos\lambda}{\lambda}
$$
without the need to split the integral (by the way, you chose the wrong way to split it, because $\int_0^a\frac{\cos x}{x}\,dx$ does not exist, as said above).
In full detail, for $a>0$,
$$
\lim_{\lambda\to0^+}
\frac{\displaystyle\int_{\lambda}^a \frac{\cos x}{x}\,dx}{\ln\lambda}=
\lim_{\lambda\to0^+}
\frac{-\dfrac{\cos \lambda}{\lambda}}{\dfrac{1}{\lambda}}=
\lim_{\lambda\to0^+}-\cos\lambda=-1
$$

Note that l’Hôpital can be applied to the forms $\dfrac{\text{whatever}}{\infty}$. However, it's also easy to see that
$$
\lim_{\lambda\to0^+}\int_\lambda^a\frac{\cos x}{x}\,dx=\infty
$$
because in the interval $[0,\pi/3]$ we have $\cos x\ge\frac{1}{2}$, so
$$
\int_\lambda^a\frac{\cos x}{x}\,dx=
\int_\lambda^{\pi/3}\frac{\cos x}{x}\,dx+
\int_{\pi/3}^a\frac{\cos x}{x}\,dx\ge
\frac{1}{2}\int_\lambda^{\pi/3}\frac{1}{x}\,dx+
\int_{\pi/3}^a\frac{\cos x}{x}\,dx
$$
so, by comparison, we get the required limit.