# Seeking methods to solve $\int_{0}^{\infty} \frac{x - \sin(x)}{x^3\left(x^2 + 4\right)} \:dx$

I recently asked for definite integrals that can be solved using the Feynman Trick. One of the responses is the following integral:

$$I = \int_{0}^{\infty} \frac{x - \sin(x)}{x^3\left(x^2 + 4\right)} \:dx$$

I employed Laplace Transforms with Feynman's Trick (as per a response below) to solve it, but am curious about other approaches that can be taken (in particular if using Feynman's Tricks).

• – Zacky Nov 19 '18 at 11:27

Write$$I = \int_{0}^{\infty} \underbrace{\frac{x - \sin(x)}{x^3\left(x^2 + 4\right)}}_{:=g(x)} ~\mathrm dx=\frac 12 \int_{-\infty}^{\infty} g(x) ~\mathrm dx.$$ Let $$f(z)=\dfrac{z+ie^{iz}}{z^3(z^2+4)}$$, so $$\Re f(x)=g(x).$$

Take the contour

Then we have two poles ($$z=0$$ on the contour and $$z=2i$$ inside the contour), $$\int_{C_R}f(z)~\mathrm dz+\int_{-R}^R f(z)~\mathrm dz=\pi i \operatorname{Res}_{z=0}f(z)+2\pi i \operatorname{Res}_{z=2i}f(z).\tag{*}$$ By ML lemma, $$\lim_{R\to\infty}\int_{C_R}f(z)~\mathrm dz=0.$$ We also calculate the residue of the function at $$z=0$$ by means of power series: \begin{align*} f(z)=\frac14\frac{z+ie^{iz}}{z^3}\frac{1}{1-(-\frac{z^2}{4})}&=\frac14\frac1{z^3}\left[z+i\left(1+iz-\frac{z^2}{2}-\frac{iz^3}{6}+\cdots\right)\right]\left(1-\frac{z^2}4+\cdots\right)\\ &=\cdots+\frac14\left(-\frac i2-\frac i4\right)\frac 1z+\cdots \end{align*} implies $$\operatorname{Res}_{z=0}f(z)=\frac14\left(-\frac i2-\frac i4\right)=-\frac{3i}{16},$$ and the residue at $$z=2i$$ is $$\operatorname{Res}_{z=2i}f(z)=\lim_{z\to 2i}(z-2i)f(z)=\frac{(2+e^{-2})i}{32}.$$ Thus, from $$(*)$$, $$\int_{-\infty}^\infty f(x) ~\mathrm dx =\frac{3\pi}{16}-\frac{(2+e^{-2})\pi}{16}=\frac{1}{16}(1-e^{-2}).$$

$$\therefore I=\frac 12 \Re\int_{-\infty}^{\infty} g(x) ~\mathrm dx=\frac{1}{32}(1-e^{-2}).$$

• Thanks for your post. Although I did it a long time ago, I've forgotten a lot of my contour integration work. Do you know of any good resources to learn this? – user150203 Nov 19 '18 at 5:57

My approach:

Let

$$I(t) = \int_{0}^{\infty} \frac{xt - \sin(xt)}{x^3\left(x^2 + 4\right)} \:dx$$

Where $$I = I(1)$$

Taking the first derivative:

$$\frac{dI}{dt} = \int_{0}^{\infty} \frac{x - x\cos(xt)}{x^3\left(x^2 + 4\right)} \:dx = \int_{0}^{\infty} \frac{1 - \cos(xt)}{x^2\left(x^2 + 4\right)} \:dx$$

Taking the second derivative:

$$\frac{d^2I}{dt^2} = \int_{0}^{\infty} \frac{x\sin(xt)}{x^2\left(x^2 + 4\right)} \:dx = \int_{0}^{\infty} \frac{\sin(xt)}{x\left(x^2 + 4\right)} \:dx$$

Now, take the Laplace Transform w.r.t $$t$$:

\begin{align} \mathscr{L}\left[ \frac{d^2I}{dt^2}\right] &= \int_{0}^{\infty} \frac{\mathscr{L}\left[\sin(xt)\right]}{x\left(x^2 + 4\right)} \:dx \\ &= \int_{0}^{\infty} \frac{x}{\left(s^2 + x^2\right)x\left(x^2 + 4\right)}\:dx \\ &= \int_{0}^{\infty} \frac{1}{\left(s^2 + x^2\right)\left(x^2 + 4\right)}\:dx \end{align}

Applying the Partial Fraction Decomposition we may find the integral

\begin{align} \mathscr{L}\left[ \frac{d^2I}{dt^2}\right] &= \int_{0}^{\infty} \frac{1}{\left(s^2 + x^2\right)\left(x^2 + 4\right)}\:dx \\ &= \frac{1}{s^2 - 4} \int_{0}^{\infty} \left[\frac{1}{x^2 + 4} - \frac{1}{x^2 + s^2} \right]\:dx \\ &= \frac{1}{s^2 - 4} \left[\frac{1}{2}\arctan\left(\frac{x}{2}\right) - \frac{1}{s}\arctan\left(\frac{x}{s}\right)\right]_{0}^{\infty} \\ &= \frac{1}{s^2 - 4} \left[\frac{1}{2}\frac{\pi}{2} - \frac{1}{s}\frac{\pi}{2} \right] \\ &= \frac{\pi}{4s\left(s + 2\right)} \end{align}

