## Thomas' Calculus 13th Edition

$$\frac{2}{3}\ln \left| {x - 1} \right| + \frac{1}{6}\ln \left( {{x^2} + x + 1} \right) - \sqrt 3 {\tan ^{ - 1}}\left( {\frac{{2x + 1}}{{\sqrt 3 }}} \right) + C$$
\eqalign{ & \int {\frac{{{x^2} - x + 2}}{{{x^3} - 1}}} dx \cr & {\text{Decompose the integrand }}\frac{{{x^2} - x + 2}}{{{x^3} - 1}}{\text{ into partial fractions}} \cr & \frac{{{x^2} - x + 2}}{{{x^3} - 1}} = \frac{{{x^2} - x + 2}}{{\left( {x - 1} \right)\left( {{x^2} + x + 1} \right)}} = \frac{A}{{x - 1}} + \frac{{Bx + C}}{{{x^2} + x + 1}} \cr & {\text{multiply by }}\left( {x - 1} \right)\left( {{x^2} + x + 1} \right){\text{ and simplify}} \cr & {x^2} - x + 2 = A\left( {{x^2} + x + 1} \right) + \left( {Bx + C} \right)\left( {x - 1} \right) \cr & {\text{Expanding the equation }} \cr & {x^2} - x + 2 = A{x^2} + Ax + A + B{x^2} - Bx + Cx - C \cr & \cr & {\text{Group terms}} \cr & {x^2} - x + 2 = \left( {A{x^2} + B{x^2}} \right) + \left( {Ax - Bx + Cx} \right) + A - C \cr & {\text{Equating coefficients}} \cr & \,\,\,\,\,\,\,\,A + B = 1 \cr & \,\,\,\,\,\,\,\,\,A - B + C = - 1 \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,A - C = 2 \cr & {\text{Solving the system of equations by using a calculator}}{\text{, we obtain}} \cr & A = \frac{2}{3},\,\,\,B = \frac{1}{3},\,\,\,C = - \frac{4}{3} \cr & \cr & \frac{{{x^2} - x + 2}}{{\left( {x - 1} \right)\left( {{x^2} + x + 1} \right)}} = \frac{{2/3}}{{x - 1}} + \frac{{\left( {1/3} \right)x - 4/3}}{{{x^2} + x + 1}} \cr & \cr & {\text{Therefore}}{\text{,}} \cr & \int {\frac{{{x^2} - x + 2}}{{{x^3} - 1}}} dx = \int {\left( {\frac{2}{{3\left( {x - 1} \right)}} + \frac{{x - 4}}{{3\left( {{x^2} + x + 1} \right)}}} \right)} dx \cr & = \int {\frac{2}{{3\left( {x - 1} \right)}}} ds + \frac{1}{3}\int {\frac{{x - 4}}{{{x^2} + x + 1}}dx} \cr & {\text{Complete the square for }}{x^2} + x + 1 \cr & = \int {\frac{2}{{3\left( {x - 1} \right)}}} ds + \frac{1}{3}\int {\frac{{x - 4}}{{{{\left( {x + \frac{1}{2}} \right)}^2} + \frac{3}{4}}}dx} \cr & \cr & {\text{integrating }}\int {\frac{{x - 4}}{{{{\left( {x + \frac{1}{2}} \right)}^2} + \frac{3}{4}}}dx} \,\, \cr & \,\,\,u = x + \frac{1}{2},\,\,\,du = dx \cr & \int {\frac{{x - 4}}{{{{\left( {x + \frac{1}{2}} \right)}^2} + \frac{3}{4}}}dx} \,\, = \int {\frac{{u - 9/2}}{{{u^2} + {{\left( {\sqrt 3 /2} \right)}^2}}}du} \cr & = \int {\frac{u}{{{u^2} + {{\left( {\sqrt 3 /2} \right)}^2}}}du} - \int {\frac{{9/2}}{{{u^2} + {{\left( {\sqrt 3 /2} \right)}^2}}}du} \cr & = \frac{1}{2}\ln \left( {{u^2} + 3/4} \right) - \frac{9}{2}\left( {\frac{2}{{\sqrt 3 }}} \right){\tan ^{ - 1}}\left( {\frac{{2u}}{{\sqrt 3 }}} \right) + C \cr & = \frac{1}{2}\ln \left( {{x^2} + x + 1} \right) - 3\sqrt 3 {\tan ^{ - 1}}\left( {\frac{{2x + 1}}{{\sqrt 3 }}} \right) + C \cr & \cr & {\text{Then}}{\text{,}} \cr & \int {\frac{2}{{3\left( {x - 1} \right)}}} ds + \frac{1}{3}\int {\frac{{x - 4}}{{{{\left( {x + \frac{1}{2}} \right)}^2} + \frac{3}{4}}}dx} \to \cr & \to \frac{2}{3}\ln \left| {x - 1} \right| + \frac{1}{6}\ln \left( {{x^2} + x + 1} \right) - \sqrt 3 {\tan ^{ - 1}}\left( {\frac{{2x + 1}}{{\sqrt 3 }}} \right) + C \cr}