These kind of problems can be done in two ways. One is using direct formula and other one is using completing the square method.You can find both ways in this page integrating-quadratic- denominators. Formula:

dx/(ax²+ bx + c)=(1/4a)[(2ax + b)²+(4ac - b²)]+c

Example 1:

Integrate 1/(x² + 5x + 7) with respect to x

Method 1:

∫ [ 1/(x² + 5x + 7) ] dx = ∫ dx/(x² + 5x + 7)

Now we have to compare the given quadratic equation (x² + 5x + 7) with (ax² + bx + c) then the values of a = 1, b = 5 and c = 7. Now we can use this formula to integrate the given function

Formula:

dx/(ax²+ bx + c)=4a/[(2ax + b)²+(4ac - b²)] dx

= 4(1)/ [ ((2(1)(x) + 5)² + (4(1) (7) - 5²) ] dx

= 4/[ (2x + 5)² + (28 - 5²) ] dx

= 4/[ (2x + 5)² + (28 - 25) ] dx

= 4 ∫1/ [ (2x + 5)² + 3 ] dx

= 4 ∫1/ [ (2x + 5)² + (√3)² ] dx

Now this exactly matches with one of the formula in standard integrals.

∫ dx/( a² + ) = (1/a) tan⁻ ¹ (x/a) + c

= 4 [1/(2x + 5) tan ⁻ ¹ [ √3/(2x + 5) ] + C

= [4/(2x + 5)] tan ⁻ ¹ [ √3/(2x + 5) ] + C

Method 2:

∫ [ 1/(x² + 5x + 7) ] dx = ∫ dx/(x² + 5x + 7)

With out using the direct formula we can just use the completing the square method for the quadratic equation.

For that let us take the quadratic equation which is in the denominator.

x² + 5x + 7 = x² + (2/2) 5x + 7

= x² + 2 x x x (5/2) + (5/2)² - (5/2)² +  7

= [ x + (5/2) ]² - (5/2)² +  7

= [ x + (5/2) ]² - (25/4) +  7

= { [ x + (5/2) ]² + (-25 + 28)/4 }

= { [ x + (5/2) ]² + 3/4 }

=  [ (2x + 5)/2) ]² + (√3/2)²

=   (2x + 5)²/4  + (√3)²/4

=   (1/4) [(2x + 5)²  + (√3)²]

Now we are going to apply (1/4) [(2x + 5)²  + (√3)²] for the quadratic equation (x² + 5x + 7)

So we will get ∫ [ 1/(x² + 5x + 7) ] dx = ∫ dx/(1/4) [(2x + 5)²  + (√3)²]

=  4 ∫ dx/[(2x + 5)²  + (√3)²]

∫ dx/( a² + ) = (1/a) tan⁻ ¹ (x/a) + c

Here a = (2x + 5)  x = √3

= 4 {1/[(2x + 5)] tan ⁻ ¹ [ √3/(2x + 5) ] }+ C

= [4/(2x + 5)] tan ⁻ ¹ [ √3/(2x + 5) ] + C 