19
$\begingroup$

Dear all: this time I have the integral $$\int_0^\infty\frac{1-\cos x}{x^2(x^2+1)}\,dx$$and we must try to solve it using complex integration, residues, Cauchy's Theorem and the whole lot. (BTW, does anyone have any idea whether this integral can be solved without complex functions?)

$\underline{\text{What I did}}$: Letting $\,\gamma\,$ be the integration path containing the segments $$\begin{align}(i)&\,\,\text{the real interval} \,[-R\,,\,-\epsilon]\\(ii)&\,\,\text{the "little" half circle} \,\{z\;|\;z=\epsilon e^{i\theta}\,,\,\theta\in [0,\pi]\}\\(iii)&\,\,\text{ the real interval}\,[\epsilon\,,\,R]\\(iv)&\,\,\text{ and the "big" half circle}\,\{z\;|\;z=R e^{i\theta}\,,\,\theta\in [0,\pi]\}\end{align}$$ we take the integral $$I:=\oint_\gamma\frac{1-e^{iz}}{z^2(z^2+1)}\,dz$$ As the only pole of this function within $\,\gamma\,$ is the simple one $\,z=i\,$ (for $\,\epsilon<1, say), and $$\,\operatorname{Res}_{z=i}\left(\frac{1-e^{iz}}{z^2(z^2+1)}\right)=\lim_{z\to i}\frac{1-e^{iz}}{z^2(z+i)}=\frac{e^{-1}-1}{2i}$$We get from the Cauchy's residue theorem $$\displaystyle{I=2\pi i\,\frac{e^{-1}-1}{2i}=\pi\left(\frac{1}{e}-1\right)}$$

We now pass to evaluate the above integral on each segment of $\,\gamma\,$ described above:$$\text{on}\,(iv)\,\text{it is easy:}\,\left|\frac{1-e^{iz}}{z^2(z^2+1)}\right|\leq\frac{1+e^{-R\cos\theta}}{R^4}\xrightarrow[R\to\infty]{} 0$$

On $\,(i)\,,\,(iii)\,$ together and letting $\,R\to \infty\,$ we get $\,\displaystyle{\int_{-\infty}^\infty\frac{1-\cos x}{x^2(x^2+1)}\,dx}\,$ , which isn't a problem as the integrand function is even.

So here comes the problem: on $\,(ii)\,$ we have:$$z=\epsilon e^{i\theta}\Longrightarrow dz=\epsilon ie^{i\theta}d\theta\,,\,0\leq\theta\leq \pi\,\,\text{but going from left to right, so}$$$$\oint_{z=\epsilon e^{i\theta}}\frac{1-e^{iz}}{z^2(z^2+1)}\,dz=\int_\pi^0\frac{1-e^{i\epsilon e^{i\theta}}}{\epsilon^2e^{2i\theta}\left(\epsilon^2e^{2i\theta}+1\right)}\,\epsilon ie^{i\theta}\,d\theta$$

Now, the only thing I could came up with to evaluate the above integral when $\,\epsilon\to 0\,$ is to get the limit into the integral, getting $$\lim_{\epsilon\to 0}\frac{1-e^{i\epsilon e^{i\theta}}}{\epsilon e^{i\theta}\left(\epsilon^2 e^{2i\theta}+1\right)}=-i\Longrightarrow \int_\pi^0\frac{1-e^{i\epsilon e^{i\theta}}}{\epsilon^2e^{2i\theta}\left(\epsilon^2e^{2i\theta}+1\right)}\,\epsilon ie^{i\theta}\,d\theta\xrightarrow [\epsilon\to 0]{} -\pi$$applying L'Hospital, so the final result is$$\pi\left(\frac{1}{e}-1\right)=I\xrightarrow [R\to\infty\,,\,\epsilon\to 0]{} \int_{-\infty}^\infty\frac{1-\cos x}{x^2(x^2+1)}\,dx-\pi$$from which we get the value of $\,\displaystyle{\frac{\pi}{2e}}\,$ for our integral, which is correct (at least according to Wolframalpha), yet...

How can I justify the introduction of the limit into the integral?? The only way that seems to me possible (if at all) is to substitute $$\epsilon\to\frac{1}{\delta}$$ to get an indefinite integral with upper limit equal to $\,\infty\,$ inj $\,(ii)\,$ above and then use the dominated convergence theorem (or perhaps the monotone one).

