# Calculus/Integration techniques/Partial Fraction Decomposition/Solutions

Evaluate the following by the method partial fraction decomposition.

1. ${\displaystyle \int {\frac {2x+11}{(x+6)(x+5)}}dx}$
Decompose the fraction:
${\displaystyle {\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:

${\displaystyle A+B=2}$
${\displaystyle 5A+6B=11}$

Solve the system of equations:

${\displaystyle A=1,B=1}$

Rewrite the integral and solve:

{\displaystyle {\begin{aligned}\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{aligned}}}
Decompose the fraction:
${\displaystyle {\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:

${\displaystyle A+B=2}$
${\displaystyle 5A+6B=11}$

Solve the system of equations:

${\displaystyle A=1,B=1}$

Rewrite the integral and solve:

{\displaystyle {\begin{aligned}\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{aligned}}}
2. ${\displaystyle \int {\frac {7x^{2}-5x+6}{(x-1)(x-3)(x-7)}}dx}$
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate coefficients:

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

Solve the system of equations:

${\displaystyle D={\Biggr |}{\begin{array}{ccc}1&1&1\\-10&-8&-4\\21&7&3\end{array}}{\Biggr |}=-24-84-70-(-30-28-168)=48}$
${\displaystyle 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}}}$
${\displaystyle 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}}}$
${\displaystyle 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:

{\displaystyle {\begin{aligned}\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{aligned}}}
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate coefficients:

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

Solve the system of equations:

${\displaystyle D={\Biggr |}{\begin{array}{ccc}1&1&1\\-10&-8&-4\\21&7&3\end{array}}{\Biggr |}=-24-84-70-(-30-28-168)=48}$
${\displaystyle 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}}}$
${\displaystyle 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}}}$
${\displaystyle 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:

{\displaystyle {\begin{aligned}\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{aligned}}}
3. ${\displaystyle \int {\frac {x^{2}-x+2}{x(x+2)^{2}}}dx}$
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate the coefficients:

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

Solve the system of equations:

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

Rewrite the integral and solve:

{\displaystyle {\begin{aligned}\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{aligned}}}
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate the coefficients:

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

Solve the system of equations:

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

Rewrite the integral and solve:

{\displaystyle {\begin{aligned}\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{aligned}}}
4. ${\displaystyle \int {\frac {2}{(x+2)(x^{2}+3)}}dx}$
:${\displaystyle {\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 ${\displaystyle x^{2}}$:

${\displaystyle A+B=0}$

, for ${\displaystyle x}$:

${\displaystyle C+2B=0}$

, and for the constant terms:

${\displaystyle 3A+2C=2}$

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

${\displaystyle \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]}$
${\displaystyle C={\frac {4}{7}},\,B=-{\frac {2}{7}},\,A={\frac {2}{7}}}$

So

${\displaystyle \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 ${\displaystyle u=x+2}$, ${\displaystyle du=dx}$.
To evaluate the second integral use substitution, letting ${\displaystyle u=x^{2}+3}$, ${\displaystyle du=2xdx}$, ${\displaystyle dx={\frac {du}{2x}}}$.
To evaluate the third integral, use the trigonometric substitution ${\displaystyle x={\sqrt {3}}\tan(\theta )}$, ${\displaystyle dx={\sqrt {3}}\sec ^{2}(\theta )d\theta }$.

{\displaystyle {\begin{aligned}\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{aligned}}}
:${\displaystyle {\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 ${\displaystyle x^{2}}$:

${\displaystyle A+B=0}$

, for ${\displaystyle x}$:

${\displaystyle C+2B=0}$

, and for the constant terms:

${\displaystyle 3A+2C=2}$

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

${\displaystyle \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]}$
${\displaystyle C={\frac {4}{7}},\,B=-{\frac {2}{7}},\,A={\frac {2}{7}}}$

So

${\displaystyle \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 ${\displaystyle u=x+2}$, ${\displaystyle du=dx}$.
To evaluate the second integral use substitution, letting ${\displaystyle u=x^{2}+3}$, ${\displaystyle du=2xdx}$, ${\displaystyle dx={\frac {du}{2x}}}$.
To evaluate the third integral, use the trigonometric substitution ${\displaystyle x={\sqrt {3}}\tan(\theta )}$, ${\displaystyle dx={\sqrt {3}}\sec ^{2}(\theta )d\theta }$.

{\displaystyle {\begin{aligned}\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{aligned}}}
5. ${\displaystyle \int {\frac {dx}{(x+2)(x^{2}+2)}}}$
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate the coefficients:

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

Solve the system of equations:

${\displaystyle D={\Biggr |}{\begin{array}{ccc}1&1&0\\0&2&1\\2&0&2\end{array}}{\Biggr |}=6}$
${\displaystyle A={\frac {{\Biggr |}{\begin{array}{ccc}0&1&0\\0&2&1\\1&0&2\end{array}}{\Biggr |}}{D}}={\frac {1}{6}}}$
${\displaystyle B={\frac {{\Biggr |}{\begin{array}{ccc}1&0&0\\0&0&1\\2&1&2\end{array}}{\Biggr |}}{D}}=-{\frac {1}{6}}}$
${\displaystyle 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:

${\displaystyle \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

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

in the second integral and

${\displaystyle {\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

{\displaystyle {\begin{aligned}\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{aligned}}}
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate the coefficients:

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

Solve the system of equations:

${\displaystyle D={\Biggr |}{\begin{array}{ccc}1&1&0\\0&2&1\\2&0&2\end{array}}{\Biggr |}=6}$
${\displaystyle A={\frac {{\Biggr |}{\begin{array}{ccc}0&1&0\\0&2&1\\1&0&2\end{array}}{\Biggr |}}{D}}={\frac {1}{6}}}$
${\displaystyle B={\frac {{\Biggr |}{\begin{array}{ccc}1&0&0\\0&0&1\\2&1&2\end{array}}{\Biggr |}}{D}}=-{\frac {1}{6}}}$
${\displaystyle 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:

${\displaystyle \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

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

in the second integral and

${\displaystyle {\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

{\displaystyle {\begin{aligned}\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{aligned}}}
6. ${\displaystyle \int {\frac {dx}{(x^{2}+1)^{2}(x-1)}}}$
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate coefficients:

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

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

${\displaystyle 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

${\displaystyle 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

${\displaystyle 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

${\displaystyle \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}$
${\displaystyle \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}$
${\displaystyle \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

${\displaystyle d=3-(-1)-0=4}$

Now use Cramer's rule to solve for ${\displaystyle A}$ :

${\displaystyle 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

${\displaystyle 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

${\displaystyle 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

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

Now that we know ${\displaystyle A}$, we can solve for ${\displaystyle E}$ using the first equation

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

We can solve for ${\displaystyle B}$ using the second equation and the value of ${\displaystyle A}$

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

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

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

We can solve for ${\displaystyle D}$ using the last equation and the values of ${\displaystyle B}$ and ${\displaystyle E}$

${\displaystyle -(-{\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

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

Rewrite the integral and solve

${\displaystyle \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

${\displaystyle u=x^{2}+1;\qquad du=2xdx;\qquad dx={\frac {du}{2x}}}$
${\displaystyle \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

${\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }$
${\displaystyle \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

${\displaystyle u=x^{2}+1;\qquad du=2xdx;\qquad dx={\frac {du}{2x}}}$
${\displaystyle \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

${\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }$
{\displaystyle {\begin{aligned}\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{aligned}}}

To solve the last integral, use the substitution

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

Putting it all together, we have

{\displaystyle {\begin{aligned}\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{aligned}}}
Decompose the fraction:
{\displaystyle {\begin{aligned}{\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{aligned}}}

Equate coefficients:

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

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

${\displaystyle 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

${\displaystyle 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

${\displaystyle 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

${\displaystyle \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}$
${\displaystyle \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}$
${\displaystyle \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

${\displaystyle d=3-(-1)-0=4}$

Now use Cramer's rule to solve for ${\displaystyle A}$ :

${\displaystyle 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

${\displaystyle 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

${\displaystyle 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

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

Now that we know ${\displaystyle A}$, we can solve for ${\displaystyle E}$ using the first equation

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

We can solve for ${\displaystyle B}$ using the second equation and the value of ${\displaystyle A}$

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

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

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

We can solve for ${\displaystyle D}$ using the last equation and the values of ${\displaystyle B}$ and ${\displaystyle E}$

${\displaystyle -(-{\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

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

Rewrite the integral and solve

${\displaystyle \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

${\displaystyle u=x^{2}+1;\qquad du=2xdx;\qquad dx={\frac {du}{2x}}}$
${\displaystyle \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

${\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }$
${\displaystyle \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

${\displaystyle u=x^{2}+1;\qquad du=2xdx;\qquad dx={\frac {du}{2x}}}$
${\displaystyle \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

${\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }$
{\displaystyle {\begin{aligned}\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{aligned}}}

To solve the last integral, use the substitution

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

Putting it all together, we have

{\displaystyle {\begin{aligned}\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{aligned}}}