<s>[INST] Where's the trick in this partial fractions question? Here is a partial fractions question from page 287, q22 of Schaum's Calculus 5e:
$$ \int{ \frac{x^6 + 7\, x^5 + 15\, x^4 + 23\, x^2 + 25\, x - 3}{{\left(x^2 + 1\right)}^2\, {\left(x^2 + x + 2\right)}^2} dx} $$
Their answer: (verified)
$$\ln\!\left(\frac{x^2 + 1}{x^2 + x + 2}\right) + \frac{1}{\left(x^2 + x + 2\right)} - \frac{3}{\left(x^2 + 1\right)}$$
The partial fractions decomposition: (verified)
$$ \frac{\left(6\, x + 16\right)}{{\left(x^2 + 1\right)}^2} + \frac{\left(26\, x - 32\right)}{\left(x^2 + 1\right)} - \frac{\left(26\, x - 7\right)}{\left(x^2 + x + 2\right)} + \frac{\left(6\, x + 47\right)}{{\left(x^2 + x + 2\right)}^2} $$
(When I say "verified" I mean I used a math algebra package to verify it on a computer)
Even when working from the computer-done partial fractions decomposition, I still don't get the same answer.  What gives?  Why is their answer so simple (and correct?) How did they get it?  Where's the trick??
 [/INST] The term $\rm\:32\ x^3\:$ is mistakenly omitted in the numerator of the integrand. Once you add that in then the partial fraction is
$$\rm - \frac{2\:x+1}{(x^2+x+2)^2} - \frac{2\:x+1}{x^2+x+2} + \frac{6\:x}{(x^2+1)^2} + \frac{2\:x}{x^2+1} $$
from which the claimed result follows easily.
</s>