<s>[INST] How Do I Integrate? $\int \frac{-2x^{2}+6x+8}{x^{2}(x+2)}$ How do I integrate this one? $$\int \frac{-2x^{2}+6x+8}{x^{2}(x+2)}\,dx$$
Is my answer correct: $$-3\ln\left \| x+2 \right \|+\ln\left \| x \right \|+\frac{4}{x}+C$$
 [/INST] Partial fraction decomposition.
$$\dfrac{-2x^2 + 6x +8}{x^2(x + 2)} = \dfrac{A}{x}+ \dfrac{B}{x^2} + \dfrac{C}{x+2}$$
Solve for $A, B, C$.
Your almost there with your answer, but we need $-\frac 4x$, and $\ln |x| - 3\ln|x+2| = \ln\left|\dfrac{x}{(x+2)^3}\right|$, if you want to simplify further.
</s>