Contour method to show that $\int_0^\infty\frac{x-\sin x}{x^3} \, dx=\frac\pi4$ 
Show that $$\int_{0}^{\infty} \frac{x - \sin(x)}{x^3} \, dx = \frac{\pi}{4}$$

My attempt is as follows: Let $$f(z) = \frac{z - i e^{iz}}{z^3}$$ and consider the contour on $[\epsilon, R]$ followed by a semicircular arc in the counter clockwise direction, then on $[-R, -\epsilon]$, then the semicircular clockwise contour avoiding the origin. We have, then, that
$$0 = \int_{\Gamma} f(z) dz = \int_{[\epsilon, R]} f(t) dt + \int_{C_R}f(Re^{it})Rie^{it}dt + \int_{[-R, -\epsilon]}f(t)dt + \int_{C_{\epsilon}}f(\epsilon e^{-it})\epsilon i e^{-it} dt$$
Then the first and third integrals ( $I_1$ and $I_3$) combine so that
$$I_1 + I_3 = 2\int_{\epsilon}^R \frac{t - \sin{t}}{t^3}\,dt$$
Further, 
$$|I_{C_R}| \leq \int_0^\pi \left|\frac{Re^{it} - ie^{-R\sin{t}}e^{iRcos{t}}}{R^2 e^{2it}} \right|dt \rightarrow 0 \text{ as } R\rightarrow \infty$$
(I've omitted the details, it isn't too bad to bound)
However, I'm having trouble computing the limit
$$\lim_{\epsilon \rightarrow 0}\int_{C_{\epsilon}} f(\epsilon e^{-it})\epsilon i e^{-it} dt$$
No matter which way I look at it, it seems like this limit does not exist. Perhaps I'm seeing something wrong or have I chosen a bad $f(z)$?
 A: METHODOLOGY $1$: Straightforward Approach 
We begin by letting $I$ be the integral of interest given by
$$\begin{align}
I&=\int_0^\infty \frac{x-\sin(x)}{x^3}\,dx\\\\
&=\frac12 \text{Re}\left(\lim_{\varepsilon\to 0^+,R\to \infty}\left(\int_{-R}^{-\varepsilon} \frac{x+ie^{ix}}{x^3}\,dx+\int_\varepsilon^R \frac{x+ie^{ix}}{x^3}\,dx\right)\right)
\end{align}$$

Next, we analyze the contour integral $J_{\varepsilon,R}$
$$\begin{align}
J_{\varepsilon,R}&=\oint_{C_{\varepsilon,R}}\frac{z+ie^{iz}}{z^3}\,dz\\\\
&=\int_{-R}^{-\varepsilon} \frac{x+ie^{ix}}{x^3}\,dx+\int_\varepsilon^R \frac{x+ie^{ix}}{x^3}\,dx\\\\
&+\int_\pi^0 \frac{\varepsilon e^{i\phi}+ie^{i\varepsilon e^{i\phi}}}{(\varepsilon e^{i\phi})^3}\,i\varepsilon e^{i\phi}\,d\phi+\int_0^\pi \frac{Re^{i\phi}+ie^{iR e^{i\phi}}}{(R e^{i\phi})^3}\,iR e^{i\phi}\,d\phi
\end{align}$$

Expanding $e^{i\varepsilon e^{i\phi}}$ as
$$e^{i\varepsilon e^{i\phi}}=1+i\varepsilon e^{i\phi}-\frac12 \varepsilon^2e^{i2\phi}+O\left(\varepsilon^3\right)$$
reveals that the integration over the semicircle of radius $\epsilon$ is
$$\begin{align}
\int_\pi^0 \frac{\varepsilon e^{i\phi}+ie^{i\varepsilon e^{i\phi}}}{(\varepsilon e^{i\phi})^3}\,i\varepsilon e^{i\phi}\,d\phi&=\frac1{\varepsilon^2}\underbrace{\int_0^\pi e^{-i2\phi}\,d\phi}_{=0}-\frac12 \int_0^\pi (1)\,d\phi +O(\varepsilon)\\\\
&=-\frac\pi2 +O(\varepsilon) 
\end{align}$$

Furthermore, it is easy to show that the integration over the semi-circle of radisu $R$ is 
$$\begin{align}
\int_0^\pi \frac{Re^{i\phi}+ie^{iR e^{i\phi}}}{(R e^{i\phi})^3}\,iR e^{i\phi}\,d\phi=O\left(\frac1R\right)
\end{align}$$