My question is two fold: Is the substitution just described what can put me out of my misery in this case? , and: Is it possible to justify the passage of the limit into the integral without making the substitution and, thus, without resourcing to an indefinite integral with infinite upper limit?

Thank you to anyone investing he/his time just to read this question, and of course any ideas, corrections will be deeply appreciated.

  • 6
    Integrand has a removable singularity in $z=0$, so letting $$f(z) = \begin{cases} \frac{1 - \cos z}{z^2 (1+z^2)} & z \neq 0 \\ \frac{1}{2} & z =0 \end{cases}$$ you don't have to consider upper small circle.2012-06-18

7 Answers 7

16

$$\int_0^\infty\frac{1-\cos x}{x^2(x^2+1)}\,dx$$

Since

$$\frac{1}{{{x^2}({x^2} + 1)}} = \frac{1}{{{x^2}}} - \frac{1}{{{x^2} + 1}}$$

You have

$$\int_0^\infty {\frac{{1 - \cos x}}{{{x^2}}}} {\mkern 1mu} - \int_0^\infty {\frac{{1 - \cos x}}{{1 + {x^2}}}} dx$$

Now

$$\int_0^\infty {\frac{{1 - \cos x}}{{{x^2}}}} {\mkern 1mu} =- \left. {\frac{{1 - \cos x}}{x}} \right|_0^\infty + \int_0^\infty {\frac{{\sin x}}{x}} {\mkern 1mu} = \int_0^\infty {\frac{{\sin x}}{x}} = \frac{\pi }{2}$$

So maybe now it is easier to tackle $$\int_0^\infty {\frac{{1 - \cos x}}{{1 + {x^2}}}} dx$$ which gives

$$\int_0^\infty {\frac{{1 - \cos x}}{{1 + {x^2}}}} dx = \int_0^\infty {\frac{{dx}}{{1 + {x^2}}}} - \int_0^\infty {\frac{{\cos x}}{{1 + {x^2}}}dx} = \frac{\pi }{2} - \int_0^\infty {\frac{{\cos x}}{{1 + {x^2}}}dx} $$

and thus

$$\int_0^\infty {\frac{{1 - \cos x}}{{{x^2}({x^2} + 1)}}} {\mkern 1mu} dx = \int_0^\infty {\frac{{\cos x}}{{1 + {x^2}}}dx} $$

EDIT

Since the last solution is not very satisfactory, as it has been discussed, I'll supply this solution:

Define

$$F\left( \varphi \right) = \int\limits_0^{ + \infty } {\frac{{\cos \varphi x}}{{1 + {x^2}}}dx} $$

Clearly the integral is absolutely convergent.

Thus, use the Laplace Transform, to obtain:

$$L\left( s \right) = \int\limits_0^{ + \infty } {\frac{s}{{{x^2} + {s^2}}}\frac{1}{{1 + {x^2}}}dx} $$

We evaluate this integral:

$$\frac{s}{{{x^2} + {s^2}}}\frac{1}{{1 + {x^2}}} = \frac{s}{{1 - {s^2}}}\left( {\frac{1}{{1 + {x^2}}} - \frac{1}{{{s^2} + {x^2}}}} \right)$$

$$\eqalign{ & L\left( s \right) = \frac{s}{{1 - {s^2}}}\int\limits_0^{ + \infty } {\left( {\frac{1}{{1 + {x^2}}} - \frac{1}{{{s^2} + {x^2}}}} \right)dx} \cr & L\left( s \right) = \frac{s}{{1 - {s^2}}}\left( {\frac{\pi }{2} - \int\limits_0^{ + \infty } {\frac{1}{{{s^2} + {x^2}}}dx} } \right) \cr & L\left( s \right) = \frac{s}{{1 - {s^2}}}\left( {\frac{\pi }{2} - \frac{1}{s}\frac{\pi }{2}} \right) \cr & L\left( s \right) = \frac{\pi }{2}\frac{s}{{1 - {s^2}}}\frac{{s - 1}}{s} = \frac{\pi }{2}\frac{1}{{1 + s}} \cr} $$

Taking the inverse transform, we arrive at

$$F\left( \varphi \right) = \frac{\pi }{2}{e^{ - \varphi }}$$

This is clearly for $\varphi >0$, thus the evenness of the function forces

$$F\left( \varphi \right) = \frac{\pi }{2}{e^{ - |\varphi| }}$$

