Partial Fraction Integral
1. The problem is to evaluate the integral $$\int \frac{1}{x^2 (x+1)} \, dx.$$\n\n2. First, decompose the integrand into partial fractions. We want to express \( \frac{1}{x^2(x+1)} \) as \( \frac{A}{x} + \frac{B}{x^2} + \frac{C}{x+1} \).\n\n3. Multiply both sides by \( x^2(x+1) \) to get: \n$$1 = A x (x+1) + B (x+1) + C x^2.$$\n\n4. Expand the right side:\n$$1 = A x^2 + A x + B x + B + C x^2 = (A + C) x^2 + (A + B) x + B.$$\n\n5. Equate the coefficients from both sides: \n- For \(x^2\): \(A + C = 0\)\n- For \(x\): \(A + B = 0\)\n- For the constant term: \(B = 1\)\n\n6. From \(B=1\), substitue into \(A + B=0\) gives \(A + 1 = 0\) so \(A = -1\).\n\n7. From \(A + C = 0\), we have \(-1 + C = 0\) so \(C = 1\).\n\n8. So, the partial fractions are \( \frac{-1}{x} + \frac{1}{x^2} + \frac{1}{x+1} \).\n\n9. Now, integrate term by term:\n$$\int \frac{-1}{x} \, dx = - \ln |x| + C_1,$$\n$$\int \frac{1}{x^2} \, dx = \int x^{-2} \, dx = -x^{-1} + C_2 = -\frac{1}{x} + C_2,$$\n$$\int \frac{1}{x+1} \, dx = \ln |x+1| + C_3.$$\n\n10. Combine all results:\n$$\int \frac{1}{x^2 (x+1)} \, dx = - \ln |x| - \frac{1}{x} + \ln |x+1| + C,$$\nwhere \(C = C_1 + C_2 + C_3\) is the constant of integration.