Find $\int \frac{(x^2 + 1) e^x}{(x + 1)^2} dx$
Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → $e^x \left( \frac{x - 1}{x + 1} \right) + C$
We have $I = \int \frac{(x^2 + 1) e^x}{(x+1)^2} dx = \int e^x \left[ \frac{x^2 - 1 + 1 + 1}{(x+1)^2} \right] dx$
$= \int e^x \left[ \frac{x^2 - 1}{(x+1)^2} + \frac{2}{(x+1)^2} \right] dx = \int e^x \left[ \frac{x-1}{x+1} + \frac{2}{(x+1)^2} \right] dx \text{}$
Consider $f(x) = \frac{x-1}{x+1}$, then $f'(x) = \frac{2}{(x+1)^2}$.
Thus, the given integrand is of the form $e^x [f(x) + f'(x)]$.
Therefore, $\int \frac{x^2 + 1}{(x+1)^2} e^x \, dx = \frac{x-1}{x+1} e^x + C$.