We need to evaluate I=∫0π(1+cos2x)(ecosx+e−cosx)ecosxsinxdx.
Step 1: Substitution t=cosx.
Let t=cosx, so dt=−sinxdx, which gives sinxdx=−dt.
When x=0: t=1. When x=π: t=−1.
I=∫1−1(1+t2)(et+e−t)et⋅(−dt)=∫−11(1+t2)(et+e−t)etdt −(1)
Step 2: Apply the substitution t→−t.
Replacing t by −t in (1):
I=∫−11(1+t2)(e−t+et)e−tdt −(2)
(We used the facts that (−t)2=t2 and the limits remain −1 to 1.)
Step 3: Add equations (1) and (2).
2I=∫−11(1+t2)(et+e−t)et+e−tdt
The factor (et+e−t) cancels in the numerator and denominator:
2I=∫−111+t21dt
Step 4: Evaluate the standard integral.
∫−111+t21dt=[tan−1(t)]−11=tan−1(1)−tan−1(−1)
=4π−(−4π)=2π
Step 5: Solve for I.
2I=2π
I=4π
The answer is 4π, which matches Option B.