Answer
$x^2+\frac{3}{x-2}-\frac{x+1}{x^2+1}$
Work Step by Step
Step 1. Use long division (see page 269), the original rational polynomial becomes
$x^2+\frac{2x^2+x+5}{x^3-2x^2+x-2}$
Step 2. Factor the denominator as: $x^2(x-2)+(x-2)=(x-2)(x^2+1)$, and assume the end results as:
$x^2+\frac{A}{x-2}+\frac{Bx+C}{x^2+1}$
Step 3. Combine the rational functions above as:
$\frac{A(x^2+1)+(Bx+C)(x-2)}{(x-2)(x^2+1)}=\frac{(A+B)x^2+(-2B+C)x+(A-2C))}{(x-2)(x^2+1)}$
Step 4. Compare the above result with the rational part in step 1 to set up the following system of equations:
\begin{cases} A+B=2 \\ -2B+C=1\\A-2C=5 \end{cases}
Step 5. Use substitution to solve the above equations and get $A=3, B=-1,C=-1$
Step 6. Write the final results as:
$x^2+\frac{3}{x-2}-\frac{x+1}{x^2+1}$