Since $\frac{z+ie^{iz}}{z^3}$ is analytic in and on $C_{\varepsilon,R}$, Cauchy's integral theorem guarantees that $J_{\varepsilon,R}=0$.  Putting everything together, we see that 
$$\begin{align}
0&=J_{\varepsilon,R}\\\\
&=\int_{-R}^{-\varepsilon} \frac{x+ie^{ix}}{x^3}\,dx+\int_\varepsilon^R \frac{x+ie^{ix}}{x^3}\,dx\\\\
&-\frac\pi2+O\left(\varepsilon\right)+\left(\frac1R\right)
\end{align}$$
whereupon taking the limit as $\varepsilon\to 0^+$ and $R\to \infty$ yields
$$I=\frac\pi4$$
And we are done!

METHODOLOGY $2$: Simplifying Using Integration by Parts
We can make our life much easier if we apply successive integration by parts.  We now proceed accordingly.
Let $I$ be the integral given by 
$$\begin{align}
I&=\int_0^\infty \frac{x-\sin(x)}{x^3}\,dx\tag1
\end{align}$$
Integrating by parts the integral on the right-hand side of $(1)$ with $u=x-\sin(x)$ and $v=-\frac{1}{2x^2}$, we find that 
$$I=\frac12\int_0^\infty \frac{1-\cos(x)}{x^2}\,dx \tag2$$
Integrating by parts the integral on the right-hand side of $(2)$ with $u=1-\cos(x)$ and $v=-\frac1x$ reveals
$$\begin{align}
I&=\frac12 \int_0^\infty \frac{\sin(x)}{x}\,dx\tag3
\end{align}$$
We will evaluate the integral in $(3)$ using contour integration.  

We analyze the contour integral $J(\varepsilon,R)$, where $R>0$ and $\varepsilon>0$, as given by
$$\begin{align}
J(\varepsilon,R)&=\oint_{C_{\varepsilon,R}}\frac{e^{iz}}{z}\,dz\\\\
&=\int_{-R}^{-\varepsilon} \frac{e^{ix}}{x}\,dx+\int_\pi^0 \frac{e^{i\varepsilon e^{i\phi}}}{\varepsilon e^{i\phi}}\,i\varepsilon e^{i\phi}\,d\phi+\int_{\varepsilon}^R \frac{e^{ix}}{x}\,dx+\int_\pi^0 \frac{e^{iR e^{i\phi}}}{R e^{i\phi}}\,iR e^{i\phi}\,d\phi\tag4
\end{align}$$
Since $\frac{e^{iz}}{z}$ is analytic in and on the contour defined by $C_{\varepsilon,R}$, Cauchy's Integral Theorem guarantees that $J(\varepsilon,R)=0$.
First, note from symmetry that 
$$\int_{-R}^{-\varepsilon} \frac{e^{ix}}{x}\,dx+\int_{\varepsilon}^R \frac{e^{ix}}{x}\,dx=i2\int_{\varepsilon}^R \frac{\sin(x)}{x}\,dx$$
Furthermore, we have 
$$\lim_{\varepsilon\to 0,R\to \infty}\int_{\varepsilon}^R \frac{\sin(x)}{x}\,dx=\int_0^\infty \frac{\sin(x)}{x}\,dx\tag5$$

Second, it is easy to see that
$$\lim_{\varepsilon\to 0}\int_\pi^0 \frac{e^{i\varepsilon e^{i\phi}}}{\varepsilon e^{i\phi}}\,i\varepsilon e^{i\phi}\,d\phi=-i\pi \tag6$$

Third, noting that $\sin(\phi)\ge \frac{2\phi}{\pi}$ for $\phi\in [0,\pi/2]$, we see that 
$$\begin{align}
\left|\int_\pi^0 \frac{e^{iR e^{i\phi}}}{R e^{i\phi}}\,iR e^{i\phi}\,d\phi\right|&=\left|\int_0^\pi ie^{iR\sin(\phi)}e^{-R\cos(\phi)}\right|\\\\
&\le\int_0^\pi e^{-R\cos(\phi)}\,d\phi\\\\
&=2\int_0^{\pi/2}e^{-R\sin(\phi)}\,d\phi\\\\
&\le 2\int_0^{\pi/2}e^{-2R\phi/\pi}\,d\phi\\\\
&=\frac{\pi(1-e^{-R})}{R}
\end{align}$$
Hence, we see that 
$$\lim_{R\to \infty}\int_\pi^0 \frac{e^{iR e^{i\phi}}}{R e^{i\phi}}\,iR e^{i\phi}\,d\phi=0\tag 7$$

