3

How to evaluate the following integral?

$$ \int _{-\infty }^{\infty }\!{\frac {\cos \left( x \right) }{{x}^{4}+1}}{dx} $$

Unlike this example, according to maple, the solution does not contain sine and cosine integrals. But how does it eavluate this kind of integrals? The method?

sogrekci
  • 125

5 Answers5

7

This can be done using residues, with the function $f(z) = \exp(i z)/(z^4 + 1)$ and a contour that goes along the real axis and returns on a circular arc in the upper half plane.

Robert Israel
  • 470,583
  • why it's $exp(iz)/(z^4+1)$ but not $cos(z)/(z^4+1)$? – Kenneth.K May 11 '16 at 19:37
  • @Kenneth.K $\cos(z)/(z^4+1)$ is the real part of $\exp(iz)/(z^4+1)$, so you only need to evaluate integral of $f$ and take real part. – Wojowu May 11 '16 at 19:44
  • 1
    @Kenneth.K The real reason why one takes the exponential is convergence. Since $\cos z=(e^{iz}+e^{-iz})/2$, it will be exponentially big, both in the upper ($e^{-iz}$) and lower ($e^{iz}$) half plane (as the imaginary part of $z$ tends to $-\infty$ and $+\infty$ respectively. The exponential $e^{iz}$ is however small in the upper half plane. (One could equally well have considered $e^{-iz}$ in the lower half plane.) – mickep May 15 '16 at 10:52
5

$$1.5442760\;\approx\;\pi\exp{\left( -\frac{\sqrt{2}}{2}\right)} \sin\left(\frac{\pi}{4} + \frac{\sqrt{2}}{2}\right) \;=\;\int_\mathbb{R}\; \frac{\cos(x)}{x^4+1}\, dx$$ holds true, but it is not the answer to the question.

Furthermore, I do not know, how Maple is doing to get it.

Generalising the proposed integral, let's proceed to determine $$I_p\:=\:\int_\mathbb{R}\; \frac{\cos x}{x^p+1}\, dx \qquad\text{where $p\in\mathbb{N}$ is even}.$$

Consider $f(x)=1/(x^p+1)$. Using residues we are computing the Fourier transform \begin{align} \hat f(\omega)\: & =\;\int_\mathbb{R}\; \frac{e^{-i\omega x}}{x^p+1}\, dx \\[2.7ex] & =\;\int_\mathbb{R}\; \frac{\cos(\omega x)}{x^p+1}\, dx \; -\;i\int_\mathbb{R}\; \frac{\sin(\omega x)}{x^p+1}\, dx \end{align} which is purely real since the last integral vanishes, its integrand $\frac{\sin(\omega x)}{x^p+1}$ being an odd function of $x$ for every $\omega$. And it's immediate that $\,\hat f\,$ is an even function then.

Once $\,\hat f(\omega)\,$ is made explicit the sought values can be obtained via evaluation: $I_p=\hat f(1)$.

Jordan's lemma can be applied
to calculate $\,\hat f(\omega)$, by assuming $\omega\le 0$ and with the real axis and the (infinite) semicircular arc in the upper half plane as contour of integration.
How does the integrand behave on that arc, parametrised by $Re^{i\varphi}$ with $R\gg 0$ and $0\le\varphi\le\pi\:$? $$\left| \frac{e^{-i\omega R(\cos\varphi + i\sin\varphi)}} {(Re^{i\varphi})^p +1} \right| \;=\; \frac{\left| e^{\omega R\sin\varphi} \right|} {\left| {R^p e^{ip\varphi} +1} \right|}$$ The numerator is bounded above by $1$, and because of $p\ge 2$ the overall decrease is sufficient.

Let's turn to the residues
contributing to the value of the integral. They originate from the $p$-th roots of $\,-1\,$ having positive imaginary part: \begin{align} z_k & \;=\;\exp\left(i(2k-1)\frac{\pi}{p}\right) \quad\text{where }k=1,\ldots ,\frac{p}{2} \\ & \;=\;\cos\theta_k + i\sin\theta_k,\quad\theta_k=(2k-1)\frac{\pi}{p} \end{align}

Note the reflection symmetry with respect to the imaginary axis which we record for later need $$\sin\theta_{\frac{p}{2}+1-k} = \sin\theta_k \quad\text{and}\quad \cos\theta_{\frac{p}{2}+1-k} = - \cos\theta_k .$$

Since $z_k$ is a simple root and the numerator $e^{-i\omega x}$ is non-zero, the corresponding residue is given by \begin{align} \operatorname{Res}(z_k) & \;=\; \frac{e^{-i\omega x}}{px^{p-1}}\Bigg|_{x=z_k} \;=\; \frac{e^{-i\omega (\cos\theta_k +i\sin\theta_k)}}{pz_k^{p-1}} \\[2.7ex] & \;=\; -\frac{1}{p} \exp(\omega \sin\theta_k)\, e^{i\theta_k}e^{-i\omega\cos\theta_k} \end{align} When summing these up
from $\,k=1\,$ to $\,p/2\,$ the real parts will cancel pairwise due to the reflection symmetry$-$just "Go back to the roots!" If $\,p/2\,$ is odd, then $\,i\,$ belongs to the relevant root set, and the real part of that summand is zero anyway. After multiplying with $\,2\pi i\,$ we are done: $$\hat f(\omega)\;=\;\frac{2\pi}{p}\sum_{k=1}^{p/2}\exp\big(-|\omega|\sin\theta_k\big) \sin\big(\theta_k + |\omega|\cos\theta_k\big)$$ Until here $\omega\le 0$ was understood, to meet the conditions allowing for the calculus of residues. Upon introducing the absolute value of $\omega$, this assumption can be abandoned because $\hat f(\omega)$ is even.

Choosing $\,|\omega|=1$ we reach the goal initially set out:

$$I_p\;=\;\frac{2\pi}{p}\sum_{k=1}^{\frac{p}{2}} e^{-\sin\theta_k}\, \sin(\theta_k +\cos\theta_k)\, ,\quad\theta_k=(2k-1)\frac{\pi}{p}$$

Hanno
  • 6,776
3

Consider $f(z) = \exp(iz)/(z^4+1)$. Simple poles of $a(z)=\frac{b(z)}{c(z)}$ at $z_0$ have a residue of $\frac {b(z_0)}{c'(z_0)}$ at $z_0$. Thus, it can be seen that for any root $z_0$ of $z^4+1$, its residue is

$$\operatorname*{Res}_{z=z_0} f(z) = \frac{\exp(iz_0)}{4z_0^3}$$

Consider a semicircular contour of infinite radius, which, by Jordan's lemma, does not receive a contribution by the rounded part. There are two roots in this contour, $z_1 = (1+i)/\sqrt 2$ and $z_2 = (i-1)/\sqrt 2$. The residues at these poles are

$$r_1 = \operatorname*{Res}_{z = z_1}f(z) = \frac{\exp\left(\frac{i-1}{\sqrt 2}\right)}{(-2+2 i) \sqrt 2}$$

$$r_2 = \operatorname*{Res}_{z = z_2}f(z) = \frac{\exp\left(\frac{-1-i}{\sqrt 2}\right)}{(2+2 i) \sqrt 2}$$

Then,

$$I = \int_{-\infty}^\infty f(z)\,dz = 2\pi i (r_1+r_2) = \frac{\pi e^{-\frac{1}{\sqrt 2}} \left(\sin\left(\frac{1}{\sqrt 2}\right) + \cos\left(\frac{1}{\sqrt 2}\right)\right)}{\sqrt 2}$$

Argon
  • 25,971
1

This is a two-sided variant of $$\int_0^\infty \frac{\cos(ax)}{b^4+x^4}dx=\frac{\pi\sqrt 2}{4b^3}\exp\left(-\frac{ab}{\surd 2}\right)\left[\cos\left(\frac{ab}{\surd 2}\right)+\sin\left(\frac{ab}{\surd 2}\right)\right].$$ My method is looking this up under item 3.727.1 in the Gradsteyn/Ryzhik tables.

amWhy
  • 210,739
0

\begin{align} &\int_{-\infty}^{\infty} \frac{\cos x}{x^{4}+1} d x \\ = &\ \frac1{2\sqrt2}\int_{-\infty}^{\infty} \overset{x=\frac{t-1}{\sqrt2}}{\frac{(x+\sqrt2)\cos x}{x^2+\sqrt2 x+1}} - \overset{x=\frac{t+1}{\sqrt2}}{\frac{(x-\sqrt2)\cos x}{x^2-\sqrt2 x+1}} \ d x\\ = &\ \frac1{\sqrt2}\int_{-\infty}^{\infty} \frac{\cos\frac t{\sqrt2} \cos\frac1{\sqrt2} + t\sin\frac t{\sqrt2} \sin\frac1{\sqrt2} }{t^2+1} \ d t \\ =& \ \frac1{\sqrt2}\left[I\bigg(\frac1{\sqrt2}\bigg)\cos\frac 1{\sqrt2}- I’\bigg(\frac1{\sqrt2}\bigg)\sin\frac 1{\sqrt2} \right]\\ = & \ \frac{\pi}{e^{\frac1{\sqrt2}}}\cos\bigg(\frac\pi4- \frac 1{\sqrt2}\bigg) \end{align} where $I(a) = \int_{-\infty}^\infty \frac{\cos at} {t^2+1}dt= \frac{\pi}{e^{a}}$ is assumed known.

Quanto
  • 120,125