Evaluate the integral: integral (e^3x + 1)/(e^x + 1) dx
Evaluate the integral: $$ \int \frac{e^{3x} + 1}{e^x + 1} \, dx. $$
Explanation of Method
Substituting $u = e^x$ turns an exponential rational integrand into an ordinary rational function of $u$. The sum of cubes factorization $u^3+1=(u+1)(u^2-u+1)$ cancels the denominator, and the resulting polynomial-over-$u$ expression is split by polynomial division into simple power and logarithmic terms before substituting back.
- Substitute $u = e^x$ to convert the integral into a rational function of $u$.
- Factor the numerator using the sum of cubes identity to cancel the denominator.
- Divide the remaining fraction term by term.
- Integrate each term, then substitute back $u = e^x$.
Step 1 · Simplify the integrand
Let $u = e^x$. Then, $du = e^x\,dx$, which implies $dx = \dfrac{du}{u}$. Additionally, note that:
$$ e^{3x} = (e^x)^3 = u^3. $$
Substitute $e^x = u$ into the integral:
$$ \int \frac{e^{3x}+1}{e^x+1}\,dx = \int \frac{u^3+1}{u+1}\cdot \frac{du}{u}. $$
Simplify the fraction $\dfrac{u^3+1}{u+1}$. Using the sum of cubes factorization, write:
$$ u^3+1 = (u+1)(u^2-u+1). $$
Thus:
$$ \frac{u^3+1}{u+1} = u^2-u+1. $$
Substitute this into the integral:
$$ \int \frac{e^{3x}+1}{e^x+1}\,dx = \int \frac{u^2-u+1}{u}\,du. $$
Step 2 · Simplify the integrand further
Break the fraction into separate terms:
$$ \frac{u^2-u+1}{u} = u-1+\frac{1}{u}. $$
Thus, the integral becomes:
$$ \int \frac{e^{3x}+1}{e^x+1}\,dx = \int \left(u-1+\frac{1}{u}\right) du. $$
Step 3 · Evaluate the integral
Now, integrate each term:
$$ \int \left(u-1+\frac{1}{u}\right) du = \int u\,du - \int 1\,du + \int \frac{1}{u}\,du. $$
The first term: $\displaystyle \int u\,du = \frac{u^2}{2}$. The second term: $\displaystyle \int 1\,du = u$. The third term: $\displaystyle \int \frac{1}{u}\,du = \ln|u|$.
Combine the results:
$$ \int \left(u-1+\frac{1}{u}\right) du = \frac{u^2}{2} - u + \ln|u| + C, $$
where $C$ is the constant of integration.
Step 4 · Substitute back $u = e^x$
Recall that $u = e^x$. Substitute $u=e^x$ back into the result:
$$ \int \frac{e^{3x}+1}{e^x+1}\,dx = \frac{(e^x)^2}{2} - e^x + \ln|e^x| + C. $$
Simplify $\ln|e^x|$ to $x$:
$$ \int \frac{e^{3x}+1}{e^x+1}\,dx = \frac{e^{2x}}{2} - e^x + x + C. $$
Summary Table
| Term in $u$ | Antiderivative in $u$ | Back-substituted ($u=e^x$) |
|---|---|---|
| $u$ | $u^2/2$ | $e^{2x}/2$ |
| $-1$ | $-u$ | $-e^x$ |
| $1/u$ | $\ln|u|$ | $x$ |
Additional Notes
- The domain requires $e^x + 1 \neq 0$, which holds for all real $x$ since $e^x>0$ always; hence the integrand is defined everywhere.
- The sum-of-cubes factorization $a^3+b^3=(a+b)(a^2-ab+b^2)$ is the key algebraic step that cancels the $(u+1)$ factor between numerator and denominator.
- The result can be checked by differentiating $\dfrac{e^{2x}}{2}-e^x+x$ and confirming it returns the original integrand.
Result
The solution to the integral is: