# Determine whether the integral $\int_{0}^{\infty}\frac{\cos(x)\sin(1/x)}{x^p}dx$ is convergent or divergent

Determine whether the improper integral $\int_{0}^{+\infty}\frac{\cos(x)\sin(1/x)}{x^p}dx$ is convergent or divergent for $p\in\mathrm{R}$. According to the Dirichlet test, I find it is convergent when $-1<p<2$. But how can I show its divergence? Applying Integration by parts seems tedious.

• I suggest splitting integral into two parts $\int_0^1$ and $\int_1^{\infty}$, and show that $\int_1^{\infty}$ diverges if $p\leq -1$, $\int_0^1$ diverges if $p\geq 2$. – Sungjin Kim Mar 26 '17 at 16:47

Proving divergence when the integrand is nonnegative or nonpositive may be facilitated by the comparison test.

However, when the integrand changes sign, the only recourse may be proving divergence using the negation of the definition of convergence. In this way, we prove divergence of the improper integral $\int_a^\infty f(x) \, dx$ by showing there exists $\epsilon_0 > 0$ such that for any $c > a$ there exists $c_2 > c_1 > c$ such that

$$\left|\int_{c_1}^{c_2} f(x) \, dx \right| \geqslant \epsilon_0.$$

Specifically, for any $c > 0$ choose an integer $n$ such that $c_1 = 2n\pi -\pi/4 > c$ and $c_2 = 2n\pi + \pi/4$. Since $\cos x \geqslant 1/\sqrt{2}$ for $c_1 \leqslant x \leqslant c_2$ and $x \sin(1/x) \geqslant \sin 1$ for $x \geqslant c_1 \geqslant 1$ we have

\begin{align}\left|\int_{c_1}^{c_2}\frac{\cos x \sin(1/x)}{x^p} \, dx \right| &= \int_{c_1}^{c_2}\frac{x \sin(1/x)\cos x }{x^{p+1}} \, dx \\ &\geqslant \frac{\sin 1}{\sqrt{2}} \int_{c_1}^{c_2} x ^{-(p+1)} \, dx \\ \end{align}

If $p \leqslant -1$ then $-(p+1) \geqslant 0$ and $x^{-(p+1)} \geqslant 1$ for $x \geqslant 1$.

Hence,

\begin{align}\left|\int_{c_1}^{c_2}\frac{\cos x \sin(1/x)}{x^p} \, dx \right| \geqslant \frac{\sin1}{\sqrt{2}}(c_2 - c_1) = \frac{\pi \sin 1}{2 \sqrt{2}}, \end{align}

and the improper integral must diverge.

The same idea works for proving divergence when $p \geqslant 2$ of

$$\int_{0}^{1}\frac{\cos x \sin(1/x)}{x^p} \, dx = \int_{1}^{\infty}\frac{\cos (1/x) \sin(x)}{x^{2-p}} \, dx$$

• Thank you @RRL .That's exactly what I need. – username Mar 28 '17 at 2:41
• @username: Glad to be of help. – RRL Mar 28 '17 at 3:34

As suggested in the comments, the integrand function behaves like $\frac{\cos x}{x^{p+1}}$ on the interval $(1,+\infty)$, hence the improper Riemann integrability over such interval is granted by Dirichlet's test as soon as $p>-1$, and that also is a necessary condition always by integration by parts. In a right neighbourhood of the origin the integrand function behaves like $\frac{\sin(1/x)}{x^p}$, and $$\int_{0}^{1}\frac{\sin(1/x)}{x^p}\,dx = \int_{1}^{+\infty}\frac{\sin(x)}{x^{2-p}}\,dx$$ hence here the necessary and sufficient condition for the improper Riemann integrability is $p<2$.
By putting everything together, the given integral is convergent as soon as $-1<p<2$, and by exploiting the (inverse) Laplace transform, Euler's Beta function and the reflection formulas for the $\Gamma$ function its value is given by $$\int_{0}^{+\infty}\frac{\cos(x)\sin(1/x)}{x^p}\,dx = \frac{\pi}{4\sin\frac{\pi p}{2}}\left[I_{1-p}(2)+2\,I_{p-1}(2)+J_{1-p}(2)-2\,J_{p-1}(2)\right].$$

• Thanks a lot! I cannot prove that $\int_1^{\infty}\frac{\cos(x)\sin(1/x)}{x^p}$ is divergent if $\int_1^{\infty}\frac{\cos(x)}{x^{p+1}}$ is divergent. Could you show some details or give a hint? – username Mar 27 '17 at 5:26
• @user219714: if $x$ is large ($x\geq 1$) we have $$\sin\left(\frac{1}{x}\right) = \frac{1+o(1)}{x}$$ hence that factor matters as a $\frac{1}{x}$. – Jack D'Aurizio Mar 27 '17 at 9:39
• For positive function, I am sure that's right. But I'm confused whether $\frac{\cos(x)\sin(1/x)}{x^p}\sim\frac{\cos(x)}{x^{p+1}}(x\to\infty)$ can directly imply that the two integrals will converge simultaneously. – username Mar 27 '17 at 14:09
• @user219714: you may simply apply integration by parts in order to deal with a non-negative integrand function; then the same principle applies. – Jack D'Aurizio Mar 27 '17 at 14:15
• Should I applying integration by parts to $\int_{0}^{+\infty}\frac{\cos(x)\sin(1/x)}{x^p}dx$ to show its convergence? – username Mar 27 '17 at 14:56