Hints with this Integration Problem $$\int_{0}^{\infty}\frac{(x \cos x-\sin x)\cos (x/2)}{x^3}\mathrm d x $$
I tried solving it by substitution, and I did come close to the answer. But that was really long and tedious, I don't even know whether or not what I did was even correct.
Can anyone suggest me some other way? Hints, anything?
Cuz I can't think of anything other than substitution, thoughts?
 A: This may be done by recognizing that
$$\frac{x \cos{x}-\sin{x}}{x^2} = \frac{d}{dx} \frac{\sin{x}}{x} = \frac{d}{dx} \int_0^1 du \, \cos{x u} = -\int_0^1 du \, u \sin{x u}$$
Thus the integral is then equal to
$$-\int_0^{\infty} dx \frac{\cos{(x/2)}}{x} \, \int_0^1 du \, u \sin{x u}$$
We can reverse the order of integration to get
$$-\int_0^1 du \, u \, \int_0^{\infty} dx \frac{\sin{x u}}{x}  \cos{(x/2)}$$
which looks like a Fourier transform:
$$\int_0^{\infty} dx \frac{\sin{x u}}{x}  \cos{(x/2)} = \frac12 \int_{-\infty}^{\infty} dx \, \frac{\sin{x u}}{x} e^{i k x}$$
where $k = \frac1{2}$.  Thus, the integral is simply $\pi$ when $|u|>1/2$ and zero elsewhere.  Thus the integral is equal to

$$-\frac{\pi}{2} \int_{1/2}^1 du \, u = -\frac{3 \pi}{16}$$

A: $\begin{align}J&=\int_{0}^{\infty}\frac{(x \cos x-\sin x)\cos (x/2)}{x^3}\mathrm d x\end{align}$
Perform integration by parts,
$\begin{align}J&=\left[-\frac{1}{2x^2}(x \cos x-\sin x)\cos (x/2)\right]_{0}^{\infty}+\\
&\int_0^{\infty}\frac{-\frac{1}{2}\sin\left( \frac{1}{2}x\right)(x \cos x-\sin x)-x\sin x\cos\left( \frac{1}{2}x\right)}{2x^2}dx\\
&=\int_0^{\infty}\frac{-\frac{1}{2}\sin\left( \frac{1}{2}x\right)(x \cos x-\sin x)-x\sin x\cos\left( \frac{1}{2}x\right)}{2x^2}\,dx\\
&=-\frac{1}{4}\int_0^{\infty}\frac{\sin\left( \frac{1}{2}x\right)\cos x}{x}\,dx+\frac{1}{4}\int_0^{\infty}\frac{\sin\left( \frac{1}{2}x\right)\sin x}{x^2}\,dx-\frac{1}{2}\int_0^{\infty}\frac{\cos\left( \frac{1}{2}x\right)\sin x}{x}\,dx\\
&=-\frac{1}{4}\int_0^{\infty}\frac{\sin\left( \frac{1}{2}x\right)\cos x}{x}\,dx-\frac{1}{2}\int_0^{\infty}\frac{\cos\left( \frac{1}{2}x\right)\sin x}{x}\,dx+\left[-\frac{\sin\left( \frac{1}{2}x\right)\sin x}{4x}\right]_0^{\infty}+\\
&\frac{1}{4}\int_0^{\infty}\frac{\sin\left( \frac{1}{2}x\right)\cos x}{x}\,dx+\frac{1}{8}\int_0^{\infty}\frac{\cos\left( \frac{1}{2}x\right)\sin x}{x}\,dx\\
&=-\frac{3}{8}\int_0^{\infty}\frac{\cos\left( \frac{1}{2}x\right)\sin x}{x}\,dx\\
&=-\frac{3}{16}\int_0^{\infty}\frac{\sin\left( \frac{3}{2}x\right)+\sin\left( \frac{1}{2}x\right)}{x}\,dx\\
&=-\frac{3}{16}\int_0^{\infty}\frac{\sin\left( \frac{3}{2}x\right)}{x}\,dx-\frac{3}{16}\int_0^{\infty}\frac{\sin\left( \frac{1}{2}x\right)}{x}\,dx
\end{align}$
In the first intégral perform the change of variable $y=\dfrac{3}{2}x$,
in the second intégral perform the change of variable $y=\dfrac{1}{2}x$,
$\begin{align}J&=-\frac{3}{16}\int_0^{\infty}\frac{\sin x }{x}\,dx-\frac{3}{16}\int_0^{\infty}\frac{\sin x }{x}\,dx\\
&=-\frac{3}{8}\int_0^{\infty}\frac{\sin x }{x}\,dx\\
\end{align}$
But, 
It's well-known that,
$\begin{align}\int_0^{\infty}\frac{\sin x }{x}\,dx=\frac{\pi}{2}\end{align}$
Therefore,
$\begin{align}J&=-\frac{3}{8}\times \frac{\pi}{2}\\
&=\boxed{-\frac{3}{16}\pi}
\end{align}$
