Long Division Integral
1. **State the problem:** We need to integrate $$\int \frac{x^3 + 1}{x^2 + 7x + 12} \, dx$$ by using polynomial long division.
2. **Perform long division:** Divide the polynomial numerator $$x^3 + 1$$ by the denominator $$x^2 + 7x + 12$$.
- Divide $$x^3$$ by $$x^2$$ to get $$x$$.
- Multiply $$x$$ by $$x^2 + 7x + 12$$ to get $$x^3 + 7x^2 + 12x$$.
- Subtract this from the numerator:
$$ (x^3 + 1) - (x^3 + 7x^2 + 12x) = -7x^2 - 12x + 1 $$.
3. **Continue dividing:** Divide $$-7x^2$$ by $$x^2$$ to get $$-7$$.
- Multiply $$-7$$ by $$x^2 + 7x + 12$$ to get $$-7x^2 - 49x - 84$$.
- Subtract from previous remainder:
$$ (-7x^2 - 12x + 1) - (-7x^2 - 49x - 84) = 37x + 85 $$.
4. So the quotient is $$x - 7$$ and the remainder is $$37x + 85$$. Rewrite the integrand:
$$\frac{x^3 + 1}{x^2 + 7x + 12} = x - 7 + \frac{37x + 85}{x^2 + 7x + 12}$$.
5. **Factor the denominator:** $$x^2 + 7x + 12 = (x + 3)(x + 4)$$.
6. **Decompose the fraction:**
Assume
$$\frac{37x + 85}{(x + 3)(x + 4)} = \frac{A}{x + 3} + \frac{B}{x + 4}$$.
Multiply both sides by $$ (x + 3)(x + 4) $$:
$$37x + 85 = A(x + 4) + B(x + 3) = (A + B)x + (4A + 3B)$$.
Equate coefficients:
- Coefficient of $$x$$: $$37 = A + B$$
- Constant term: $$85 = 4A + 3B$$
7. **Solve the system:**
From $$37 = A + B$$, we get $$B = 37 - A$$.
Substitute into the second equation:
$$85 = 4A + 3(37 - A) = 4A + 111 - 3A = A + 111$$.
So $$A = 85 - 111 = -26$$.
Then $$B = 37 - (-26) = 63$$.
8. **Rewrite the integral:**
$$\int \left(x - 7 + \frac{-26}{x + 3} + \frac{63}{x + 4}\right) dx$$
9. **Integrate term by term:**
- $$\int x \, dx = \frac{x^2}{2}$$
- $$\int -7 \, dx = -7x$$
- $$\int \frac{-26}{x + 3} \, dx = -26 \ln|x + 3|$$
- $$\int \frac{63}{x + 4} \, dx = 63 \ln|x + 4|$$
10. **Combine results:**
$$\frac{x^2}{2} - 7x - 26 \ln|x + 3| + 63 \ln|x + 4| + C$$
**Final answer:**
$$\int \frac{x^3 + 1}{x^2 + 7x + 12} \, dx = \frac{x^2}{2} - 7x - 26 \ln|x + 3| + 63 \ln|x + 4| + C$$