Answer
(a) $\frac{1}{x-1}+\frac{1}{(x-1)^2}-\frac{1}{x+2}$
(b) $\frac{x+2}{x^2+3}-\frac{1}{x}$
Work Step by Step
(a) Step 1. Assume the results of decomposition as $\frac{A}{x+2}+\frac{B}{x-1}+\frac{C}{(x-1)^2}$.
Step 2. Combine the terms to get $\frac{A(x-1)^2+Bx(x-1)+Cx}{(x+2)(x-1)^2}=\frac{(A+B)x^2+(-2A+B+C)x+(A)}{(x+2)(x-1)^2}$.
Step 3. Compare the results with the original expression to set up the following system of equations:
$\begin{cases} A+B=0\\-2A+B+C=4\\A=-1\end{cases}$
Step 4. With $A=-1$, we have $B=-A=1$, and $C=4+2A-B=1$, thus the decomposition result is:
$\frac{-1}{x+2}+\frac{1}{x-1}+\frac{1}{(x-1)^2}$ or $\frac{1}{x-1}+\frac{1}{(x-1)^2}-\frac{1}{x+2}$
(b) Factor the denominator as $x(x^2+3)$
Step 1. Assume the results of decomposition as $\frac{A}{x}+\frac{Bx+C}{x^2+3}$.
Step 2. Combine the terms to get $\frac{A(x^2+3)+(Bx+C)(x)}{x(x^2+3)}=\frac{(A+B)x^2+(C)x+(3A)}{x(x^2+3)}$.
Step 3. Compare the results with the original expression to set up the following system of equations:
$\begin{cases} A+B=0\\C=2\\3A=-3\end{cases}$
Step 4. With $A=-1, C=2$, we have $B=-A=1$, thus the decomposition result is:
$\frac{-1}{x}+\frac{x+2}{x^2+3}$ or $\frac{x+2}{x^2+3}-\frac{1}{x}$