indefinite integral of ( (2x/(x^2 + 6x + 13)) dx)

indefinite integral of ( (2x/((x+3)^2 + 4)) dx)

Let u = x + 3

indefinite integral of ( (2(u-3)/(4 + u^2)) du)

(1/2) * indefinite integral of ( ((u-3)/(1 + (u/2)^2)) du)

(1/2) * ( indefinite integral of ( (u/(1 + (u/2)^2)) du) - indefinite integral of ( (3/(1 + (u/2)^2)) du) )

Let z = 1 + (u/2)^2

indefinite integral of (dz/z) - (3/2) * indefinite integral of ( (1/(1 + (u/2)^2)) du)

ln( (x^2 + 6x + 13)/4 ) - (3/2) * arctan( (x+3)/2 ) + C

The correct answer should be:

ln(x^2 + 6x + 13) - 3*arctan( (x+3)/2 ) + C