Thomas' Calculus 13th Edition

$$\frac{1}{4}\ln \left| z \right| - \frac{1}{{4z}} - \frac{1}{8}\ln \left( {{z^2} + 4} \right) - \frac{1}{8}{\tan ^{ - 1}}\left( {\frac{z}{2}} \right) + C$$
\eqalign{ & \int {\frac{{z + 1}}{{{z^2}\left( {{z^2} + 4} \right)}}} dz \cr & \cr & {\text{Decomposing the integrand into partial fractions}} \cr & \frac{{z + 1}}{{{z^2}\left( {{z^2} + 4} \right)}} = \frac{A}{z} + \frac{B}{{{z^2}}} + \frac{{Cz + D}}{{{z^2} + 4}} \cr & \,\,\,{\text{Multiply by }}{z^2}\left( {{z^2} + 4} \right) \cr & \,\,\,z + 1 = Az\left( {{z^2} + 4} \right) + B\left( {{z^2} + 4} \right) + \left( {Cz + D} \right){z^2} \cr & \,\,\,z + 1 = A{z^3} + 4Az + B{z^2} + 4B + C{z^3} + D{z^2} \cr & \,\,\,z + 1 = A{z^3} + C{z^3} + B{z^2} + D{z^2} + 4Az + 4B \cr & \,\,\,z + 1 = \left( {A{z^3} + C{z^3}} \right) + \left( {B{z^2} + D{z^2}} \right) + 4Az + 4B \cr & \,\,{\text{Equating coefficients }}A + C = 0,\,\,\,\,B + D = 0,\,\,\,4A = 1,\,\,\,4B = 1 \cr & \,\,{\text{Solving the system of equations, we obtain}} \cr & \,\,\,A = \frac{1}{4},\,\,B = \frac{1}{4},\,\,C = - \frac{1}{4},\,\,D = - \frac{1}{4} \cr & \,\,\,\,\frac{{z + 1}}{{{z^2}\left( {{z^2} + 4} \right)}} = \frac{A}{z} + \frac{B}{{{z^2}}} + \frac{{Cz + D}}{{{z^2} + 4}} = \frac{1}{{4z}} + \frac{1}{{4{z^2}}} - \frac{1}{4}\left( {\frac{{z + 1}}{{{z^2} + 4}}} \right) \cr & \cr & {\text{Then}}{\text{,}} \cr & \int {\frac{{z + 1}}{{{z^2}\left( {{z^2} + 4} \right)}}} dz = \int {\left( {\frac{1}{{4z}} + \frac{1}{{4{z^2}}} - \frac{1}{4}\left( {\frac{z}{{{z^2} + 4}}} \right) - \frac{1}{4}\left( {\frac{1}{{{z^2} + 4}}} \right)} \right)} dz \cr & {\text{Integrating}} \cr & = \frac{1}{4}\ln \left| z \right| - \frac{1}{{4z}} - \frac{1}{8}\ln \left( {{z^2} + 4} \right) - \frac{1}{4}\left( {\frac{1}{2}{{\tan }^{ - 1}}\left( {\frac{z}{2}} \right)} \right) + C \cr & = \frac{1}{4}\ln \left| z \right| - \frac{1}{{4z}} - \frac{1}{8}\ln \left( {{z^2} + 4} \right) - \frac{1}{8}{\tan ^{ - 1}}\left( {\frac{z}{2}} \right) + C \cr}