We now take the inverse Laplace Transform:

$$\frac{d^2I}{dt^2} = \mathscr{L}^{-1}\left[\frac{\pi}{4s\left(s + 2\right)} \right] = \frac{\pi}{8}\left(1 - e^{-2t} \right)$$

We now integrate with respect to $$t$$:

$$\frac{dI}{dt} = \int \frac{\pi}{8}\left(1 - e^{-2t} \right)\:dt = \frac{\pi}{8}\left(t + \frac{e^{-2t}}{2} \right) + C_1$$

Now

$$\frac{dI}{dt}(0) = \int_{0}^{\infty} \frac{1 - \cos(x\cdot 0)}{x^2\left(x^2 + 4\right)} \:dx = 0 = \frac{\pi}{8}\left(\frac{1}{2} \right) + C_1 \rightarrow C_1 = -\frac{\pi}{16}$$

Thus,

$$\frac{dI}{dt} = \int \frac{\pi}{8}\left(1 - e^{-2t} \right)\:dt = \frac{\pi}{8}\left(t + \frac{e^{-2t}}{2} \right) - \frac{\pi}{16}$$

We now integrate again w.r.t $$t$$

$$I(t) = \int \left[\frac{\pi}{8}\left(t + \frac{e^{-2t}}{2} \right) - \frac{\pi}{16} \right] \:dt = \frac{\pi}{8}\left(\frac{t^2}{2} - \frac{e^{-2t}}{4} \right) - \frac{\pi}{16}t + C_2$$

Now

$$I(0) = \int_{0}^{\infty} \frac{x\cdot0 - \sin(x\cdot0)}{x^3\left(x^2 + 4\right)} \:dx = 0 = \frac{\pi}{8}\left( -\frac{1}{4} \right) + C_2 \rightarrow C_2 = \frac{\pi}{32}$$

And so we arrive at our expression for $$I(t)$$

$$I(t)= \frac{\pi}{8}\left(\frac{t^2}{2} - \frac{e^{-2t}}{4} \right) - \frac{\pi}{16}t + \frac{\pi}{32}$$

Thus,

$$I = I(1) = \frac{\pi}{8}\left(\frac{1}{2} - \frac{e^{-2}}{4} \right) - \frac{\pi}{16} + \frac{\pi}{32} = \frac{\pi}{32}\left(1 - e^{-2}\right)$$

• This is a nice solution ! Thanks for providing it. $\to +1$ – Claude Leibovici Nov 19 '18 at 4:06
• @ClaudeLeibovici - No worries! I'm glad you like it :-) – user150203 Nov 19 '18 at 4:13

Using the expansion near $$x=0$$, $$\frac1{{x^3\left(x^2+4\right)}}=\frac1{4x^3}-\frac1{16x}+O(1)$$ and the contours $$\gamma^+=[-R-i,R-i]\cup Re^{i[0,\pi]}-i$$ which contains $$0$$ and $$2i$$, and $$\gamma^-=[-R-i,R-i]\cup Re^{-i[0,\pi]}-i$$ which contains $$-2i$$, we get \begin{align} \int_0^\infty\frac{x-\sin(x)}{x^3\left(x^2+4\right)}\,\mathrm{d}x &=\frac12\int_{-\infty-i}^{\infty-i}\frac{x-\sin(x)}{x^3\left(x^2+4\right)}\,\mathrm{d}x\\ &=\color{#C00}{\frac12\int_{\gamma^+}\frac{x-\frac{e^{ix}}{2i}}{x^3\left(x^2+4\right)}\,\mathrm{d}x}\\ &\color{#090}{+\frac12\int_{\gamma^-}\frac{\frac{e^{-ix}}{2i}}{x^3\left(x^2+4\right)}\,\mathrm{d}x}\\ &=\color{#C00}{\underbrace{\quad\frac{3\pi}{32}\quad}_{x=0}\underbrace{-\frac{4+e^{-2}}{64}\pi}_{x=2i}}\color{#090}{\underbrace{\ -\frac{e^{-2}}{64}\pi\ }_{x=-2i}}\\ &=\frac{1-e^{-2}}{32}\pi \end{align}

$$\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{\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}$$ \begin{align} &\bbox[10px,#ffd]{\int_{0}^{\infty}{x - \sin\pars{x} \over x^{3}\pars{x^{2} + 4}}\,\dd x} = {1 \over 2}\int_{-\infty}^{\infty}{x - \sin\pars{x} \over x^{3}\pars{x^{2} + 4}}\,\dd x \\[5mm] = &\ {1 \over 2}\,\Im\int_{-\infty}^{\infty}{-x^{2}/2 + \ic x + 1 - \expo{\ic x} \over x^{3}\pars{x^{2} + 4}}\,\dd x = {1 \over 2}\,\Im\braces{2\pi\ic\lim_{x \to 2\ic} {-x^{2}/2 + \ic x + 1 - \expo{\ic x} \over x^{3}\pars{x + 2\ic}}} \\[5mm] = &\ \bbx{{\expo{2} - 1 \over 32\expo{2}}\,\pi} \approx 0.0849 \end{align}