compute improper integrals using integration by parts

Compute

\begin{equation*} \int_0^\infty \frac{\sin^4(x)}{x^2}~dx\text{ and }\int_0^\infty \frac{\sin (ax) \cos (bx)}{x}~dx. \end{equation*}

For the first integral I tried letting $u = \sin ^4 x$ and $dv= \frac{1}{x^2}~dx$, which simplified to $\int_0 ^\infty \frac{4 \sin^3(x) \cos(x)}{x}~dx$ and applying integration by parts again with $u = \sin^3(x) \cos (x)$ and $dv = \frac{1}{x}$, I got

$$\left.\vphantom{\frac11}[\sin ^3 (x) \cos (x) \ln (x)] \right|_0^\infty - \int_0^\infty \ln (x) [3 \sin ^2 (2x) - \sin^4 (x)]~dx$$

The only problem is that it appears that the term $[\sin ^3 (x) \cos (x) \ln (x)] \big\vert_0^\infty$ evaluates to infinity and neither the $3\int_0^\infty \ln (x) \sin ^2 (2x)~dx$ term nor the $3\int_0^\infty \ln (x) \sin^4 (x)~dx$ converges.This looks like a dead end but the other choice of $u$ and $dv$ looks even worse, so I'm not sure how to proceed.

For the second integral I tried $u = \sin (ax) \cos (bx)$ and $dv = \frac{1}{x}$, which gives me $[\sin (ax) \cos (bx) \ln (x)] \big\vert_0^\infty + \int_0^\infty \frac{b-a}{2} \ln (x) \cos ((a-b)x)~dx - \int_0 ^ \infty \frac{b+a}{2} \ln (x) \cos ((a+b)x)~dx$, which also looks like a dead end because all three of the terms go to infinity.

Any help is appreciated.

• The second integral diverges because the integrand $\approx 1/x$ near $0.$
– zhw.
May 6 '15 at 16:48
• So there should be no "+" in the second integral? May 6 '15 at 16:49
• @RonGordon: Yeah, I'll edit it right now. Thanks. May 6 '15 at 16:51
• the first integral should be $$\frac{\pi}{4}$$ May 6 '15 at 16:56

\begin{align}\int_0^{\infty} dx \frac{\sin^4{x}}{x^2} &= \int_0^{\infty} dx \frac{\sin^2{x}}{x^2} - \int_0^{\infty} dx \frac{\sin^2{x} \cos^2{x}}{x^2} \\ &= \int_0^{\infty} dx \frac{\sin^2{x}}{x^2} - \frac14 \int_0^{\infty} dx \frac{\sin^2{2 x}}{x^2} \\ &= \int_0^{\infty} dx \frac{\sin^2{x}}{x^2} - \int_0^{\infty} dx \frac{\sin^2{2 x}}{(2 x)^2}\\ &= \int_0^{\infty} dx \frac{\sin^2{x}}{x^2} - \frac12 \int_0^{\infty} du \frac{\sin^2{u}}{u^2}\\ &= \frac12 \int_0^{\infty} dx \frac{\sin^2{x}}{x^2}\end{align}
For the first one, we have \begin{align} \int_0^{\infty} \dfrac{\sin^4(x)}{x^2}dx & = \int_0^{\infty} \dfrac{\sin^2(x)(1-\cos^2(x))}{x^2}dx = \int_0^{\infty} \dfrac{\sin^2(x)}{x^2}dx - \int_0^{\infty} \dfrac{\sin^2(x)\cos^2(x)}{x^2}dx\\ & = \int_0^{\infty} \text{sinc}^2(x) dx - \int_0^{\infty} \dfrac{\sin^2(2x)}{(2x)^2}dx = \int_0^{\infty} \text{sinc}^2(x) dx - \dfrac12\int_0^{\infty} \text{sinc}^2(x) dx\\ & = \dfrac12\int_0^{\infty} \text{sinc}^2(x) dx = \dfrac{\pi}4 \end{align} From here, we have the value of $\int_0^{\infty} \text{sinc}^m(x)dx$
For the second one, we have $$\sin(ax)\cos(bx) = \dfrac{\sin((a+b)x) + \sin((a-b)x)}2$$ We hence have $$\dfrac12\int_0^{\infty}\dfrac{\sin((a+b)x)}xdx + \dfrac12\int_0^{\infty}\dfrac{\sin((a-b)x)}xdx = \begin{cases} \dfrac{\pi}2 & \text{ if }a>b\\ \dfrac{\pi}4 & \text{ if }a=b\\ 0 & \text{ if }a < b \end{cases}$$