Find constants a and b such that \(\frac{x+7}{x^2-x-2}=\frac{a}{x-2}+\frac{b}{x+1}\) for all x such that x≠-1 and x≠2.
Notice that x-2 and x+1 are factors of x^2-x-2.
\(\frac{x+7}{x^2-x-2}=\frac{a}{x-2}+\frac{b}{x+1}\\ \frac{x+7}{x^2-x-2}=\frac{a(x+1)}{x^2-x-2}+\frac{b(x-2)}{x^2-x-2}\\ x-7=a(x+1)+b(x-2)\\ x-7=ax+a+bx-2b\\\)
ax+bx must add up to the x term on the left side, which is x. a-2b must subtract to the constant on the left side, -7. We then have a system of equations.
a+b=1
a-2b=-7
We find that a= -5/3 and b=8/3.