I am trying to evaluate the integral
$$\int_{0}^{+\infty}\frac{x-\sin(x)}{x^3(x^2+1)}\,\mathrm dx.$$
I am thinking of using contour integration, but I do not understand how to do it.
EDIT 1
To begin with, I thought it was necessary to find the poles. $x^3 (x^2 + 1)$.
The first factor $x^3$ gives a pole at $x = 0$. Since the degree of $x^3$ is 3, this is a pole of order 3.
The second factor $x^2 + 1$ equals zero when: $ x^2 + 1 = 0 \implies x = \pm i. $ These are simple poles because $x^2 + 1$ appears in the denominator to the first power.
Thus, the function $f(x)$ has the following poles:
$x = 0$— a pole of order 3, $x = i$— a simple pole, $x = -i$— a simple pole.
Next, we need to move on to the residue theorem, but since I have found 3 poles, I am stuck.
EDIT 2
Next, I used the residue theorem to evaluate the integral. Let (f(z)) represent the complex extension of the given function: $$f(z) = \frac{z - \sin(z)}{z^3(z^2 + 1)}.$$
To compute the integral, I considered a contour integral around a semicircular contour in the upper half-plane. This contour includes the poles (z = 0) and (z = i), while avoiding the pole at (z = -i).
The residue theorem states: $$\int_{\text{contour}} f(z) \, \mathrm dz = 2\pi i \sum \text{Res}(f, z_k),$$ where the sum is over all poles inside the contour.
Let’s compute the residues for the poles inside the contour.
Residue at (z = 0) (a pole of order 3):
To find the residue at (z = 0), we use the formula for residues at poles of order 3: $$\text{Res}(f, 0) = \frac{1}{(3-1)!} \lim_{z \to 0} \frac{d^2}{dz^2} \left( z^3 f(z) \right).$$
$$\text{Res}(f, 0) = \frac{i - 2}{2}.$$
Residue at (z = i) (a simple pole):
For a simple pole at (z = i), the residue is: $$\text{Res}(f, i) = \lim_{z \to i} (z - i) f(z).$$
At (z = i), this simplifies to: $$\text{Res}(f, i) = -\frac{e^{-1}}{i}.$$
Residue at (z = -i) (a simple pole):
Similarly, for the simple pole at (z = -i), the residue is: $$\text{Res}(f, -i) = \lim_{z \to -i} (z + i) f(z).$$
At (z = -i), this simplifies to: $$\text{Res}(f, -i) = -\frac{e}{i}.$$
Total Residue and Integral
Summing all residues: $$\text{Total Residue} = \frac{i - 2}{2} - \frac{e^{-1}}{i} - \frac{e}{i}.$$
Using the residue theorem: $$\int_{-\infty}^{+\infty} f(x) \, \mathrm dx = 2\pi i \cdot \text{Total Residue}.$$
Finally, the original integral (over $[0, \infty)$) corresponds to the imaginary part of the result: $$\int_0^{+\infty}\frac{\sin(x)}{x^3(x^2+1)}\,\mathrm dx = \pi \cdot \text{Im}(\text{Total Residue}).$$
$$Im\left(\frac{i-2}{2}+i(e^{-1}+e)\right) = \left(\frac{1}{2}+e^{-1}+e\right)\pi$$