and the result follows:

$$F\left( 1 \right) = \int\limits_0^\infty {\frac{{\cos x}}{{1 + {x^2}}}dx} = \frac{\pi }{{2e}}$$


  • 0
    $\frac{\pi}{2}$ cancels each other.2012-06-18
  • 0
    @qoqosz Whoops, thanks!2012-06-18
  • 0
    @Peter Tamaroff: can you solve it entirely for me? (if you're willing) I'd like to see your way.2012-06-18
  • 0
    +1 Great, @Peter. The integral $$\int_0^\infty\frac{\cos x}{1+x^2}\,dx$$ is easily done taking an upper half circle centered at the origin and radius $\,R\,$, and we are off the hook of that integral with $\,\epsilon\,$...thanks!2012-06-18
  • 0
    @DonAntonio Welcome! I'll try a non-comlex solution.2012-06-18
  • 0
    @PeterTamaroff your last integral can be reduced to ODE of 1st order by using the following trick: $$I (u) = \int_{-\infty}^{+\infty} \frac{\cos (\omega u)}{1 + \omega^2} \mbox{d}\omega = 2 \int_{0}^{+\infty} \cos (\omega u) \left\{ \int_0^{+\infty} \sin t \, e^{- \omega t} \, \mbox{d}t \right\} \mbox{d}\omega = \\2 \int_0^{+\infty} \int_0^{+\infty} \cos (\omega u) \sin t \, e^{- \omega t} \, \mbox{d}\omega \,\mbox{d}t = 2 \int_0^{+\infty} \frac{t \sin t}{u^2 + t^2} \, \mbox{d}t = \int_{-\infty}^{+\infty} \frac{t \sin t}{u^2 + t^2} \, \mbox{d}t = - I'(u)$$2012-06-18
  • 0
    Where $$I_1'(u) = - \int_{- \infty}^{+\infty} \frac{\omega \sin (\omega u)}{1 + \omega^2} \, \mbox{d}\omega = - \int_{-\infty}^{+\infty} \frac{t \sin t}{u^2 + t^2} \, \mbox{d}t = - I_1(u)$$ sorry for two comments, but the characters limit... :)2012-06-18
  • 0
    @qoqosz There is a mistake in the integral of the cosine. I thought I was dealing with the sine!2012-06-18
  • 0
    @PeterTamaroff I don't follow - what mistake? :)2012-06-18
  • 0
    @qoqosz $$\int\limits_{ - \infty }^{ + \infty } {\cos \varphi xdx} $$ being zero. Maybe a PV or $e^{\epsilon x}$ should fix it, I don't know.2012-06-18
  • 0
    @PeterTamaroff yes, you should also note that $F''(x)$ exists also only in P.V. sense.2012-06-18
  • 0
    @qoqosz Well, I will rollback. Could you clarify that? Just edit my answer and add that considerations to make it rigorous.2012-06-18
  • 0
    let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/3806/discussion-between-peter-tamaroff-and-qoqosz)2012-06-18
  • 1
    $\displaystyle\mathrm{PV}\int_{-\infty}^\infty\cos(x)\,\mathrm{d}x=\lim_{L\to\infty}\int_{-L}^L\cos(x)\,\mathrm{d}x=\lim_{L\to\infty}2\sin(L)$ which doesn't exist.2012-06-18
  • 1
    It is true that $$ \int_{-\infty}^\infty\frac{\cos(\varphi x)}{1+x^2}\mathrm{d}x=\pi e^{-|\varphi|} $$ However, $\displaystyle F''(\varphi)=-\int_{-\infty}^\infty\frac{x^2\cos(\varphi x)}{1+x^2}\mathrm{d}x$ (the negative of what appears above).2012-06-19
  • 0
    This works since the solution to $F(\varphi)+F''(\varphi)=0$ is $c_1\cos(\varphi)+c_2\sin(\varphi)$, whereas the solution to $F(\varphi)-F''(\varphi)=0$ is $c_1e^{\varphi}+c_2e^{-\varphi}$, which is what you want. However, I still am not buying that $$ \displaystyle\mathrm{PV}\int_{-\infty}^\infty\cos(\varphi x)\,\mathrm{d}x=0 $$2012-06-19
  • 0
    Let's take $$F(a) = \int_0^{+\infty} \frac{\cos (a+x)}{1+x^2} \, dx$$ then we have the desired ODE: $F''(a) + F(a) = 0$ But the problem is to choose initial conditions :| .2012-06-19
  • 0
    @qoqosz: the actual ODE that is needed is $F''(a)\color{red}{-}F(a)=0$, which has exponential solutions rather than trigonometric solutions.2012-06-19
  • 0
    @robjohn I tweaked a little bit of the answer. We can continue the talk of yesterday =)2012-06-19
  • 0
    @robjohn right. In the chat room I proposed to have $I'(t) = \int_0^{+\infty} \frac{\cos tx}{1+x^2}\, dx$ than $I(t) = \int_0^{+\infty} \frac{\sin tx}{x(1+x^2)}\,dx$ and ODE is $I''(t) - t^2 I(t) = - \frac{\pi}{2}, \; I(0)=0, I'(0) = \frac{\pi}{2}$ but there is a problem how to solve it in a nice way :)2012-06-19
  • 0
    @Peter Tamaroff: i don't understand the second proof, especially the point with principal value. Moreover, you passed over the sequence of solving the differential equation. Maybe you can improve that.2012-06-20
  • 0
    @Chris The ODE is really simple to solve, it'd be only taking up space. About the PV, yes, I'm trying to make it better, I think I have an alternative but I need to compose it.2012-06-20
  • 0
    @Peter Tamaroff: OK.2012-06-20
  • 0
    @Chris I invite you to read the new solution.2012-06-20
  • 0
    @qoqosz Same to you.2012-06-20
  • 0
    @PeterTamaroff I've got some link for you http://math.stackexchange.com/questions/9402/calculating-the-integral-int-0-infty-frac-cos-x1x2-mathrmdx-wit btw today I discovered that here is something like FAQ for topics :D2012-06-20
  • 0
    @PeterTamaroff you still use P.V. for cosine which simply can't work.2012-06-20
  • 0
    @qoqosz What? I left that aside, see the one with the Laplace Transform.2012-06-20
  • 0
    @PeterTamaroff oh, pardon me. Nice job :)2012-06-20
  • 0
    @Peter Tamaroff: hehe. Long live Laplace! (+1) Nice work!Btw, i still wonder if there can be found an elementary solution for it.2012-06-20
