Convergence or divergence of $\int_2^\infty \frac{1-\cos(4-x^2)}{x-2} \, \mathrm{d}x$ Is the integral
$$ \int_2^\infty \frac{1-\cos(4-x^2)}{x-2} \, \mathrm{d}x $$
convergent or divergent? As the numerator goes to $0$ infinite times I can't apply the comparison test, and I can't seem to find any function to compare the limit. I thought of integrating by parts but I do not know how to prove the integral is divergent. Any hints?
 A: Define \begin{align*}f:\quad \left] 2,+\infty\right[&\longrightarrow \mathbb{R},\\ x&\longmapsto \frac{1-\cos(4-x^{2})}{x-2}=\frac{2\sin^{2}\left(2-\frac{x^{2}}{2}\right)}{x-2} \end{align*}
Now, the integral of $f$ over the open interval $]2,+\infty[$ converges if
$$\underbrace{\int_{2}^{\varepsilon>2}f(x)\, {\rm d}x}_{I_{1}; \text{near }2^{+}}+\underbrace{\int_{\varepsilon >2}^{+\infty}f(x)\, {\rm d}x}_{I_{2};\text{near}+\infty}$$ both integrals $I_{1}$ and $I_{2}$ converges.

*

*$\displaystyle \int_{2}^{\varepsilon >2}f(x)\, {\rm d}x$ converges because $\displaystyle f(x)=\frac{2\sin^{2}\left(2-\frac{x^{2}}{2}\right)}{x-2}\underset{2^{+}}{\sim}8(x-2)=g(x)$ and $\displaystyle \int_{2}^{\varepsilon>2}g(x)\, {\rm d}x$ converges.


*$\displaystyle \int_{\varepsilon >2}^{+\infty}f(x)\, {\rm d}x$ diverges because $f(x)=\frac{2\sin^{2}\left(2-\frac{x^{2}}{2}\right)}{x-2}\underset{+\infty}{\sim}\frac{2}{x}\sin^{2}\left(2-\frac{x^{2}}{2}\right)=h(x)$ and $\displaystyle \int_{\varepsilon >2}^{+\infty}h(x)\, {\rm d}x$ diverges.
For see that just split the integral over intervals $[k\pi,(k+1)\pi]$ with $k\in \mathbb{N}$ and then comparison with the harmonic series.
Alternatively, notice that
$$\frac{2}{x}\sin^{2}\left(2-\frac{x^{2}}{2}\right)=\frac{2}{2x}-\frac{2\cos2\left(2-\frac{x^{2}}{2}\right)}{2x}$$
But $\displaystyle \int_{\varepsilon >2}^{+\infty}\frac{2}{2x}\, {\rm d}x$ diverges and by Dirichlet's test $\displaystyle \int_{\varepsilon >2}^{+\infty}\frac{2\cos 2\left(2-\frac{x^{2}}{2}\right)}{2x}\, {\rm d}x$ converges. Hence $\displaystyle \int_{\varepsilon >2}^{+\infty}h(x)\, {\rm d}x$ diverges.
Therefore $$ \int_{2}^{+\infty}\frac{1-\cos(4-x^{2})}{x-2}\, {\rm d}x$$ diverges.
A: Alternative solution:
Let
$$I_n := \int_3^{\sqrt{2n\pi + 4}} \frac{1 - \cos(4 - x^2)}{x - 2}\mathrm{d} x
\overset{x = \sqrt{y + 4}} = \int_5^{2n\pi} \frac{1 - \cos y}{\sqrt{y + 4} - 2}\, \frac{1}{2\sqrt{y + 4}}\mathrm{d} y.$$
We have
\begin{align*}
 I_n &= \int_5^{2n\pi} \frac{1 - \cos y}{y}\, \frac{\sqrt{y + 4} + 2}{2\sqrt{y + 4}}\mathrm{d} y\\[6pt]
 &\ge \int_5^{2n\pi} \frac{1 - \cos y}{y}\, \frac{\sqrt{y + 4}}{2\sqrt{y + 4}}\mathrm{d} y\\[6pt]
 &= \int_5^{2n\pi} \frac{1 - \cos y}{2y}\mathrm{d} y\\[6pt]
 &\ge \sum_{k=2}^n \int_{(2k-1)\pi - \pi/2}^{(2k-1)\pi + \pi/2} \frac{1 - \cos y}{2y}\mathrm{d} y\\[6pt]
 &\ge \sum_{k=2}^n \int_{(2k-1)\pi - \pi/2}^{(2k-1)\pi + \pi/2} \frac{1}{2y}\mathrm{d} y\\[6pt]
 &= \sum_{k=2}^n \frac12\ln\frac{(2k - 1)\pi + \pi/2}{(2k - 1)\pi - \pi/2}\\
 &\ge \sum_{k=2}^n \frac12 
 \left(1 - \frac{(2k - 1)\pi - \pi/2}{(2k - 1)\pi + \pi/2}\right)\\
 &= \sum_{k=2}^n \frac{1}{4k - 1}\\
    &\ge \sum_{k=2}^n \frac{1}{4k}
\end{align*}
where we have used
$\ln u \ge 1 - u^{-1}$ for all $u\ge 1$ (easy to prove).
Thus, $\int_2^\infty \frac{1-\cos(4-x^2)}{x-2} \, \mathrm{d}x$ is divergent.
A: hint
Let $$f(x)=\frac{1-\cos(x^2-4)}{x-2}$$
$ f$ is continuous at $ (2,\infty) $ and is then locally integrable and positive at $(2,+\infty)$.
near $ 2^+ $ , we have
$$\lim_{x\to2^+}f(x)=\lim_{x\to 2^+}\frac{(x^2-4)^2}{2(x-2)}=0$$
thus
$$\int_2^3f(x)dx\text{  is convergent}$$
