Integrate Rational Expression
1. State the problem: We need to find the indefinite integral $$\int \frac{x^3 - 2}{x^2 + 1} \, dx.$$\n\n2. Simplify the integrand: Perform polynomial division because the degree of numerator (3) is higher than denominator (2).\nDivide $x^3 - 2$ by $x^2 + 1$:\n$$x^3 - 2 = (x)(x^2 + 1) + (0x - 2) = x(x^2 + 1) + (-2).$$\nSo the integrand becomes:\n$$ \frac{x^3 - 2}{x^2 + 1} = x + \frac{-2}{x^2 + 1}.$$\n\n3. Split the integral:\n$$\int \frac{x^3 - 2}{x^2 + 1} \, dx = \int x \, dx - 2 \int \frac{1}{x^2 + 1} \, dx.$$\n\n4. Integrate each term separately:\n- First integral: $$\int x \, dx = \frac{x^2}{2} + C_1.$$\n- Second integral: $$\int \frac{1}{x^2 + 1} \, dx = \arctan(x) + C_2.$$\n\n5. Combine the results and include the constant of integration $C$:\n$$\int \frac{x^3 - 2}{x^2 + 1} \, dx = \frac{x^2}{2} - 2 \arctan(x) + C.$$