13

Since the integrand is even, we get $$ \begin{align} \int_0^\infty\frac{1-\cos(x)}{x^2(x^2+1)}\,\mathrm{d}x &=\frac12\int_{-\infty}^\infty\frac{1-\cos(z)}{z^2(z^2+1)}\,\mathrm{d}z\tag{1} \end{align} $$ Since $\lim\limits_{z\to0}\frac{1-\cos(z)}{z^2}=\frac12$, the singularity of the integrand near $z=0$ is removable. Therefore, since the integrand vanishes for $z$ within $\frac12$ of the real axis as $|z|\to\infty$ and there are no singularities within $\frac12$ of the real axis, the integral in $(1)$ does not change when shifting the path of integration from $z=t$ to $z=t-\frac{i}{2}$.

Now we can break up the integral as $$ \frac14\int_{\gamma^+}\frac{1-e^{iz}}{z^2(z^2+1)}\mathrm{d}z +\frac14\int_{\gamma^-}\frac{1-e^{-iz}}{z^2(z^2+1)}\mathrm{d}z\tag{2} $$ where $\gamma^+$ and $\gamma^-$ are as depicted below:

$\hspace{4.6cm}$path of integration

$\gamma^+$ circles two singularities ($z=0$ and $z=i$) clockwise, and $\gamma^-$ circles one singularity ($z=-i$) counter-clockwise.

All of the singularities are simple, so to get the residue at $z=z_0$, we just need to multiply by $z-z_0$ and taking $\displaystyle\lim_{z\to z_0}$

At $z=0$ the residue of $\displaystyle\frac{1-e^{iz}}{z^2(z^2+1)}$ is $-i$

At $z=i$ the residue of $\displaystyle\frac{1-e^{iz}}{z^2(z^2+1)}$ is $\displaystyle\frac{1-e^{-1}}{-2i}$

At $z=-i$ the residue of $\displaystyle\frac{1-e^{-iz}}{z^2(z^2+1)}$ is $\displaystyle\frac{1-e^{-1}}{2i}$

