I've been having a problem with this integral; although it seems I have the correct answer, It continues to be marked incorrect on an automated grading program. Can someone tell me where I'm going wrong?
Evaluate the integral of : $\int \frac{2 x^3 - 4 x^2+ 16 }{x^4+ 2 x^3} \,dx$.
Taking partial fraction: $\int \:-\frac{4}{x^2}+\frac{8}{x^3}+\frac{2}{x+2}dx$
Applying sum rule: $-\int \frac{4}{x^2}dx+\int \frac{8}{x^3}dx+\int \frac{2}{x+2}dx$
$\int\frac{4}{x^2}dx=-\frac{4}{x}$
$\int \frac{8}{x^3}dx=-\frac{4}{x^2}$
$\int \frac{2}{x+2}dx=2\ln \left(x+2\right)$
Simplifying: $-\frac{4}{x^2}+\frac{4}{x}+2\ln \left(x+2\right)$
$$ \int \frac{2 x^3 - 4 x^2+ 16 }{x^4+ 2 x^3} \,dx = -\frac{4}{x^2}+\frac{4}{x}+2\ln \left(x+2\right)+C$$
Edit: The problem was not doing the absolute value of the ln|x+2|.
Correct solution :$$ - \frac{4}{x^2}+\frac{4}{x}+2\ln|x+2|+C$$