Partial Fraction 1A5Bc5
1. **State the problem:** Decompose the rational function $$\frac{x^2+x+1}{(x-1)(x+2)}$$ into partial fractions.
2. **Formula and rules:** For distinct linear factors in the denominator, the partial fraction decomposition takes the form:
$$\frac{P(x)}{(x-a)(x-b)} = \frac{A}{x-a} + \frac{B}{x-b}$$
where $A$ and $B$ are constants to be determined.
3. **Set up the equation:**
$$\frac{x^2+x+1}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2}$$
Multiply both sides by $(x-1)(x+2)$ to clear denominators:
$$x^2 + x + 1 = A(x+2) + B(x-1)$$
4. **Expand the right side:**
$$x^2 + x + 1 = A x + 2A + B x - B$$
Combine like terms:
$$x^2 + x + 1 = (A + B) x + (2A - B)$$
5. **Equate coefficients:**
- Coefficient of $x^2$: Left side has 1, right side has 0, so $1 = 0$ which is impossible.
This means the numerator degree is not less than denominator degree, so first perform polynomial division.
6. **Polynomial division:**
Divide $x^2 + x + 1$ by $(x-1)(x+2) = x^2 + x - 2$.
Since degrees are equal, divide:
$$\frac{x^2 + x + 1}{x^2 + x - 2} = 1 + \frac{3}{x^2 + x - 2}$$
7. **Now decompose the remainder:**
$$\frac{3}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2}$$
Multiply both sides by $(x-1)(x+2)$:
$$3 = A(x+2) + B(x-1)$$
8. **Expand and group:**
$$3 = A x + 2A + B x - B = (A + B) x + (2A - B)$$
9. **Equate coefficients:**
- Coefficient of $x$: $0 = A + B$
- Constant term: $3 = 2A - B$
10. **Solve the system:**
From $0 = A + B$, we get $B = -A$.
Substitute into $3 = 2A - B$:
$$3 = 2A - (-A) = 3A \implies A = 1$$
Then $B = -1$.
11. **Write the final decomposition:**
$$\frac{x^2 + x + 1}{(x-1)(x+2)} = 1 + \frac{1}{x-1} - \frac{1}{x+2}$$