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.
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$.