Calculus/Integration techniques/Partial Fraction Decomposition/Solutions

Evaluate the following by the method partial fraction decomposition.

1. $\int\frac{2x+11}{(x+6)(x+5)}dx$

Decompose the fraction:

$\frac{2x+11}{(x+6)(x+5)}=\frac{A}{x+6}+\frac{B}{x+5}=\frac{Ax+5A+Bx+6B}{(x+6)(x+5}$

Equate coefficients of x:

$A+B=2$
$5A+6B=11$

Solve the system of equations:

$A=1 , B=1$

Rewrite the integral and solve:

\begin{align}\int\frac{2x+11}{(x+6)(x+5)}dx&=\int\frac{dx}{x+6}+\int\frac{dx}{x+5}\\ &=\mathbf{\ln|x+6|+\ln|x+5|+C}\end{align}
2. $\int\frac{7x^{2}-5x+6}{(x-1)(x-3)(x-7)}dx$

Decompose the fraction:

\begin{align}\frac{7x^{2}-5x+6}{(x-1)(x-3)(x-7)}&=\frac{A}{x-1}+\frac{B}{x-3}+\frac{C}{x-7}\\ &=\frac{A(x-3)(x-7)+B(x-1)(x-7)+C(x-1)(x-3)}{(x-1)(x-3)(x-7)}\\ &=\frac{A(x^{2}-10x+21)+B(x^{2}-8x+7)+C(x^{2}-4x+3)}{(x-1)(x-3)(x-7)}\\ &=\frac{Ax^{2}-10Ax+21A+Bx^{2}-8Bx+7B+Cx^{2}-4Cx+3C}{(x-1)(x-3)(x-7)}\end{align}

Equate coefficients:

\begin{align}A+B+C&=7\\ -10A-8B-4C&=-5\\ 21A+7B+3C&=6\end{align}

Solve the system of equations:

$D=\Biggr|\begin{array}{ccc} 1 & 1 & 1\\ -10 & -8 & -4\\ 21 & 7 & 3 \end{array}\Biggr|=-24-84-70-(-30-28-168)=48$
$A=\frac{\Biggr|\begin{array}{ccc} 7 & 1 & 1\\ -5 & -8 & -4\\ 6 & 7 & 3 \end{array}\Biggr|}{D}=\frac{(7)(-8)(3)-24-35-(-15+(7)(-4)(7)-48)}{48}=\frac{32}{48}=\frac{2}{3}$
$B=\frac{\Biggr|\begin{array}{ccc} 1 & 7 & 1\\ -10 & -5 & -4\\ 21 & 6 & 3 \end{array}\Biggr|}{D}=\frac{-15+(7)(-4)(21)-60-(-210-24+(-5)(21))}{48}=\frac{-324}{48}=-\frac{27}{4}$
$C=\frac{\Biggr|\begin{array}{ccc} 1 & 1 & 7\\ -10 & -8 & -5\\ 21 & 7 & 6 \end{array}\Biggr|}{D}=\frac{(-8)(6)+(-5)(21)+(7)(-10)(7)-((-10)(6)+(-5)(7)+(7)(-8)(21))}{48}=\frac{628}{48}=\frac{157}{12}$

Rewrite the integral and solve:

\begin{align}\int\frac{7x^{2}-5x+6}{(x-1)(x-3)(x-7)}dx&=\frac{2}{3}\int\frac{dx}{x-1}-\frac{27}{4}\int\frac{dx}{x-3}+\frac{157}{12}\int\frac{dx}{x-7}\\ &=\mathbf{\frac{2}{3}\ln|x-1|-\frac{27}{4}\ln|x-3|+\frac{157}{12}\ln|x-7|+C}\end{align}
3. $\int\frac{x^{2}-x+2}{x(x+2)^{2}}dx$

Decompose the fraction:

\begin{align}\frac{x^{2}-x+2}{x(x+2)^{2}}&=\frac{A}{x}+\frac{B}{x+2}+\frac{C}{(x+2)^{2}}\\ &=\frac{A(x+2)^{2}+Bx(x+2)+Cx}{x(x+2)^{2}}\\ &=\frac{A(x^{2}+4x+4)+Bx^{2}+2Bx+Cx}{x(x+2)^{2}}\\ &=\frac{Ax^{2}+4Ax+4A+Bx^{2}+2Bx+Cx}{x(x+2)^{2}}\end{align}

Equate the coefficients:

$\begin{array}{ccccccc} A & + & B & & & = & 1\\ 4A & + & 2B & + & C & = & -1\\ 4A & & & & & = & 2 \end{array}$

Solve the system of equations:

$4A=2\implies A=\frac{1}{2}$
$A+B=1\implies B=\frac{1}{2}$
$4A+2B+C=-1\implies C=-4$

Rewrite the integral and solve:

\begin{align}\int\frac{x^{2}-x+2}{x(x+2)^{2}}dx&=\frac{1}{2}\int\frac{dx}{x}+\frac{1}{2}\int\frac{dx}{x+2}-4\int\frac{dx}{(x+2)^{2}}\\ &=\mathbf{\frac{1}{2}\ln|x|+\frac{1}{2}\ln|x+2|+\frac{4}{x+2}+C}\end{align}
4. $\int \frac{2}{(x+2)(x^{2}+3)} dx$
$\frac{2}{(x+2)(x^{2}+3)}=\frac{A}{x+2}+\frac{Bx+C}{x^{2}+3}=\frac{Ax^{2}+3A+Bx^{2}+Cx+2Bx+2C}{(x+2)(x^{2}+3)}$

Equate the coefficients for each power of x. For $x^2$:

$A+B=0$

, for $x$:

$C+2B=0$

, and for the constant terms:

$3A+2C=2$

Solve the system of equations however you see fit (Gaussian elimination with back-substitution used here):

$\left[\begin{array}{cccc} 1 & 1 & 0 & 0\\ 0 & 2 & 1 & 0\\ 3 & 0 & 2 & 2 \end{array}\right] \left[\begin{array}{cccc} 1 & 1 & 0 & 0\\ 0 & 1 & \frac{1}{2} & 0\\ 0 & -3 & 2 & 2 \end{array}\right] \left[\begin{array}{cccc} 1 & 1 & 0 & 0\\ 0 & 1 & \frac{1}{2} & 0\\ 0 & 0 & \frac{7}{2} & 2 \end{array}\right] \left[\begin{array}{cccc} 1 & 1 & 0 & 0\\ 0 & 1 & \frac{1}{2} & 0\\ 0 & 0 & 1 & \frac{4}{7} \end{array}\right]$
$C=\frac{4}{7},\, B=-\frac{2}{7},\, A=\frac{2}{7}$

So

$\int\frac{2}{(x+2)(x^{2}+3)}dx=\frac{2}{7}\int\frac{1}{x+2}dx-\frac{2}{7}\int\frac{x}{x^2+3}+\frac{4}{7}\int\frac{1}{x^{2}+3}dx$

To evaluate the first integral use substitution, letting $u=x+2$, $du=dx$.
To evaluate the second integral use substitution, letting $u=x^{2}+3$, $du=2xdx$, $dx=\frac{du}{2x}$.
To evaluate the third integral, use the trigonometric substitution $x=\sqrt{3}\tan(\theta)$, $dx=\sqrt{3}\sec^{2}(\theta)d\theta$.

\begin{align}\int\frac{2}{(x+2)(x^{2}+3)}dx&=\frac{2}{7}\int\frac{1}{x+2}dx-\frac{2}{7}\int\frac{x}{x^2+3}+\frac{4}{7}\int\frac{1}{x^{2}+3}dx\\ &=\frac{2}{7}\ln|x+2|-\frac{2}{14}\ln|x^{2}+3|+\frac{4}{7}\int\frac{\sqrt{3}\sec^{2}(x)d\theta}{3\tan^{2}(x)+3}\\ &=\mathbf{\frac{2}{7}\ln|x+2|-\frac{1}{7}\ln|x^{2}+3|+\frac{4}{7\sqrt{3}}\arctan(\frac{x}{\sqrt{3}})}\end{align}
5. $\int\frac{dx}{(x+2)(x^{2}+2)}$

Decompose the fraction:

\begin{align}\frac{1}{(x+2)(x^{2}+2)}&=\frac{A}{x+2}+\frac{Bx+C}{x^{2}+2}\\ &=\frac{A(x^{2}+2)+(Bx+C)(x+2)}{(x+2)(x^{2}+2)}\\ &=\frac{Ax^{2}+2A+Bx^{2}+2Bx+Cx+2C}{(x+2)(x^{2}+2)}\end{align}

Equate the coefficients:

$\begin{array}{ccccccc} A & + & B & & & = & 0\\ & & 2B & + & C & = & 0\\ 2A & & & + & 2C & = & 1 \end{array}$

Solve the system of equations:

$D=\Biggr|\begin{array}{ccc} 1 & 1 & 0\\ 0 & 2 & 1\\ 2 & 0 & 2 \end{array}\Biggr|=6$
$A=\frac{\Biggr|\begin{array}{ccc} 0 & 1 & 0\\ 0 & 2 & 1\\ 1 & 0 & 2 \end{array}\Biggr|}{D}=\frac{1}{6}$
$B=\frac{\Biggr|\begin{array}{ccc} 1 & 0 & 0\\ 0 & 0 & 1\\ 2 & 1 & 2 \end{array}\Biggr|}{D}=-\frac{1}{6}$
$C=\frac{\Biggr|\begin{array}{ccc} 1 & 1 & 0\\ 0 & 2 & 0\\ 2 & 0 & 1 \end{array}\Biggr|}{D}=\frac{2}{6}=\frac{1}{3}$

Rewrite the integral and solve:

$\int\frac{dx}{(x+2)(x^{2}+2)}=\frac{1}{6}\int\frac{dx}{x+2}-\frac{1}{6}\int\frac{xdx}{x^{2}+2}+\frac{1}{3}\int\frac{dx}{x^{2}+2}$

Making the substitution

$u=x^{2}+2\qquad du=2xdx\qquad dx=\frac{du}{2x}$

in the second integral and

$\frac{x}{\sqrt{2}}=\tan(\theta)\qquad\frac{dx}{\sqrt{2}}=\sec^{2}(\theta)d\theta\qquad dx=\sqrt{2}\sec^{2}(\theta)d\theta$

in the third integral, we have

\begin{align}\int\frac{dx}{(x+2)(x^{2}+2)}&=\frac{1}{6}\ln|x+2|-\frac{1}{6}\int\frac{du}{2u}+\frac{1}{3}\int\frac{\sqrt{2}\sec^{2}(\theta)d\theta}{2(\tan^{2}(\theta)+1)}\\ &=\frac{1}{6}\ln|x+2|-\frac{1}{12}\ln|u|+\frac{\sqrt{2}}{6}\int\frac{\sec^{2}(\theta)d\theta}{\sec^{2}(\theta)}\\ &=\frac{1}{6}\ln|x+2|-\frac{1}{12}\ln|x^{2}+2|+\frac{\sqrt{2}}{6}\int d\theta\\ &=\frac{1}{6}\ln|x+2|-\frac{1}{12}\ln|x^{2}+2|+\frac{\sqrt{2}}{6}\theta+C\\ &=\mathbf{\frac{1}{6}\ln|x+2|-\frac{1}{12}\ln|x^{2}+2|+\frac{\sqrt{2}}{6}\arctan(\frac{x}{\sqrt{2}})+C}\end{align}
6. $\int\frac{dx}{(x^{2}+1)^{2}(x-1)}$

Decompose the fraction:

\begin{align}\frac{1}{(x^{2}+1)^{2}(x-1)}&=\frac{Ax+B}{x^{2}+1}+\frac{Cx+D}{(x^{2}+1)^{2}}+\frac{E}{x-1}\\ &=\frac{(Ax+B)(x^{2}+1)(x-1)+(Cx+D)(x-1)+E(x^{2}+1)^{2}}{(x^{2}+1)^{2}(x-1)}\\ &=\frac{(Ax+B)(x^{3}-x^{2}+x-1)+Cx^{2}+(D-C)x-D+E(x^{4}+2x^{2}+1)}{(x^{2}+1)^{2}(x-1)}\\ &=\frac{Ax^{4}+(B-A)x^{3}+(A-B)x^{2}+(B-A)x-B+Cx^{2}+(D-C)x-D+Ex^{4}+2Ex^{2}+E}{(x^{2}+1)^{2}(x-1)}\end{align}

Equate coefficients:

$\begin{array}{ccccccccccc} A & & & & & & & + & E & = & 0\\ -A & + & B & & & & & & & = & 0\\ A & - & B & + & C & & & + & 2E & = & 0\\ -A & + & B & - & C & + & D & & & = & 0\\ & - & B & & & - & D & + & E & = & 0 \end{array}$

Solve the system of equations any way you see fit. Here, we'll solve for $A$ by Cramer's rule, then plug in to solve for the other variables. The denominator in Cramer's rule will be

$d=\left|\begin{array}{ccccc} 1 & 0 & 0 & 0 & 1\\ -1 & 1 & 0 & 0 & 0\\ 1 & -1 & 1 & 0 & 2\\ -1 & 1 & -1 & 1 & 0\\ 0 & -1 & 0 & -1 & 1 \end{array}\right|$

Expanding across the top row gives

$d=\left|\begin{array}{cccc} 1 & 0 & 0 & 0\\ -1 & 1 & 0 & 2\\ 1 & -1 & 1 & 0\\ -1 & 0 & -1 & 1 \end{array}\right|+\left|\begin{array}{cccc} -1 & 1 & 0 & 0\\ 1 & -1 & 1 & 0\\ -1 & 1 & -1 & 1\\ 0 & -1 & 0 & -1 \end{array}\right|$

Expanding across the top rows in both matrices gives

$d=\left|\begin{array}{ccc} 1 & 0 & 2\\ -1 & 1 & 0\\ 0 & -1 & 1 \end{array}\right|-\left|\begin{array}{ccc} -1 & 1 & 0\\ 1 & -1 & 1\\ -1 & 0 & -1 \end{array}\right|-\left|\begin{array}{ccc} 1 & 1 & 0\\ -1 & -1 & 1\\ 0 & 0 & -1 \end{array}\right|$

Solve the individual determinants

$\left|\begin{array}{ccc} 1 & 0 & 2\\ -1 & 1 & 0\\ 0 & -1 & 1 \end{array}\right|=(1)(1)(1)+(0)(0)(1)+(2)(-1)(-1)-(0)(-1)(2)-(1)(0)(-1)-(2)(1)(0)=1+2=3$
$\left|\begin{array}{ccc} -1 & 1 & 0\\ 1 & -1 & 1\\ -1 & 0 & -1 \end{array}\right|=(-1)(-1)(-1)+(1)(1)(-1)+(0)(1)(0)-(1)(1)(-1)-(-1)(1)(0)-(0)(-1)(-1)=-1-1-(-1)=-1$
$\left|\begin{array}{ccc} 1 & 1 & 0\\ -1 & -1 & 1\\ 0 & 0 & -1 \end{array}\right|\begin{array}{cc} 1 & 1\\ -1 & -1\\ 0 & 0 \end{array}=(1)(-1)(-1)+(1)(1)(0)+(0)(-1)(0)-(1)(-1)(-1)-(1)(1)(0)-(0)(-1)(0)=1-1=0$

So

$d=3-(-1)-0=4$

Now use Cramer's rule to solve for $A$ :

$A=\frac{1}{4}\left|\begin{array}{ccccc} 0 & 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 0 & 0\\ 0 & -1 & 1 & 0 & 2\\ 0 & 1 & -1 & 1 & 0\\ 1 & -1 & 0 & -1 & 1 \end{array}\right|$

Expanding down the first column gives

$A=\frac{1}{4}\left|\begin{array}{cccc} 0 & 0 & 0 & 1\\ 1 & 0 & 0 & 0\\ -1 & 1 & 0 & 2\\ 1 & -1 & 1 & 0 \end{array}\right|$

Expanding across the first row gives

$A=-\frac{1}{4}\left|\begin{array}{ccc} 1 & 0 & 0\\ -1 & 1 & 0\\ 1 & -1 & 1 \end{array}\right|$

Expanding down the last column gives

$A=-\frac{1}{4}\left|\begin{array}{cc} 1 & 0\\ -1 & 1 \end{array}\right|=-\frac{1}{4}$

Now that we know $A$, we can solve for $E$ using the first equation

$-\frac{1}{4}+E=0\implies E=\frac{1}{4}$

We can solve for $B$ using the second equation and the value of $A$

$-(-\frac{1}{4})+B=0\implies B=-\frac{1}{4}$

We can solve for $C$ using the third equation and the values we've found so far

$-\frac{1}{4}-(-\frac{1}{4})+C+2\frac{1}{4}=0\implies C=-\frac{1}{2}$

We can solve for $D$ using the last equation and the values of $B$ and $E$

$-(-\frac{1}{4})-D+\frac{1}{4}=1\implies D=-\frac{1}{2}$

Finally, we can check our solution using the 4th equation and the values we've found

$-(-\frac{1}{4})+(-\frac{1}{4})-(-\frac{1}{2})+(-\frac{1}{2})=0\checkmark$

Rewrite the integral and solve

$\int\frac{dx}{(x^{2}+1)^{2}(x-1)}=-\frac{1}{4}\int\frac{xdx}{x^{2}+1}-\frac{1}{4}\int\frac{dx}{x^{2}+1}-\frac{1}{2}\int\frac{xdx}{(x^{2}+1)^{2}}-\frac{1}{2}\int\frac{dx}{(x^{2}+1)^{2}}+\frac{1}{4}\int\frac{dx}{x-1}$

Let's solve each integral separately. To solve the first, use the substitution

$u=x^{2}+1;\qquad du=2xdx;\qquad dx=\frac{du}{2x}$
$\int\frac{xdx}{x^{2}+1}=\int\frac{du}{2u}=\frac{1}{2}\ln|u|+C_{1}=\frac{1}{2}\ln|x^{2}+1|+C_{1}$

To solve the second integral, use the substitution

$x=\tan(\theta);\qquad dx=\sec^{2}(\theta)d\theta$
$\int\frac{dx}{x^{2}+1}=\int\frac{\sec^{2}(\theta)d\theta}{\tan^{2}(\theta)+1}=\int\frac{\sec^{2}(\theta)d\theta}{\sec^{2}(\theta)}=\int d\theta=\theta+C_{2}=\arctan(x)+C_{2}$

To solve the third integral, use the substitution

$u=x^{2}+1;\qquad du=2xdx;\qquad dx=\frac{du}{2x}$
$\int\frac{xdx}{(x^{2}+1)^{2}}=\int\frac{du}{2u^{2}}=-\frac{1}{2u}+C_{3}=-\frac{1}{2(x^{2}+1)}+C_{3}$

To solve the fourth integral, use the substitution

$x=\tan(\theta);\qquad dx=\sec^{2}(\theta)d\theta$
\begin{align}\int\frac{dx}{(x^{2}+1)^{2}}&=\int\frac{\sec^{2}(\theta)d\theta}{(\tan^{2}(\theta)+1)^{2}}\\ &=\int\frac{\sec^{2}(\theta)d\theta}{(\sec^{2}(\theta))^{2}}\\ &=\int\frac{d\theta}{\sec^{2}(\theta)}\\ &=\int\cos^{2}(\theta)d\theta\\ &=\int\frac{1+\cos(2\theta)}{2}d\theta\\ &=\int\frac{d\theta}{2}+\frac{1}{2}\int\cos(2\theta)d\theta\\ &=\frac{\theta}{2}+\frac{1}{4}\sin(2\theta)+C_{4}\\ &=\frac{\theta}{2}+\frac{1}{2}\cos(\theta)\sin(\theta)+C_{4}\\ &=\frac{1}{2}\arctan(x)+\frac{1}{2}\cos(\theta)\sin(\theta)+C_{4}\\ &=\frac{1}{2}\arctan(x)+\frac{1}{2}\frac{1}{\sqrt{1+x^{2}}}\frac{x}{\sqrt{1+x^{2}}}+C_{4}\\ &=\frac{1}{2}\arctan(x)+\frac{x}{2(1+x^{2})}+C_{4}\end{align}

To solve the last integral, use the substitution

$u=x-1;\qquad du=dx$
$\int\frac{dx}{x-1}=\int\frac{du}{u}=\ln|u|+C_{5}=\ln|x-1|+C_{5}$

Putting it all together, we have

\begin{align}\int\frac{dx}{(x^{2}+1)^{2}(x-1)}&=-\frac{1}{4}(\frac{1}{2}\ln|x^{2}+1|)-\frac{1}{4}\arctan(x)-\frac{1}{2}(-\frac{1}{2(x^{2}+1)})-\frac{1}{2}(\frac{1}{2}\arctan(x)+\frac{x}{2(1+x^{2})})+\frac{1}{4}\ln|x-1|+C\\ &=-\frac{1}{8}\ln|x^{2}+1|-\frac{1}{4}\arctan(x)+\frac{1}{4(x^{2}+1)}-\frac{1}{4}\arctan(x)-\frac{x}{4(1+x^{2})}+\frac{1}{4}\ln|x-1|+C\\ &=\mathbf{-\frac{1}{2}\arctan(x)+\frac{1-x}{4(x^{2}+1)}+\frac{1}{8}\ln\left(\frac{(x-1)^{2}}{x^{2}+1}\right)+C}\end{align}