<s>[INST] Partial fraction decomposition of a complicated rational function Find the partial fraction decomposition of the rational function $\displaystyle \frac{2x^3+7x+5}{(x^2+x+2)(x^2+1)}$
I have tried dividing first but keep running into problem after problem, please help.
 [/INST] try writing your fraction as a sum of $\frac{A_0+A_1 x}{x^2+1}+\frac{B_0+B_1 x}{x^2+x+2}$ and then find $A_0,A_1$ and $B_0,B_1$ by equating $(A_0+A_1 x) (x^2+x+2)+(B_0+B_1 x)(x^2+1) = 2x^3+7x+5$
The final answer should be 
$\frac{2x^3+7x+5}{(x^2+x+2)(x^2+1)}=\frac{5}{x^2+1}+\frac{2x-5}{2 + x + x^2}$
I hope that helps.
</s>