Evaluate the integral: I = integral dx/(e^(x/2) + e^x)
Evaluate the integral: $$ I = \int \frac{dx}{e^{x/2} + e^x}. $$
Explanation of Method
Substituting $t=e^{x/2}$ turns $e^x=t^2$, converting the denominator into $t+t^2=t(1+t)$. Careful bookkeeping of the $dx$ conversion leaves a rational function of $t$ with denominator $t^2(1+t)$, which is resolved by partial fractions.
- Substitute $t=e^{x/2}$ and convert $dx$ into $dt$.
- Simplify the resulting rational integrand carefully.
- Decompose into partial fractions.
- Integrate each term and substitute back.
Step 1 · Substitution
We start by making the substitution:
$$ t = e^{x/2}, \quad \text{so that} \quad dt = \frac{1}{2}e^{x/2}\,dx = \frac{1}{2}t\,dx \quad \Rightarrow \quad dx = \frac{2\,dt}{t}. $$
Since $e^x = t^2$, the denominator becomes $e^{x/2}+e^x = t+t^2$.
Step 2 · Substitute and simplify
Substituting into the integral:
$$ I = \int \frac{\frac{2\,dt}{t}}{t+t^2} = \int \frac{2\,dt}{t(t+t^2)} = \int \frac{2\,dt}{t^2(1+t)}. $$
Step 3 · Partial fraction decomposition
We decompose $\dfrac{1}{t^2(1+t)}$ into partial fractions:
$$ \frac{1}{t^2(1+t)} = \frac{A}{t} + \frac{B}{t^2} + \frac{C}{1+t}. $$
Multiplying both sides by $t^2(1+t)$:
$$ 1 = At(1+t) + B(1+t) + Ct^2 = (A+C)t^2 + (A+B)t + B. $$
Matching coefficients: $B=1$, $A+B=0 \Rightarrow A=-1$, $A+C=0 \Rightarrow C=1$. Thus:
$$ \frac{1}{t^2(1+t)} = -\frac{1}{t} + \frac{1}{t^2} + \frac{1}{1+t}. $$
Step 4 · Integrate each term
Substituting this decomposition back:
$$ I = 2\int \left(-\frac{1}{t} + \frac{1}{t^2} + \frac{1}{1+t}\right) dt = 2\left(-\ln|t| - \frac{1}{t} + \ln|1+t|\right) + C. $$
Combining the logarithms:
$$ I = 2\ln\left|\frac{1+t}{t}\right| - \frac{2}{t} + C. $$
Step 5 · Substitute back $t = e^{x/2}$
Since $t = e^{x/2}$, we have $\dfrac{1+t}{t} = 1+e^{-x/2}$ and $\dfrac{2}{t}=2e^{-x/2}$. Thus:
$$ I = 2\ln\left(1+e^{-x/2}\right) - 2e^{-x/2} + C. $$
Summary Table
| Term | Antiderivative |
|---|---|
| $-2/t$ | $-2\ln|t|$ |
| $2/t^2$ | $-2/t$ |
| $2/(1+t)$ | $2\ln|1+t|$ |
Additional Notes
- The integrand is defined for all real $x$, since $e^{x/2}+e^x > 0$ always.
- A common pitfall here is treating $\dfrac{2\,dt}{t(t+t^2)}$ as $\dfrac{2\,dt}{t^2+t}$ by canceling a factor of $t$ too early — the correct denominator is $t^2(1+t)=t^2+t^3$, which requires the three-term partial fraction decomposition (including the $1/t^2$ term) shown above, not just the two-term decomposition of $1/(t(1+t))$.
- The result can be checked by differentiating $2\ln\left(1+e^{-x/2}\right)-2e^{-x/2}$ and confirming it returns $\dfrac{1}{e^{x/2}+e^x}$.
Result
The solution to the integral is: