Solution:
Key idea: When x appears only as x2, split the fraction by treating x2 as a single letter y; each piece is then a standard form ∫x2+a2dx=a1tan−1ax+C.
Step 1 — Split the fraction with y=x2.
Writing y for x2 only to split, we look for A and B with y=A(y+4)+B(y+1).
(y+1)(y+4)y=y+1A+y+4B
Step 2 — Find A and B.
Putting y=−1 removes B, and putting y=−4 removes A.
y=−1:−1Ay=−4:−4B=3A=−31=−3B=34
Step 3 — Integrate the two standard forms.
We put x2 back for y; the first form has a=1 and the second has a=2.
∫(x2+1)(x2+4)x2dx=−31∫x2+1dx+34∫x2+22dx=−31tan−1x+34⋅21tan−12x+C=32tan−12x−31tan−1x+C
Therefore, ∫(x2+1)(x2+4)x2dx=32tan−12x−31tan−1x+C.