Contour Integral Question I'm working through a contour integral question, which is rounded off by finding the integral:
$$\int^{\infty}_{0} \frac{x-\sin(x)}{x^3} dx$$
I have already shown that the residue at $0$ of the function
$$f(z)=\frac{1+iz-e^{iz}}{z^3}$$
on $\mathbb{C} - \{0\}$ is $\frac{1}{2}$, and that 
$$\int_{\gamma_R} f(z) dz \longrightarrow 0$$ as $R \longrightarrow 0$ where $\gamma_R:[0,\pi]\rightarrow \mathbb{C}$ is given by $\gamma_R(t)=Re^{it}$. 


Problem


How do I progress from here to finding the required integral? It's an odd function, so clearly all that is left is to integrate from $R$ to $-R$ along the real axis and half it to find the integral, but I can't see how to pull out the '$x-\sin(x)$' and replace '$z^3$' with '$x^3$'.
An explanation of how to finish this off would be much appreciated. Thanks in advance.
 A: Since the integrand is even,
$$
\int^{\infty}_{0} \frac{x-\sin(x)}{x^3}\,dx=\frac12\int^{\infty}_{-\infty} \frac{x-\sin(x)}{x^3}\,dx.
$$
Take $\epsilon>0$ small and $R>0$ large. The integral of $f(z)$ along the closed path formed by the segment $[\epsilon,R]$, the semi-circumference $\gamma_R$ counterclockwise, the segment $[-R,-\epsilon]$ and the semi-circumference $\gamma_\epsilon$ of radius $\epsilon$ (in the upper half-plane) clockwise is equal to $0$. Then
$$
\Bigl(\int_{-R}^{-\epsilon}+\int_{\epsilon}^{R}\Bigr)f(x)\,dx+\int_{\gamma_R}f(z)\,dz+\int_{\gamma_\epsilon}f(z)\,dz=0.
$$
As $R\to\infty$ and $\epsilon\to0$,
$$
\Bigl(\int_{-R}^{-\epsilon}+\int_{\epsilon}^{R}\Bigr)f(x)\,dx\to\int^{\infty}_{-\infty} \frac{1-\cos(x)}{x^3} dx+i\int^{\infty}_{-\infty} \frac{x-\sin(x)}{x^3}\,dx.
$$
You already know that $\lim_{R\to\infty}\int_{\gamma_R}f(z)\,dz=0$. All is left is to find $\lim_{\epsilon\to0}\int_{\gamma_\epsilon}f(z)\,dz$.
A: Since the integrand has no singularities and the it vanishes on $x+it$ for $t\in[-1,0]$ as $|x|\to\infty$, we get
$$
\begin{align}
\int_0^\infty\frac{x-\sin(x)}{x^3}\mathrm{d}x
&=\frac12\int_{-\infty}^\infty\frac{x-\sin(x)}{x^3}\mathrm{d}x\\
&=\frac12\int_{-\infty-i}^{\infty-i}\frac{x-\sin(x)}{x^3}\mathrm{d}x\\
&=\frac12\int_{-\infty-i}^{\infty-i}\frac{\mathrm{d}x}{x^2}
-\frac1{4i}\int_{-\infty-i}^{\infty-i}\frac{e^{ix}}{x^3}\mathrm{d}x
+\frac1{4i}\int_{-\infty-i}^{\infty-i}\frac{e^{-ix}}{x^3}\mathrm{d}x\\
&=\frac12\int_{\gamma^+}\frac{\mathrm{d}z}{z^2}
-\frac1{4i}\int_{\gamma^+}\frac{e^{iz}}{z^3}\mathrm{d}z
+\frac1{4i}\int_{\gamma^-}\frac{e^{-iz}}{z^3}\mathrm{d}z\\
&=0-\frac\pi2\left(-\frac12\right)+0\\[6pt]
&=\frac\pi4
\end{align}
$$
$\gamma^+$ follows $(-\infty-i)$ to $(\infty-i)$ then circles back counter-clockwise through the upper half-plane along the circle centered at $-i$.
$\gamma^-$ follows $(-\infty-i)$ to $(\infty-i)$ then circles back clockwise through the lower half-plane along the circle centered at $-i$.
The residue of $\dfrac1{z^2}$ at $z=0$ is $0$ and its integral is $0$ along the circular arc of $\gamma^+$.
The residue of $\dfrac{e^{iz}}{z^3}$ at $z=0$ is $-\dfrac12$ and its integral is $0$ along the circular arc of $\gamma^+$.
$\dfrac{e^{-iz}}{z^3}$ has no residues in $\gamma^-$ and its integral is $0$ along the circular arc of $\gamma^-$.
