Integral Rational 20Bbec
1. **Problem:** Calculate the integral $$\int \frac{x^3 - 2x + 4}{x^2 - 1} \, dx.$$\n\n2. **Formula and rules:** When integrating rational functions where the degree of the numerator is greater than or equal to the degree of the denominator, first perform polynomial division. Then, if possible, use partial fraction decomposition for the remainder.\n\n3. **Step 1: Polynomial division**\nDivide $$x^3 - 2x + 4$$ by $$x^2 - 1$$:\n$$\frac{x^3 - 2x + 4}{x^2 - 1} = x + \frac{-x + 4}{x^2 - 1}.$$\n\n4. **Step 2: Factor denominator**\nNote that $$x^2 - 1 = (x - 1)(x + 1).$$\n\n5. **Step 3: Partial fraction decomposition**\nExpress $$\frac{-x + 4}{(x - 1)(x + 1)} = \frac{A}{x - 1} + \frac{B}{x + 1}.$$\nMultiply both sides by $$ (x - 1)(x + 1) $$:\n$$-x + 4 = A(x + 1) + B(x - 1).$$\n\n6. **Step 4: Solve for A and B**\nSet $$x = 1$$:\n$$-1 + 4 = A(2) + B(0) \Rightarrow 3 = 2A \Rightarrow A = \frac{3}{2}.$$\nSet $$x = -1$$:\n$$1 + 4 = A(0) + B(-2) \Rightarrow 5 = -2B \Rightarrow B = -\frac{5}{2}.$$\n\n7. **Step 5: Rewrite integral**\n$$\int \frac{x^3 - 2x + 4}{x^2 - 1} \, dx = \int x \, dx + \int \frac{3/2}{x - 1} \, dx + \int \frac{-5/2}{x + 1} \, dx.$$\n\n8. **Step 6: Integrate each term**\n$$\int x \, dx = \frac{x^2}{2} + C_1,$$\n$$\int \frac{3/2}{x - 1} \, dx = \frac{3}{2} \ln|x - 1| + C_2,$$\n$$\int \frac{-5/2}{x + 1} \, dx = -\frac{5}{2} \ln|x + 1| + C_3.$$\n\n9. **Step 7: Combine results**\n$$\int \frac{x^3 - 2x + 4}{x^2 - 1} \, dx = \frac{x^2}{2} + \frac{3}{2} \ln|x - 1| - \frac{5}{2} \ln|x + 1| + C,$$\nwhere $$C = C_1 + C_2 + C_3$$ is the constant of integration.\n\n**Final answer:**\n$$\boxed{\int \frac{x^3 - 2x + 4}{x^2 - 1} \, dx = \frac{x^2}{2} + \frac{3}{2} \ln|x - 1| - \frac{5}{2} \ln|x + 1| + C}.$$