Evaluate the integral: I = integral (sqrt(x² + 2x + 1))/x
Evaluate the integral: $$ I = \int \frac{\sqrt{x^2 + 2x + 1}}{x} \, dx. $$
Explanation of Method
Whenever $\sqrt{(\cdot)^2}$ appears, the result is an absolute value, not the expression itself — $\sqrt{u^2} = |u|$. Because $|x+1|$ behaves differently depending on the sign of $x+1$, the integral must be split into cases, each of which reduces to a simple integrand of the form $1 + \tfrac1x$ (or its negative).
- Recognize the expression under the root as a perfect square.
- Replace the square root with an absolute value.
- Split into cases based on the sign of the expression inside the absolute value.
- Integrate each case separately.
Step 1 · Simplify the square root
Observe that:
$$ x^2 + 2x + 1 = (x+1)^2. $$
Thus, the integral becomes:
$$ I = \int \frac{\sqrt{(x+1)^2}}{x}\,dx. $$
Since the square root of $(x+1)^2$ is $|x+1|$, we write:
$$ I = \int \frac{|x+1|}{x}\,dx. $$
Step 2 · Handle the absolute value function
The absolute value $|x+1|$ depends on the sign of $x+1$:
$$ |x+1| = \begin{cases} x+1, & \text{if } x \geq -1; \\ -(x+1), & \text{if } x < -1. \end{cases} $$
We split the integral into two cases: $x \geq -1$ and $x < -1$.
Case 1 · $x \geq -1$
For $x \geq -1$, $|x+1| = x+1$. Substituting this into the integral:
$$ I_1 = \int \frac{x+1}{x}\,dx. $$
Simplify the fraction:
$$ I_1 = \int \left(1 + \frac{1}{x}\right) dx. $$
Integrating each term:
$$ I_1 = \int 1\,dx + \int \frac{1}{x}\,dx = x + \ln|x| + C_1. $$
Case 2 · $x < -1$
For $x < -1$, $|x+1| = -(x+1)$. Substituting this into the integral:
$$ I_2 = \int \frac{-(x+1)}{x}\,dx = -\int \left(1 + \frac{1}{x}\right) dx. $$
Simplify and integrate:
$$ I_2 = -\int 1\,dx - \int \frac{1}{x}\,dx = -x - \ln|x| + C_2. $$
Summary Table
| Case | $|x+1|$ becomes | Antiderivative |
|---|---|---|
| $x \geq -1$ | $x+1$ | $x + \ln|x| + C_1$ |
| $x < -1$ | $-(x+1)$ | $-x - \ln|x| + C_2$ |
Additional Notes
- The domain of $I$ requires $x \neq 0$, since $x$ appears in the denominator.
- This problem is a reminder that $\sqrt{u^2} = |u|$, not $u$ — dropping the absolute value is a common error that produces an incorrect antiderivative for $x < -1$.
- Each branch can be checked separately by differentiating $x+\ln|x|$ (for $x \geq -1$) and $-x-\ln|x|$ (for $x < -1$), confirming each returns the corresponding piecewise integrand.
Result
Combining the two cases, the solution to the integral is: