Question:

\(\int_{-\pi/2}^{\pi/2}\frac{\cos x}{1+e^{x}}\,dx=\)

Show Hint

Use \(\int_{-a}^{a}f(x)dx=\int_0^a[f(x)+f(-x)]dx\). Here \(f(x)+f(-x)=\cos x\).
Updated On: Oct 1, 2026
  • 0
  • 1
  • \(-1\)
  • 2
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understanding the Concept:
For a definite integral over \([-a,a]\), the property \(\int_{-a}^{a}f(x)dx=\int_{0}^{a}\left[f(x)+f(-x)\right]dx\) is useful.

Step 2: Set up:
Let \(f(x)=\frac{\cos x}{1+e^x}\). Then \(f(-x)=\frac{\cos x}{1+e^{-x}}=\frac{e^x\cos x}{e^x+1}\), because \(\cos(-x)=\cos x\).

Step 3: Add f(x) and f(-x):
\[ f(x)+f(-x)=\frac{\cos x+e^x\cos x}{1+e^x}=\frac{\cos x(1+e^x)}{1+e^x}=\cos x \]

Step 4: Integrate:
\[ I=\int_0^{\pi/2}\cos x\,dx=\left[\sin x\right]_0^{\pi/2}=1-0=1 \]

Step 5: Check the options:
The answer is 1, so 0, -1 and 2 are wrong. Also the integrand is positive on the whole interval, so the answer cannot be 0 or -1.

Final Answer:
The value of the integral is 1, option 2. \[ \boxed{1} \]
Was this answer helpful?
0
0