$$\int{ -5x^3-2x^2+32\over x^4-4x^3 } dx $$
How should I solve this indefinite integral using partial fractions? I have already checked the online calculators but the answer they give me is incorrect whenever I check it.
I have used partial fractions of type ${A\over x}+{B\over x^2} + {C\over x^3} + {D\over (x-4)}.$
The answer I get when I solve the problem is ${2(x-2) \over x^2 }-5\ln(x-4) + C.$ However, the answer shows as incorrect when I input it.
Using partial fraction decomposition on the integrand, we can write
\begin{equation*} \int\frac{-5x^3-2x^2+32}{(x-4)x^3}dx=\int (-\frac{8}{x^3}-\frac{2}{x^2}-\frac{5}{x-4})dx=\frac{4}{x^2}+\frac{2}{x}-5\int\frac{1}{x-4}dx. \end{equation*}
Using the substitution $u=x-4,~du=dx$ for the final integral, we get
\begin{equation*} -5\ln(u)+\frac{4}{x^2}+\frac{2}{x}+C. \end{equation*}
Finish by substituting back for $u=x-4$ to get $$ \int\frac{-5x^3-2x^2+32}{x^4-4x^3}dx=-5\ln(x-4)+\frac{4}{x^2}+\frac{2}{x}+C.~_{\square} $$