# How do you integrate int9/((x^2+9)(x+3)(x-3)) dx using partial fractions?

Jan 22, 2016

$- \frac{1}{6} \arctan \left(\frac{x}{3}\right) - \frac{1}{12} \ln \left\mid x + 3 \right\mid + \frac{1}{12} \ln \left\mid x - 3 \right\mid + c$

#### Explanation:

Your partial fraction decomposition can be computed as follows:

Find $A$, $B$, $C$ and $D$ so that

$\frac{9}{\left({x}^{2} + 9\right) \left(x + 3\right) \left(x - 3\right)} = \frac{A x + B}{{x}^{2} + 9} + \frac{C}{x + 3} + \frac{D}{x - 3}$

====================================

To solve this equation for $A$, $B$, $C$ and $D$, the first thing to do would be multiplying both sides with $\left({x}^{2} + 9\right) \left(x + 3\right) \left(x - 3\right)$:

$9 = \left(A x + B\right) \left(x + 3\right) \left(x - 3\right) + C \left({x}^{2} + 9\right) \left(x - 3\right) + D \left({x}^{2} + 9\right) \left(x + 3\right)$

... expand the terms...

$9 = \left(A x + B\right) \left({x}^{2} - 9\right) + C \left({x}^{3} - 3 {x}^{2} + 9 x - 27\right) + D \left({x}^{3} + 3 {x}^{2} + 9 x + 27\right)$

$9 = A {x}^{3} + B {x}^{2} - 9 A x - 9 B + C {x}^{3} - 3 C {x}^{2} + 9 C x - 27 C + D {x}^{3} + 3 D {x}^{2} + 9 D x + 27 D$

... sort the $\textcolor{red}{{x}^{3}}$ terms, $\textcolor{b l u e}{{x}^{2}}$ terms, $\textcolor{v i o \le t}{x}$ terms and terms $\textcolor{g r e e n}{\text{without } x}$...

$\textcolor{red}{0 \cdot {x}^{3}} + \textcolor{b l u e}{0 \cdot {x}^{2}} + \textcolor{v i o \le t}{0 \cdot x} + \textcolor{g r e e n}{9} = \textcolor{red}{A {x}^{3}} + \textcolor{b l u e}{B {x}^{2}} \textcolor{v i o \le t}{- 9 A x} \textcolor{g r e e n}{- 9 B} + \textcolor{red}{C {x}^{3}} \textcolor{b l u e}{- 3 C {x}^{2}} + \textcolor{v i o \le t}{9 C x} \textcolor{g r e e n}{- 27 C} + \textcolor{red}{D {x}^{3}} + \textcolor{b l u e}{3 D {x}^{2}} + \textcolor{v i o \le t}{9 D x} + \textcolor{g r e e n}{27 D}$

====================================

This equation can only hold if all the ${x}^{3}$ terms match, all the ${x}^{2}$ terms match, all the $x$ terms match and all the terms without $x$ match.

Thus, it can be split up into $4$ equations:

 { ( (I) color(white)(xxx) 0 = color(white)(xx) A color(white)(xxxxxxi) + C color(white)(xxi)+ D color(white)(xxxxxxxx) color(red)(x^3) " terms" ), ( (II) color(white)(xx) 0 = color(white)(xxxxxx)B color(white)(xx)- 3C color(white)(xx) + 3D color(white)(xxxxxxiii) color(blue)(x^2) " terms" ), ( (III) color(white)(xii) 0 = -9A color(white)(xxxxxii) + 9C color(white)(xx)+ 9D color(white)(xxxxxxiii) color(violet)(x) " terms" ), ( (IV) color(white)(xx) 9 = color(white)(xxxx)-9B color(white)(x) -27C color(white)(x)+ 27D color(white)(xxx) color(green)("without " x )" terms") :}

First of all, let's divide the equations $\left(I I I\right)$ and $\left(I V\right)$ by $9$:

 { ( (I) color(white)(xxx) 0 = color(white)(xx) A color(white)(xxxxxxi) + C color(white)(xxi)+ D ), ( (II) color(white)(xx) 0 = color(white)(xxxxxx)B color(white)(xx)- 3C color(white)(xx) + 3D), ( (III) color(white)(xii) 0 = -A color(white)(xxxxxxi) + C color(white)(xxi)+ D), ( (IV) color(white)(xx) 1 = color(white)(xxxx)-B color(white)(xx) -3C color(white)(xx)+ 3D) :}

$\left(I\right) - \left(I I I\right)$ gives

$0 = 2 A \text{ "=>" } A = 0$

$\left(I I\right) - \left(I V\right)$ gives

$- 1 = 2 B \text{ "=>" } B = - \frac{1}{2}$

Inserting $A = 0$ in $\left(I\right)$ and $B = - \frac{1}{2}$ in $\left(I I\right)$ gives:

{ ( (I') color(white)(xxx) 0 = color(white)(xx) C + D), ( (II') color(white)(xx) 1/2 = -3C + 3D):}

From $\left(I '\right)$ we know that $C = - D$. Inserting this into $\left(I I '\right)$ gives

$\frac{1}{2} = 3 D + 3 D \text{ " => " } D = \frac{1}{12}$

and finally, $C = - \frac{1}{12}$.

====================================

Now that we have found $A$, $B$, $C$ and $D$, we can apply the partial fraction decomposition and solve the integral:

$\int \frac{9}{\left({x}^{2} + 9\right) \left(x + 3\right) \left(x - 3\right)} \text{d} x$

$= \int \left(- \frac{1}{2} \cdot \frac{1}{{x}^{2} + 9} - \frac{1}{12} \cdot \frac{1}{x + 3} + \frac{1}{12} \cdot \frac{1}{x - 3}\right) \text{d} x$

$= - \frac{1}{2} \int \frac{1}{{x}^{2} + 9} \text{d"x - 1/12 int 1/(x+3) "d"x + 1/12 int 1 /(x-3) "d} x$

Now, you need to compute three easier integrals instead of one complicated one.

====================================

Since

$\left(\arctan x\right) ' = \frac{1}{{x}^{2} + 1}$,

we know that

$\left[\frac{1}{3} \arctan \left(\frac{x}{3}\right)\right] ' = \frac{1}{3} \cdot \frac{1}{{\left(\frac{x}{3}\right)}^{2} + 1} = \frac{1}{3 \left({x}^{2} / 9 + 3\right)} = \frac{1}{{x}^{2} + 9}$.

Also, we know that

$\left(\ln \left\mid x + 1 \right\mid\right) ' = \frac{1}{x + 1}$

Thus, we can solve the integral as follows:

$\int \frac{9}{\left({x}^{2} + 9\right) \left(x + 3\right) \left(x - 3\right)} \text{d} x$

$= - \frac{1}{2} \int \frac{1}{{x}^{2} + 9} \text{d"x - 1/12 int 1/(x+3) "d"x + 1/12 int 1 /(x-3) "d} x$

$= - \frac{1}{2} \cdot \frac{1}{3} \cdot \arctan \left(\frac{x}{3}\right) - \frac{1}{12} \ln \left\mid x + 3 \right\mid + \frac{1}{12} \ln \left\mid x - 3 \right\mid + c$

$= - \frac{1}{6} \arctan \left(\frac{x}{3}\right) - \frac{1}{12} \ln \left\mid x + 3 \right\mid + \frac{1}{12} \ln \left\mid x - 3 \right\mid + c$