Write the partial fraction equation:
#(x^2+4x+12)/((x+2)(x^2+4)) = A/(x+2) + (Bx)/(x^2+4) + C/(x^2+1)#
Multiply both sides by #(x+2)(x^2+4)#:
#x^2+4x+12 = A(x^2+4) + (Bx)(x+2) + C(x+2)" [1]"#
Make B and C disappear by letting #x = -2#
#(-2)^2+4(-2)+12 = A((-2)^2+4)#
#8 = A(8)#
#A = 1#
Substitute the value for A into equation [1]:
#x^2+4x+12 = (x^2+4) + (Bx)(x+2) + C(x+2)" [2]"#
Make B disappear by letting #x = 0#
#0^2+4(0)+12 = (0^2+4) + C(0+2)#
#8 =2C#
#C = 4#
Substitute the value for C into equation [2]:
#x^2+4x+12 = (x^2+4) + (Bx)(x+2) + 4(x+2)" [3]"#
Let (x = 1):
#1^2+4(1)+12 = (1^2+4) + (B(1))((1)+2) + 4(1+2)#
#0 = 3B#
#B = 0#
Remove the term for B from equation [3]
#x^2+4x+12 = (x^2+4) + 4(x+2)#
Divide by #(x+2)(x^2+4)#:
#(x^2+4x+12)/((x+2)(x^2+4)) = 1/(x+2) + 4/(x^2+4)" [4]"#
Equation [4] gives us the template for the integrals:
#int(x^2+4x+12)/((x+2)(x^2+4))dx = int1/(x+2)dx + 4int1/(x^2+1)dx#
Both integrals are well known:
#int(x^2+4x+12)/((x+2)(x^2+4))dx = ln|x+2| + 4tan^-1(x)+ C#