# Evaluate the integral \int \frac{x^2 + 3}{(x^2 + 9x - 4)^2} \, dx

## Question:

Evaluate the integral {eq}\int \frac{x^2 + 3}{(x^2 + 9x - 4)^2} \, dx {/eq}

## Integrating with Partial Fraction Decomposition

When integrating a rational function {eq}f(x) = \dfrac{p(x)}{q(x)} {/eq}, where {eq}q(x)\neq 0 {/eq}, {eq}p(x) {/eq} and {eq}q(x) {/eq} are polynomials and the degree of {eq}q(x) {/eq} is greater than the degree of {eq}p(x) {/eq}, using the technique of rewriting the integrand in its partial fraction decomposition (also called partial fraction expansion) prior to integrating is very common. The partial fraction decomposition of a rational function is found by reversing the procedure of finding a common denominator and adding. To find the partial fraction decomposition of a rational function, begin by fully factoring the denominator. For each linear factor {eq}ax+b {/eq} in the denominator, there is a corresponding term in the partial fraction decomposition of the form {eq}\dfrac{A}{ax+b} {/eq}. For every irreducible quadratic factor {eq}ax^2+bx + c {/eq} in the denominator, there is a corresponding term in the partial fraction decomposition of the form {eq}\dfrac{Ax+B}{ax^2+bx+c} {/eq}. For example, if your rational function, after factoring the denominator, looks like {eq}\dfrac{p(x)}{(ax+b)(cx^2+dx+e)^2} {/eq} the partial fraction decomposition would be of the form {eq}\dfrac{p(x)}{(ax+b)(cx^2+dx+e)^2} = \dfrac{A}{ax+b} + \dfrac{Bx+C}{cx^2+dx+e} + \dfrac{Dx+E}{(cx^2+dx+e)^2} {/eq}. To find the constants {eq}A,B,C,D,E {/eq} multiply both sides of the equation by the factored denominator and set up a system of equations by comparing coefficients on both sides. After the constants are found, rewrite the original integral using the partial fraction decomposition and integrate term by term.

To integrate {eq}\displaystyle\int \frac{x^2 + 3}{(x^2 + 9x - 4)^2} \, dx {/eq} , first find the partial fraction decomposition of the integrand.

The denominator is already fully factored, so we have

{eq}\dfrac{x^2 + 3}{(x^2 + 9x - 4)^2} = \dfrac{Ax+B}{x^2+9x-4} + \dfrac{Cx+D}{(x^2+9x-4)^2}\\ x^2 + 3 = (Ax+B)(x^2+9x-4) + Cx + D\\ x^2 + 3 = Ax^3 + (9A+B)x^2 + (9B+C-4A)x + D-4B {/eq}

Comparing coefficients on both sides of the equation, we have the system of equations

{eq}0=A\\ 1=9A+B\\ 0=9B+C-4A\\ 3=D-4B {/eq}

which has solution {eq}A=0 , B=1 , C=-9 , D=7 {/eq}

Rewriting our integral with the partial fraction decomposition, we have

{eq}\displaystyle\int \frac{x^2 + 3}{(x^2 + 9x - 4)^2} \, dx = \int\left(\frac{1}{x^2+9x-4} + \frac{-9x+7}{(x^2+9x - 4)^2} \right) dx {/eq}

Normally, after reaching this point, the integral can be calculated easily with some u-substitution. However, this integral is much more complicated. Using a computer algebra system, we have

{eq}= \dfrac{-2\tanh^{-1}\left(\frac{2x+9}{\sqrt{97}}\right)}{\sqrt{97}} + \dfrac{9-95x}{97(x^2 + 9x -4)} + \dfrac{190\tanh^{-1}\left(\frac{2x+9}{\sqrt{97}}\right)}{97\sqrt{97}} + c = \dfrac{-4\tanh^{-1}\left(\frac{2x+9}{\sqrt{97}}\right)}{\sqrt{97}} + \dfrac{9-95x}{97(x^2 + 9x -4)}+c {/eq} 