These two expressions are to be equivalent for all values of
\(x\text{,}\) we need to solve for
\(A\) and
\(B\text{.}\) To do this, set the expressions equal to one another and do some manipulations.
\begin{align*}
\frac{A}{x-1} + \frac{B}{x+2} = \amp\ \frac{4}{(x-1)(x+2)}\\
\updownarrow \amp (\text{combine fractions on left})\\
\frac{A(x+2) + B(x-1)}{(x-1)(x+2)} = \amp\ \frac{4}{(x-1)(x+2)}\\
\updownarrow \amp (\text{simplify the expression on the left})\\
\frac{(A+B)x + 2A -B}{(x-1)(x+2)} = \amp\ \frac{4}{(x-1)(x+2)}.
\end{align*}
Now we set the numerators equal:
\begin{equation*}
(A+B)x + 2A-B = 4.
\end{equation*}
Note that like terms are grouped on both sides. Since there are zero
\(x\)’s on the right, we must have
\(A+B = 0\text{.}\) Since
\(A\) and
\(B\) are numbers, we must have
\(2A-B = 4\text{.}\) Thus we have a system of equations
\begin{align*}
A+B = \amp\ 0\\
2A-B = \amp\ 4.
\end{align*}
Using the first equation we have
\(B = -A\text{.}\) Substituting into the second equation we see
\(3A = 4\text{.}\) Hence,
\(A = \frac{4}{3}\) and
\(B=-\frac{4}{3}\text{.}\)