# How do you integrate int(x+1)/((2x-4)(x+3)(x-7)) using partial fractions?

May 27, 2016

I got $- \frac{3}{50} \ln | x - 2 | - \frac{1}{50} \ln | x + 3 | + \frac{2}{25} \ln | x - 7 | + C$.

Using partial fractions, in general we have:

$\int \frac{x + 1}{\left(2 x - 4\right) \left(x + 3\right) \left(x - 7\right)} \mathrm{dx}$

$= \int \frac{A}{2 x - 4} + \frac{B}{x + 3} + \frac{C}{x - 7} \mathrm{dx}$

where any linear term in the denominator (that is, it is written as $A x + B$) corresponds with the integrals $\int \frac{A}{B x + C} \mathrm{dx}$, $\int \frac{D}{E x + F} \mathrm{dx}$, etc.

Let's ignore the integral symbols for now and focus on simplifying this via common denominators.

$\frac{A}{2 x - 4} + \frac{B}{x + 3} + \frac{C}{x - 7}$

$= \frac{A \left(x + 3\right)}{\left(2 x - 4\right) \left(x + 3\right)} + \frac{B \left(x - 7\right)}{\left(x + 3\right) \left(x - 7\right)} + \frac{C \left(x + 3\right)}{\left(x + 3\right) \left(x - 7\right)}$

$= \frac{A \left(x + 3\right) \left(x - 7\right)}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)} + \frac{B \left(x - 7\right) \left(2 x - 4\right)}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)} + \frac{C \left(2 x - 4\right) \left(x + 3\right)}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}$

Now we can combine these fractions together...

$= \frac{A \left(x + 3\right) \left(x - 7\right) + B \left(x - 7\right) \left(2 x - 4\right) + C \left(2 x - 4\right) \left(x + 3\right)}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}$

Expand these factors...

$= \frac{A \left({x}^{2} - 4 x - 21\right) + B \left(2 {x}^{2} - 18 x + 28\right) + C \left(2 {x}^{2} + 2 x - 12\right)}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}$

$= \frac{A {x}^{2} - 4 A x - 21 A + 2 B {x}^{2} - 18 B x + 28 B + 2 C {x}^{2} + 2 C x - 12 C}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}$

Rearrange these to separate the $\textcolor{b l u e}{{x}^{2}}$ terms from the $\textcolor{g r e e n}{x}$ terms and $\textcolor{h i g h l i g h t}{\text{constant}}$ terms. Make SURE that you match the general result ${a}_{0} {x}^{2} \textcolor{red}{+} {a}_{1} x \textcolor{red}{+} {a}_{2}$!!

$= \frac{\textcolor{b l u e}{A {x}^{2} + 2 B {x}^{2} + 2 C {x}^{2}} - \textcolor{g r e e n}{4 A x - 18 B x + 2 C x} - \textcolor{h i g h l i g h t}{21 A + 28 B - 12 C}}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}$

$= \frac{\left(A + 2 B + 2 C\right) {x}^{2} + \left(- 4 A - 18 B + 2 C\right) x + \left(- 21 A + 28 B - 12 C\right)}{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}$

Now that we got here, we have just equated these two expressions:

$\frac{x + 1}{\cancel{\left(2 x - 4\right) \left(x + 3\right) \left(x - 7\right)}} = \frac{\left(A + 2 B + 2 C\right) {x}^{2} + \left(- 4 A - 18 B + 2 C\right) x + \left(- 21 A + 28 B - 12 C\right)}{\cancel{\left(x + 3\right) \left(x - 7\right) \left(2 x - 4\right)}}$

Thus:

$\left(\left(A + 2 B + 2 C\right) {x}^{2} + \left(- 4 A - 18 B + 2 C\right) x + \left(- 21 A + 28 B - 12 C\right)\right) = 0 {x}^{2} + 1 x + 1$

So, what we have is:

• $A + 2 B + 2 C = 0$
• $- 4 A - 18 B + 2 C = 1$
• $- 21 A + 28 B - 12 C = 1$

This is the answer that we are hoping to achieve.

To solve this system in the most foolproof way, try using elementary row operations to simplify this system.

What that means is you are limited to:

• scaling a row
• adding one row to another
• both

When we rewrite this as a matrix to make it look nicer on the eyes, we get:

$\left[\begin{matrix}1 & 2 & 2 & | & 0 \\ - 4 & - 18 & 2 & | & 1 \\ - 21 & 28 & - 12 & | & 1\end{matrix}\right]$

Notice that we only use the coefficients of each variable.

We assume that the first column contains the "$A$ terms", the second column contains the "$B$ terms", and the third column contains the "$C$ terms".

Using the notation $c {R}_{i} + {R}_{j}$ as scaling row $i$ by a scalar $c$, adding to row $j$, and storing the result in row $j$, we get:

$\stackrel{4 {R}_{1} + {R}_{2} \text{ }}{\to} \left[\begin{matrix}1 & 2 & 2 & | & 0 \\ 0 & - 10 & 10 & | & 1 \\ - 21 & 28 & - 12 & | & 1\end{matrix}\right]$

$\stackrel{- \frac{1}{10} {R}_{2} \text{ }}{\to} \left[\begin{matrix}1 & 2 & 2 & | & 0 \\ 0 & 1 & - 1 & | & - \frac{1}{10} \\ - 21 & 28 & - 12 & | & 1\end{matrix}\right]$

$\stackrel{21 {R}_{1} + {R}_{3} \text{ }}{\to} \left[\begin{matrix}1 & 2 & 2 & | & 0 \\ 0 & 1 & - 1 & | & - \frac{1}{10} \\ 0 & 70 & 30 & | & 1\end{matrix}\right]$

$\stackrel{\frac{1}{10} {R}_{3} \text{ }}{\to} \left[\begin{matrix}1 & 2 & 2 & | & 0 \\ 0 & 1 & - 1 & | & - \frac{1}{10} \\ 0 & 7 & 3 & | & \frac{1}{10}\end{matrix}\right]$

$\stackrel{- 2 {R}_{2} + {R}_{1} \text{ }}{\to} \left[\begin{matrix}1 & 0 & 4 & | & \frac{1}{5} \\ 0 & 1 & - 1 & | & - \frac{1}{10} \\ 0 & 7 & 3 & | & \frac{1}{10}\end{matrix}\right]$

$\stackrel{- 7 {R}_{2} + {R}_{3} \text{ }}{\to} \left[\begin{matrix}1 & 0 & 4 & | & \frac{1}{5} \\ 0 & 1 & - 1 & | & - \frac{1}{10} \\ \textcolor{h i g h l i g h t}{0} & \textcolor{h i g h l i g h t}{0} & \textcolor{h i g h l i g h t}{10} & | & \textcolor{h i g h l i g h t}{\frac{4}{5}}\end{matrix}\right]$

We can stop simplifying here, since we have one variable solved for. Now we can back-substitute to solve for the other two variables.

Moving back over to the regular system of equations...

For $C$:

$10 C = \frac{4}{5} \implies \textcolor{g r e e n}{C = \frac{2}{25}}$

For $B$:

$B - C = - \frac{1}{10}$
$B - \frac{2}{25} = - \frac{1}{10}$
$\textcolor{g r e e n}{B} = - \frac{5}{50} + \frac{4}{50} = \textcolor{g r e e n}{- \frac{1}{50}}$

For $A$:

$A + 4 C = \frac{1}{5}$
$A + \frac{8}{25} = \frac{5}{25}$
$\textcolor{g r e e n}{A = - \frac{3}{25}}$

Of course, you don't have to do it this way, but back when I first learned partial fractions, I didn't know how to do it this way and it was fairly frustrating getting the wrong answer somehow whenever I probably plugged a variable back into the wrong equation.

Back to the problem, we have:

$\textcolor{b l u e}{\int \frac{x + 1}{\left(2 x - 4\right) \left(x + 3\right) \left(x - 7\right)} \mathrm{dx}}$

$= - \frac{3}{25} \int \frac{1}{2 x - 4} \mathrm{dx} - \frac{1}{50} \int \frac{1}{x + 3} \mathrm{dx} + \frac{2}{25} \int \frac{1}{x - 7} \mathrm{dx}$

$= - \frac{3}{50} \int \frac{1}{x - 2} \mathrm{dx} - \frac{1}{50} \int \frac{1}{x + 3} \mathrm{dx} + \frac{2}{25} \int \frac{1}{x - 7} \mathrm{dx}$

$= \textcolor{b l u e}{- \frac{3}{50} \ln | x - 2 | - \frac{1}{50} \ln | x + 3 | + \frac{2}{25} \ln | x - 7 | + C}$