Concept:
To integrate expressions with \( e^x \) and \( e^{-x} \), it is usually best to transform the integrand into a form where substitution is possible. Multiplying the numerator and denominator by \( e^x \) helps eliminate negative exponents and often reveals a perfect square or a clear \( u \)-substitution path.
Step 1: Transforming the integrand.
Multiply the numerator and denominator by \( e^x \):
\[ \int \frac{e^x \, dx}{e^{2x} + 1 + 2e^x} \]
Notice that the denominator is a perfect square trinomial: \( (e^x)^2 + 2(e^x) + 1 = (e^x + 1)^2 \).
\[ = \int \frac{e^x}{(e^x + 1)^2} \, dx \]
Step 2: Applying \( u \)-substitution.
Let \( u = e^x + 1 \). Then \( du = e^x \, dx \).
The integral becomes:
\[ \int \frac{du}{u^2} = \int u^{-2} \, du \]
\[ = \frac{u^{-1}}{-1} + c = -\frac{1}{u} + c \]
Substituting back for \( u \):
\[ = -\frac{1}{e^x + 1} + c \]