Problem 83
Hard Exponential and Logarithmic

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.

  1. Substitute $t=e^{x/2}$ and convert $dx$ into $dt$.
  2. Simplify the resulting rational integrand carefully.
  3. Decompose into partial fractions.
  4. 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

Result

The solution to the integral is:

$$ I = 2\ln\left(1+e^{-x/2}\right) - 2e^{-x/2} + C. $$