Finally, using $(5)-(7)$ in $(4)$ yields
$$\int_0^\infty \frac{\sin(x)}{x}\,dx=\frac{\pi}{2}$$
whence we find that 
$$\int_0^\infty \frac{x-\sin(x)}{x^3}\,dx=\frac\pi4$$
A: Here is a suggestion. Consider the function $f$ defined by $$f(z) = \frac{1+iz-e^{iz}}{z^3}.$$ On the real line, the imaginary part of $f$ will give you the integral you want and with this function the computation with residues will work.
A: I guess that using the inverse Laplace transform counts as contour integration. In such a case:
$$ \int_{0}^{+\infty}\frac{x-\sin x}{x^3}\,dx = \int_{0}^{+\infty}\mathcal{L}(x-\sin x)(s)\,\mathcal{L}^{-1}\left(\frac{1}{x^3}\right)(s)\,ds$$
by an important property of the Laplace transform. The RHS equals:
$$ \int_{0}^{+\infty}\left(\frac{1}{s^2}-\frac{1}{1+s^2}\right)\frac{s^2}{2}\,ds =\frac{1}{2}\int_{0}^{+\infty}\frac{ds}{1+s^2}=\color{blue}{\frac{\pi}{4}}.$$
A: If you denote by $\operatorname{Si}x$ the sinus integral of $x$, that is
$$\operatorname{Si}x\colon = \int_0^x \frac{\sin t}{t} dt$$ then we have the equality for indefinite integrals
$$\int \frac{x-\sin x}{x^3} = \frac{\operatorname {Si}x}{2} + \frac{\sin x + x \cos x - 2 x}{2 x^2}+ \mathcal{C} $$ 
Notice that the second term has limit $0$  at $0$ ( so removable singularity) and $\infty$. Moreover, $\operatorname{Si}(0)=0$ (clearly) and $\lim_{x \to \infty} \operatorname{Si} (x) = \int_{0}^{\infty} \frac{\sin t}{t} d t = \frac{\pi}{2}$ ( that is standard, proved using residues). We conclude:
$$\int_{0}^{\infty} \frac{x - \sin x}{x^3} d x =\frac{ \pi}{4}$$ 
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
With $\ds{0 < \epsilon < R}$, I'll perform an integration along a quarter circle -of radius $\ds{R}$- in the complex plane first quadrant which include an indent -an arc of radius $\ds{\epsilon}$- about the origin of coordinates. Namely,
\begin{align}
&\int_{\epsilon}^{R}{\expo{\ic x} - 1 - \ic x \over x^{3}}\,\dd x
\,\,\,\stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\,\,\,
\left.-\int_{0}^{\pi/2}{\expo{\ic z} - 1 - \ic z \over z^{3}}\,\dd z
\,\right\vert_{z\ =\ R\exp\pars{\ic\theta}}
\\[2mm] - &\
\int_{R}^{\epsilon}{\expo{-y} - 1 + y \over -\ic y^{3}}\,\,\ic\,\dd y -
\int_{\pi/2}^{0}{-\epsilon^{2}\expo{2\ic\theta}/2 \over \epsilon^{3}\expo{3\ic\theta}}\,\epsilon\expo{\ic\theta}\ic\,\dd\theta
\end{align}
The RHS first integral vanishes out as $\ds{R \to \infty}$. Then,
\begin{align}
&\int_{\epsilon}^{\infty}{\expo{\ic x} - 1 - \ic x \over x^{3}}\,\dd x
\,\,\,\stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\,\,\,
-\int_{\epsilon}^{\infty}{\expo{-y} - 1 + y \over y^{3}}\,\dd y -
{1 \over 2}\ic\int_{0}^{\pi/2}\dd\theta
\\[5mm]
&\int_{0}^{\infty}{\sin\pars{x} - x \over x^{3}}\,\dd x =
- {\pi \over 4}\quad\mrm{as}\ \epsilon \to 0^{+} 
\\[5mm] &
\bbx{\int_{0}^{\infty}{x - \sin\pars{x} \over x^{3}}\,\dd x =
{\pi \over 4}} \\ &
\end{align}
