Solution:
Key idea: Use the property ∫0af(x)dx=∫0af(a−x)dx, taking a=2π.
Since sin(2π−x)=−sinx, the term esinx becomes e−sinx, and the two forms of the integrand add up to 1.
Step 1 — Name the integral.
We call the given integral I.
I=∫02π1+esinx1dx...(1)
Step 2 — Replace x by 2π − x.
Since sin(2π−x)=−sinx, the exponent changes sign.
I=∫02π1+e−sinx1dx
We multiply the top and bottom by esinx to clear the negative exponent.
I=∫02πesinx+1esinxdx...(2)
Step 3 — Add (1) and (2).
The two integrands have the same denominator, and their numerators add up to 1+esinx, so the sum is 1.
2I=∫02π1dx
2I=2π
I=π
Therefore, ∫02π1+esinx1dx=π.