Crazy integral

1. Nov 1, 2007

Doom of Doom

$$\int_{0}^{2\pi} \frac{dx}{1+e^{sin(x)}}$$

How would you evaluate this integral? Where do you even start?

2. Nov 1, 2007

hotcommodity

Well, we know that $$\int \frac{dx}{1 + x^{2}} = arctan(x) + C$$.

How can we think of $$e^{sin(x)}$$ as a term that's been squared?

3. Nov 2, 2007

Gib Z

No idea :(

I would have let u=sin x, so the integral becomes $$\int \frac{1}{1+e^u} \frac{du}{\sqrt{1-u^2}}$$ then did integration by parts.

4. Nov 2, 2007

hotcommodity

I was completely wrong about using $$\int \frac{dx}{1 + x^{2}} = arctan(x) + C$$.

I tried evaluating the integral using my TI-89, but it wouldn't evaluate it unless I put in endpoints.

5. Nov 2, 2007

Count Iblis

I would try the following. Put $$z=\exp\left(i x\right)$$. The integral then becomes:

$$\oint\frac{1}{1+\exp\left(\frac{z-z^{-1}}{2i}\right)}\frac{dz}{iz}$$

where the contour integral is over the unit circle in the complex plane. Next, use the residue theorem.

6. Nov 2, 2007

Doom of Doom

Actually, I think I found a way to do this without using complex analysis.

Let $$f(x) = \frac{1}{1+e^{sin(x)}}$$ and $$g(x)=f(x-\pi)-\frac{1}{2} = \frac{1}{1+e^{sin(x-\pi)}}-\frac{1}{2}$$.

I will now show that g(x) is an odd function on the interval $$\left[-\pi,\pi\right]$$. For this to be true, I need g(x)=-g(-x), or g(x)+g(-x)=0.

Using the fact that sin(x-pi)=-sin(x) and sin(-x-pi)=sin(x),

$$g(x)+g(-x)=$$

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

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

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

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

$$=1-1=0$$

Therefore, g(x) is odd, which implies that $$\int_{0}^{2\pi}g(x+\pi) dx=0$$.

Because $$f(x)=g(x+\pi)+\frac{1}{2}$$,

$$\int_{0}^{2\pi}f(x) dx$$ simply becomes $$\int_{0}^{2\pi}\frac{1}{2} dx$$, which is obviously pi.

7. Nov 2, 2007

PowerIso

I made it into a power series and got the value to be accurate to .0000001 and it does look like pi. :)

8. Nov 2, 2007

robert Ihnot

What happens here is that the integral is equal to: $$\int_{0}^{\pi} \frac{dx}{1+e^{sin(x)}}+$$ $$\int_{0}^{\pi} \frac{dx}{1+e^{-sin(x)}}$$

The second integral then becomes: $$\int_{0}^{\pi}\frac{e^{sinx}}{1+e^{sinx}}$$

Thus adding the integrals reduces to $$\int_{0}^{\pi}dx$$ as Doom of Doom has already figured out.

Last edited: Nov 2, 2007
9. Nov 3, 2007

ice109

holy crap so many different ways to do one integral. i like doom of dooms the best