I would not use partial fractions. Here is what I would do:
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = int(x^2 + 9)/(x^2 + 9)^2dx - int(x)/(x^2 + 9)^2dx#
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = int1/(x^2 + 9)dx - 1/2int(2x)/(x^2 + 9)^2dx#
The first integral is our old friend the inverse tangent and the second integral is all set up for a "u" substitution. Let #u = x^2 + 9, "then "du = 2xdx#
But since you asked:
#(x^2 - x + 9)/(x^2 + 9)^2 = A/(x^2 + 9) + (Bx + C)/(x^2 + 9)^2#
#x^2 - x + 9 = A(x^2 + 9) + Bx + C#
Let x = 0:
#[
(9, 0, 1,|,9)
]#
Let x = 1:
#[
(9, 0, 1,|,9),
(10,1,1,|,9)
]#
Let x = -1:
#[
(9, 0, 1,|,9),
(10,1,1,|,9),
(10,-1,1,|,11)
]#
Subtract row 3 from row 2:
#[
(9, 0, 1,|,9),
(0,2,0,|,-2),
(10,-1,1,|,11)
]#
Divide row 2 by 2:
#[
(9, 0, 1,|,9),
(0,1,0,|,-1),
(10,-1,1,|,11)
]#
Subtract row 3 from row 1:
#[
(-1, 1, 0,|,-2),
(0,1,0,|,-1),
(10,-1,1,|,11)
]#
Subtract row 2 from row 1:
#[
(-1, 0, 0,|,-1),
(0,1,0,|,-1),
(10,-1,1,|,11)
]#
Multiply row 1 by 10 and add to row 3:
#[
(-1, 0, 0,|,-1),
(0,1,0,|,-1),
(0,-1,1,|,1)
]#
Multiply row 1 by -1
#[
(1, 0, 0,|,1),
(0,1,0,|,-1),
(0,-1,1,|,1)
]#
Add row 2 to row 3:
#[
(1, 0, 0,|,1),
(0,1,0,|,-1),
(0,0,1,|,0)
]#
#A = 1, B = -1 and C = 0#
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = int1/(x^2 + 9)dx - intx/(x^2 + 9)^2dx#
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = int1/(x^2 + 9)dx - 1/2int(2x)/(x^2 + 9)^2dx#
Let #u = x^2 + 9, "then "du = 2xdx#
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = int1/(x^2 + 9)dx - 1/2int1/u^2du#
Integrate
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = 1/3tan^-1(x/3) + 1/2(1)/u + C#
Reverse the substitution:
#int(x^2 - x + 9)/(x^2 + 9)^2 dx = 1/3tan^-1(x/3) + (1)/(2(x^2 + 9)) + C#