0

$$\int_{-\pi}^{\pi}\frac{\sin x}{1+x^2} dx$$

$$\int_{-\pi}^{\pi}\frac{\cos x}{1+x^2} dx$$

How do I evaluate these two integrals? Are the approaches very different?

I seem to get lost while substituting.

Melon
  • 27

2 Answers2

3

Since $\sin$ is odd, the first integral reduces down to

$$\int_{-\pi}^\pi\frac{\sin(x)}{1+x^2}{\rm~d}x=0$$

For the second integral, note that:

$$\frac1{1+x^2}=\frac1{2i}\left[\frac1{x-i}-\frac1{x+i}\right]$$

And that$\newcommand{\cint}{\operatorname{Ci}}\newcommand{\sint}{\operatorname{Si}}$

\begin{align}\int_a^b\frac{\cos(x)}{x+c}{\rm~d}x&=\int_{a+c}^{b+c}\frac{\cos(x-c)}x{\rm~d}x\\&=\int_{a+c}^{b+c}\frac{\cos(x)\cos(c)+\sin(x)\sin(c)}x{\rm d}x\\&=\cos(c)(\cint(b+c)-\cint(a+c))+\sin(c)(\sint(b+c)-\sint(a+c))\end{align}

where $\cint$ and $\sint$ are trigonometric integrals.

And so, we reach a final closed form of:

$$\int_{-\pi}^\pi\frac{\cos(x)}{1+x^2}{\rm~d}x=2\int_0^\pi\frac{\cos(x)}{1+x^2}{\rm~d}x\\=i\big[\cos(i)(\cint(\pi+i)-\cint(\pi-i))-\sin(i)(\sint(\pi+i)+\sint(\pi-i))\big]$$

where we use some basic symmetries of $\cint$ and $\sint$ (even and odd, respectively).

If you wish to take it one step further, you'll get

$$\cos(i)=\cosh(1)=\frac{e+e^{-1}}2\\\sin(i)=i\sinh(1)=\frac{e-e^{-1}}2i$$

  • 1
    Simply B.A. - tell me if you answered this question then why voted to close it? Thanks for answer, +1 but then why close it? – jonsno Dec 31 '17 at 07:10
  • @samjoe Oh yeah, I meant to mention that at the beginning of my answer but totally forgot about it. I'll close any question which lacks a certain amount of context regardless, but I had the urge to answer anyway since there didn't appear to be a good duplicate and the other answerers weren't coming up with much to answer the question. – Simply Beautiful Art Dec 31 '17 at 13:28
  • Ok I respect your opinion :) – jonsno Dec 31 '17 at 14:09
0

The first integral is obviously zero by parity, and the second integral is not an elementary integral but depends on the sine integral and cosine integral functions. On the other hand, numerical approximations are simple to derive, since

$$ \int_{0}^{\pi}\frac{\cos(x)}{1+x^2}\,dx = \int_{0}^{\pi/2}\cos(x)\left(\frac{1}{1+x^2}-\frac{1}{(\pi-x)^2}\right)\,dx $$ and over $\left(0,\frac{\pi}{2}\right)$ we have $\cos(x)\approx 1-\frac{4x^2}{\pi^2}$, for instance.
The second integral is approximately $\frac{11}{9}$.

Jack D'Aurizio
  • 353,855