# Indefinite Integral Polynomial in Denominator: integrate (2x/(x^2 + 6x + 13)) dx

#### debased

##### New member
So I'm trying to integrate the indefinite integral of (2x/(x^2 + 6x + 13)) and I get to an answer that I know doesn't work but I'm only off but a very small amount and I'd like to know where I went wrong. I'll post my work and the incorrect answer below:

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

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

#### Jomo

##### Elite Member
So I'm trying to integrate the indefinite integral of (2x/(x^2 + 6x + 13)) and I get to an answer that I know doesn't work but I'm only off but a very small amount and I'd like to know where I went wrong. I'll post my work and the incorrect answer below:

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 -->dz = udu/2 or 2dz = udu. You replaced udu with dz which is not true

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

ln(x^2 + 6x + 13) - 3*arctan( (x+3)/2 ) + C
dz = udu/2 or 2dz = udu. You replaced udu with dz which is not true. Also, ln( (x^2 + 6x + 13)/4 ) = ln((x^2 + 6x + 13) - ln(4) and ln(4) can be absorbed by C.
Fix these mistakes and see what you get.

#### tkhunny

##### Moderator
Staff member
So I'm trying to integrate the indefinite integral of (2x/(x^2 + 6x + 13)) and I get to an answer that I know doesn't work but I'm only off but a very small amount and I'd like to know where I went wrong. I'll post my work and the incorrect answer below:

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

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

$$\displaystyle [f(x)]^{2} + A^{2}$$ typically, substitute f(x) = A*tan(u)

$$\displaystyle [f(x)]^{2} - A^{2}$$ typically, substitute f(x) = A*sin(u)

$$\displaystyle [A^{2} - f(x)]^{2}$$ typically, substitute f(x) = A*sec(u)

Let's see what you get.

#### debased

##### New member
dz = udu/2 or 2dz = udu. You replaced udu with dz which is not true. Also, ln( (x^2 + 6x + 13)/4 ) = ln((x^2 + 6x + 13) - ln(4) and ln(4) can be absorbed by C.
Fix these mistakes and see what you get.
I didn't replace udu with dz I did substitute in 2dz I just skipped the step of showing that the 1/2 constant in front of that integral would cancel with the 2 you pull out from 2dz. I fixed the ln(4) mistake but I'm still left with

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

#### Dr.Peterson

##### Elite Member
... - indefinite integral of ( (3/(1 + (u/2)^2)) du) )

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

... - (3/2) * arctan( (x+3)/2 ) + C

... - 3*arctan( (x+3)/2 ) + C
I didn't replace udu with dz I did substitute in 2dz I just skipped the step of showing that the 1/2 constant in front of that integral would cancel with the 2 you pull out from 2dz. I fixed the ln(4) mistake but I'm still left with

ln((x^2 + 6x + 13) - (3/2) * arctan((x+3)/2) + C
Focus on the one integral I singled out above. This is where you missed something in the substitution; you didn't show the details of what you did for this one. Presumably you made a substitution like z = u/2, so du = 2 dz, and should get

INT (1/(1 + (u/2)^2)) du = INT (1/(1 + z^2)) *2 dz = 2 arctan(z) + C

#### debased

##### New member
Focus on the one integral I singled out above. This is where you missed something in the substitution; you didn't show the details of what you did for this one. Presumably you made a substitution like z = u/2, so du = 2 dz, and should get

INT (1/(1 + (u/2)^2)) du = INT (1/(1 + z^2)) *2 dz = 2 arctan(z) + C

I thought the answer should be a 3 arctan(z) + C; aren't you forgetting to distribute the 1/2 that I pulled out before separating it into two integrals?

(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

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

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

#### Dr.Peterson

##### Elite Member
I thought the answer should be a 3 arctan(z) + C; aren't you forgetting to distribute the 1/2 that I pulled out before separating it into two integrals?

(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

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

indefinite integral of (dz/z) - (3/2) * indefinite integral of ( (1/(1 + (u/2)^2)) du)
I didn't forget the 1/2; I was dealing with the integral itself, leaving the finishing for you. But you seem to have lost the 2:

I showed that indefinite integral of ( (1/(1 + (u/2)^2)) du) = 2 arctan(z); when you multiply that by 3/2, you're left with just what you want.

#### debased

##### New member
I didn't forget the 1/2; I was dealing with the integral itself, leaving the finishing for you. But you seem to have lost the 2:

I showed that indefinite integral of ( (1/(1 + (u/2)^2)) du) = 2 arctan(z); when you multiply that by 3/2, you're left with just what you want.
Thanks, your help in the other thread got me to realize I need to use another substitution since you can't have the (u/2)^2 go directly to an arctan. Got the answer now, much appreciated!