How do you evaluate the integral #int (xdx)/(x^2+4x+5)#?

1 Answer
Feb 11, 2017

# int \ x/(x^2+4x+5) \ dx = 1/2ln | x^2+4x+5 | - 2tan^-1 (x+2) + C #

Explanation:

Let

# I = int \ x/(x^2+4x+5) \ dx #

We can complete the square on the denominator, to get

# I = int \ x/((x+2)^2-2^2+5) \ dx #
# \ \ = int \ x/((x+2)^2+1) \ dx #

Let # u=x+2 iff x = u-2 => (dx)/(du) = 1 #, so then substituting into the integral we get:

# I = int \ (u-2)/(u^2+1) \ du #
# \ \ = int \ u/(u^2+1) \ - 2/(u^2+1) \ du #
# \ \ = int \ u/(u^2+1) \ du \ - 2int 1 /(u^2+1) \ du #
# \ \ = 1/2int \ (2u)/(u^2+1) \ du \ - 2int 1 /(u^2+1) \ du #

The first intergral is of the form #int \ (f'(u))/(f(u)) \ du # which is a standard result with solution # ln | f(u) | #, And so:

# int \ (2u)/(u^2+1) \ du = ln | u^2+1 | #
# " "= ln | (x+2)^2+1 | #
# " "= ln | x^2+4x+5 |#

For the second integral, we can use the substitution #x=tan theta#

# u = tan theta => (du)/(d theta) = sec^2 theta #, and, #theta = tan^-1u#
# u = tan theta iff u^2=tan^2 theta #
# " " => 1+u^2=1+tan^2 theta #
# " " => 1+u^2=sec^2 theta #

Substituting into the integral we get:

# int 1 /(u^2+1) \ du = int \ d theta#
# " "= theta#
# " "= tan^-1u#
# " "= tan^-1 (x+2)#

Combining the result from both result we get:

# I = 1/2ln | x^2+4x+5 | - 2tan^-1 (x+2) + C #