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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f2c26e3b996c006ed4e734c7f1f36284d4ecfb4a)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/976e67f12d1121c6fd2d83dc8d934f99f10b2125)
Solve the system of equations any way you see fit. Here, we'll solve for
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6fea95bbba28119e0dea46ccaba34e8af06b2e7e)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c0df0a3e5b6462c9ea7b904dcddc83464a0fe77d)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c26819b88f94512d2d32793bb0eee8c43871a422)
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}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f41ad7c70ef0bc9b0122f3847d14688c723abc21)
![{\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}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9adc53aa2748879ed3b6d892a36ae785d478cf87)
![{\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}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c58097ce477079b2ebd06945d04ac697a3ad34a9)
So
![{\displaystyle d=3-(-1)-0=4}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dd8bec24b6918a41e03fbebab7afa59d9402e49b)
Now use Cramer's rule to solve for
:
![{\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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1ed5bff07ddd6086ae1c04f3634f05f55e0041af)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/23ddbdd18137473915897cd20e19b555d47f3ea2)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6e3ebfb422656900557f4ee2dbf26f630c308831)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/228a813947feab01cf91fb9b91cf8504985d0310)
Now that we know
, we can solve for
using the first equation
![{\displaystyle -{\frac {1}{4}}+E=0\implies E={\frac {1}{4}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0ecd7bac6e575f5f67b25a28ebfeb6b0e2a40382)
We can solve for
using the second equation and the value of
![{\displaystyle -(-{\frac {1}{4}})+B=0\implies B=-{\frac {1}{4}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bb1c8de7ca85fbe00ddd2956fb398ef63c76a61e)
We can solve for
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/54c462f1e4a2db7e1ef7e8b2344b6d1fb8bbd1be)
We can solve for
using the last equation and the values of
and
![{\displaystyle -(-{\frac {1}{4}})-D+{\frac {1}{4}}=1\implies D=-{\frac {1}{2}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3e057f4d040187331150b7508cedf2b14d5a3ec3)
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 }](https://wikimedia.org/api/rest_v1/media/math/render/svg/f980a11941bde4b53a985117ac97119f1470fa05)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/94d542c1e1d509e3526d337889c86d56cab4a709)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/df7984c240473a90141bc8a1467ff5bda6be9259)
![{\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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b2516dd4985f0b3512dcf51c51a4a73ca8c4e8e8)
To solve the second integral, use the substitution
![{\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }](https://wikimedia.org/api/rest_v1/media/math/render/svg/e9e2a78dc5cd5d311a18f4209e5054be0d995d1d)
![{\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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/47b9fcdfcb720c77d40c544bbb69264b462d96c9)
To solve the third integral, use the substitution
![{\displaystyle u=x^{2}+1;\qquad du=2xdx;\qquad dx={\frac {du}{2x}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/df7984c240473a90141bc8a1467ff5bda6be9259)
![{\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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/24921aeacb8a6ea9eb4a8a6036ceddcff3b7c9ce)
To solve the fourth integral, use the substitution
![{\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }](https://wikimedia.org/api/rest_v1/media/math/render/svg/e9e2a78dc5cd5d311a18f4209e5054be0d995d1d)
![{\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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e8b5fbffadbabf97c4793eabea7c3a9f98f5ece2)
To solve the last integral, use the substitution
![{\displaystyle u=x-1;\qquad du=dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d54626bf69a89e12fac63709447916e4a165744c)
![{\displaystyle \int {\frac {dx}{x-1}}=\int {\frac {du}{u}}=\ln |u|+C_{5}=\ln |x-1|+C_{5}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/475abf4df1a68d2fe0e801e0d65c188073e6f399)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8b1a8be7e53ffb5814dbb9ab5669954f1f9a2e83)
Decompose the fraction:
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/976e67f12d1121c6fd2d83dc8d934f99f10b2125)
Solve the system of equations any way you see fit. Here, we'll solve for
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6fea95bbba28119e0dea46ccaba34e8af06b2e7e)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c0df0a3e5b6462c9ea7b904dcddc83464a0fe77d)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c26819b88f94512d2d32793bb0eee8c43871a422)
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}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f41ad7c70ef0bc9b0122f3847d14688c723abc21)
![{\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}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9adc53aa2748879ed3b6d892a36ae785d478cf87)
![{\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}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c58097ce477079b2ebd06945d04ac697a3ad34a9)
So
![{\displaystyle d=3-(-1)-0=4}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dd8bec24b6918a41e03fbebab7afa59d9402e49b)
Now use Cramer's rule to solve for
:
![{\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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1ed5bff07ddd6086ae1c04f3634f05f55e0041af)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/23ddbdd18137473915897cd20e19b555d47f3ea2)
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|}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6e3ebfb422656900557f4ee2dbf26f630c308831)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/228a813947feab01cf91fb9b91cf8504985d0310)
Now that we know
, we can solve for
using the first equation
![{\displaystyle -{\frac {1}{4}}+E=0\implies E={\frac {1}{4}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0ecd7bac6e575f5f67b25a28ebfeb6b0e2a40382)
We can solve for
using the second equation and the value of
![{\displaystyle -(-{\frac {1}{4}})+B=0\implies B=-{\frac {1}{4}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/bb1c8de7ca85fbe00ddd2956fb398ef63c76a61e)
We can solve for
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/54c462f1e4a2db7e1ef7e8b2344b6d1fb8bbd1be)
We can solve for
using the last equation and the values of
and
![{\displaystyle -(-{\frac {1}{4}})-D+{\frac {1}{4}}=1\implies D=-{\frac {1}{2}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3e057f4d040187331150b7508cedf2b14d5a3ec3)
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 }](https://wikimedia.org/api/rest_v1/media/math/render/svg/f980a11941bde4b53a985117ac97119f1470fa05)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/94d542c1e1d509e3526d337889c86d56cab4a709)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/df7984c240473a90141bc8a1467ff5bda6be9259)
![{\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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b2516dd4985f0b3512dcf51c51a4a73ca8c4e8e8)
To solve the second integral, use the substitution
![{\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }](https://wikimedia.org/api/rest_v1/media/math/render/svg/e9e2a78dc5cd5d311a18f4209e5054be0d995d1d)
![{\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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/47b9fcdfcb720c77d40c544bbb69264b462d96c9)
To solve the third integral, use the substitution
![{\displaystyle u=x^{2}+1;\qquad du=2xdx;\qquad dx={\frac {du}{2x}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/df7984c240473a90141bc8a1467ff5bda6be9259)
![{\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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/24921aeacb8a6ea9eb4a8a6036ceddcff3b7c9ce)
To solve the fourth integral, use the substitution
![{\displaystyle x=\tan(\theta );\qquad dx=\sec ^{2}(\theta )d\theta }](https://wikimedia.org/api/rest_v1/media/math/render/svg/e9e2a78dc5cd5d311a18f4209e5054be0d995d1d)
![{\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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e8b5fbffadbabf97c4793eabea7c3a9f98f5ece2)
To solve the last integral, use the substitution
![{\displaystyle u=x-1;\qquad du=dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d54626bf69a89e12fac63709447916e4a165744c)
![{\displaystyle \int {\frac {dx}{x-1}}=\int {\frac {du}{u}}=\ln |u|+C_{5}=\ln |x-1|+C_{5}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/475abf4df1a68d2fe0e801e0d65c188073e6f399)
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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8b1a8be7e53ffb5814dbb9ab5669954f1f9a2e83)