Question:hard

Evaluate the definite integral: $$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\cos x}{1 + e^x}\ dx$$

Show Hint

Whenever you see an integral with symmetric limits $[-a, a]$ and an exponential roadblock function like $\frac{1}{1 + e^x}$ or $\frac{1}{1 + a^x}$ multiplied by an even function, the exponential part always cancels out upon applying King's property. The integral simply reduces to half the width: $\int_{0}^{a} \text{even}(x)\ dx$.
Updated On: Jun 4, 2026
  • 1
  • 2
  • -1
  • 0
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: See the integral.
We want $\displaystyle I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + e^x}\,dx$. The $e^x$ on the bottom makes a direct integral hard, so we use a symmetry trick.
Step 2: Recall the king property.
$\displaystyle \int_a^b f(x)\,dx = \int_a^b f(a+b-x)\,dx$. Here $a + b = 0$, so we replace $x$ by $-x$.
Step 3: Apply the swap.
Since $\cos(-x) = \cos x$ and $e^{-x} = \tfrac{1}{e^x}$: \[ I = \int_{-\pi/2}^{\pi/2} \frac{\cos x}{1 + \frac{1}{e^x}}\,dx = \int_{-\pi/2}^{\pi/2} \frac{e^x\cos x}{1 + e^x}\,dx \]
Step 4: Add the two forms.
Add the original and the new one: \[ 2I = \int_{-\pi/2}^{\pi/2} \frac{\cos x + e^x\cos x}{1 + e^x}\,dx = \int_{-\pi/2}^{\pi/2} \frac{\cos x(1 + e^x)}{1 + e^x}\,dx \]
Step 5: Cancel and use evenness.
The $(1 + e^x)$ cancels, leaving $2I = \int_{-\pi/2}^{\pi/2} \cos x\,dx$. Since $\cos x$ is even, $2I = 2\int_0^{\pi/2}\cos x\,dx$, so $I = \int_0^{\pi/2}\cos x\,dx$.
Step 6: Finish the integral.
\[ I = [\sin x]_0^{\pi/2} = \sin\frac{\pi}{2} - \sin 0 = 1 - 0 = 1 \] \[ \boxed{1} \]
Was this answer helpful?
0