Putting these together with $(2)$ yields $$ \begin{align} \frac12\int_{-\infty}^\infty\frac{1-\cos(z)}{z^2(z^2+1)}\,\mathrm{d}z &=\frac{2\pi i}{4}\left(-i+\frac{1-e^{-1}}{-2i}\right)-\frac{2\pi i}{4}\left(\frac{1-e^{-1}}{2i}\right)\\ &=\frac{\pi}{2}\left(1-\frac{1-e^{-1}}{2}-\frac{1-e^{-1}}{2}\right)\\ &=\frac{\pi}{2e} \end{align} $$

  • 0
    Thanks @Rob. Nevertheless, and after the singularity at zero has been removed, I think it's way easier to take only the upper half circle that you denoted $\,\gamma^+\,$ and let its radius tend to infinity. That way we also save one residue's calculation (see my comment to Peter's answer above). +12012-06-19
  • 0
    @DonAntonio: Your suggestion doesn't work because $\cos(z)$ blows up as $|\mathrm{Im}(z)|\to\infty$. Thus, the integral around either half circle blows up as the radius increases. This is why I separated $\cos(z)$ into exponentials and integrated one around the upper half plane and the other around the lower half plane.2012-06-19
  • 0
    I'm not sure I follow, as I didn't use $\,\cos z\,$ but actually $\,1-e^{iz}\,$ in the numerator, and so did you, though you also used $\,\cos z\,$. Anyway, I can't see how taking the whole circle instead of only half of it would solve the problem you mention as in passing to the limit on the real axis and being $\,\cos x\,$ and odd function we'd have the same proble, wouldn't we? Please do correct me if I'm wrong2012-06-19
  • 0
    @DonAntonio: I was commenting on [this comment](http://math.stackexchange.com/questions/160022/integration-by-means-of-complex-analysis/160065#comment369049_160065). However, I see that we have switched to the original question. With $$\int_{-\infty}^\infty\frac{1-e^{iz}}{z^2(1+z^2)}\,\mathrm{d}z$$ a singularity at $z=0$ (on the path of integration) is introduced, and must be handled. Furthermore, since none of the singularities has residue zero and none of the residues cancel, I don't see that we can leave any of them out.2012-06-19
8

An easy way:

Consider $$I(a)=\int_0^\infty\frac{1-\cos ax}{x^2(x^2+1)}\,dx ;a\geqslant 0$$ Next:

$$\frac{dI}{da}= \int_0^\infty\frac{\sin ax}{x}\frac{dx}{x^2+1} $$

$$\frac{d^2I}{da^2}=\int_0^\infty\frac{\cos ax}{x^2+1}\,dx=\frac{\pi e^{-a}}{2} $$

Remark: The last result is well known in this site

Thus

$$\frac{dI}{da}=-\frac{\pi e^{-a}}{2}+\frac{\pi}{2} $$ because of $\frac{dI(0)}{da}=0$

$$I(a)= \frac{\pi e^{-a}}{2}+\frac{\pi a}{2}-\frac{\pi}{2}$$ because of $I(0)=0$

Finally, original integral:

$$I=I(1)=\frac{\pi e^{-1}}{2}$$

  • 0
    Very nice @Martin, thanks. This in fact is Feynman's way. +12012-06-19
4

HINT: I think that this integral would work great by using Feynman way. Your integral is very similar to one you may find in this document, namely the last page, the last integral where the author offers a set of problems to solve by using this way:

http://ocw.mit.edu/courses/mathematics/18-304-undergraduate-seminar-in-discrete-mathematics-spring-2006/projects/integratnfeynman.pdf

  • 0
    @Valentin See my answer along with qoqosz's remarks in the comments.2012-06-18
3

Maple gets this anti-derivative: $$ \int \frac{1 - \operatorname{cos} (x)}{x^{2} \bigl(x^{2} + 1\bigr)} d x = -\operatorname{arctan} (x) - \frac{1}{x} - \frac{\operatorname{Si} (x - i) \operatorname{sinh} (1)}{2} - \frac{i}{2} \operatorname{Ci} (x - i) \operatorname{cosh} (1) - \frac{\operatorname{Si} (x + i) \operatorname{sinh} (1)}{2} + \frac{i}{2} \operatorname{Ci} (x + i) \operatorname{cosh} (1) + \frac{\operatorname{cos} (x)}{x} + \operatorname{Si} (x) $$ Perhaps this is done by writing $1/(x^2(1+x^2))$ in complex partial fractions? Then: the limit at $+\infty$ is $-\pi\sinh(1)/2$ and at $0$ is $-\pi\cosh(1)/2$. Subtract to get $\pi/(2e)$.

2

Regarding the justification you asked, about bringing the limit inside the integral: $$\lim_{\varepsilon\to 0}\frac{1-e^{i\varepsilon e^{i\theta}}}{\varepsilon e^{i\theta}\left(\varepsilon^2 e^{2i\theta}+1\right)}=-i\Longrightarrow \int_\pi^0\frac{1-e^{i\varepsilon e^{i\theta}}}{\varepsilon^2e^{2i\theta}\left(\varepsilon^2e^{2i\theta}+1\right)}\,\varepsilon ie^{i\theta}\,d\theta\xrightarrow [\varepsilon\to 0]{} -\pi$$ Yes, dominated convergence works fine here, to see this put $$f_\varepsilon(\theta)=\frac{1-e^{i\varepsilon e^{i\theta}}}{\varepsilon e^{i\theta}\left(\varepsilon^2 e^{2i\theta}+1\right)}$$ In order to estimate this correctly, first note that the numerator as well as the denominator is zero at $\varepsilon=0$, which we must take care of. To do that, fix $\varepsilon\in(0,1]$ and let $A,B\in\mathbb{C}$, then (by the Taylor expansion of $x\mapsto \exp(x)$) $$\frac{1-e^{\varepsilon A}}{\varepsilon B}= -\frac{A}{B} - \varepsilon g_\varepsilon(A,B)$$ where
$$|g_\varepsilon(A,B)|\leq g_\varepsilon(|A|,|B|)\leq g_1(|A|,|B|) =\frac{e^{|A|}-1-|A|}{|B|}.$$
With $A=ie^{i\theta}$ and $B=e^{i\theta}$, it follows that $$|f_\varepsilon(\theta)|\leq \frac{1}{1-\varepsilon^2} + \frac{2}{1-\varepsilon^2}\leq 1+2=3$$ and hence by dominated convergence $$i\int_\pi^0 f_\varepsilon(\theta)d\theta\to i\int_\pi^0 -i d\theta=-\pi$$


Edit: Actually the convergence is uniform as long as $$\frac{e^{|A|}-1-|A|}{|B|}$$ stays bounded, which it does here.

1

$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ $\ds{\int_{0}^{\infty}{1-\cos\pars{x} \over x^{2}\pars{x^{2} + 1}}\,\dd x:\ {\large ?}}$

\begin{align}&\color{#c00000}{\int_{0}^{\infty}% {1-\cos\pars{x} \over x^{2}\pars{x^{2} + 1}}\,\dd x} =\half\int_{-\infty}^{\infty}\bracks{1 - \cos\pars{x}} \pars{{1 \over x^{2}} - {1 \over x^{2} + 1}}\,\dd x \\[3mm]&=\int_{-\infty}^{\infty}{\sin^{2}\pars{x/2} \over x^{2}}\,\dd x -\half\int_{-\infty}^{\infty}{\dd x \over 1 + x^{2}} +\half\Re\int_{-\infty}^{\infty}{\expo{\ic x} \over \pars{x - \ic}\pars{x + \ic}}\,\dd x \\[3mm]&=\underbrace{\overbrace{\half\int_{-\infty}^{\infty}% {\sin^{2}\pars{x} \over x^{2}}\,\dd x}^{\ds{=\ {\pi \over 2}}}\ -\ \overbrace{\half\int_{-\infty}^{\infty}{\dd x \over 1 + x^{2}}}^{\ds{=\ {\pi \over 2}}}}_{\ds{\color{#c00000}{\LARGE=\ 0}}}\ +\ \half\,\Re\int_{-\infty}^{\infty}{\expo{\ic x} \over \pars{x - \ic}\pars{x + \ic}}\,\dd x \end{align}

We are just left with one integral: $$ \color{#66f}{\large\int_{0}^{\infty}% {1-\cos\pars{x} \over x^{2}\pars{x^{2} + 1}}\,\dd x} = \half\Re\int_{-\infty}^{\infty}{\expo{\ic x} \over \pars{x - \ic}\pars{x + \ic}}\,\dd x =\half\Re\pars{2\pi\ic\,{\expo{\ic\pars{\ic}} \over \ic + \ic}} =\color{#66f}{\large{\pi \over 2\expo{}}} $$