Find the coefficient of partial expansion $\frac{2x+3}{(1-x)(1+0.5x+0.5x^2)}$ I want to decompose the equation:
$$\frac{2x+3}{(1-x)(1+0.5x+0.5x^2)}=\frac{A}{1-x}+\frac{B}{1+0.5x+0.5x^2}$$
I found $A$ by multiple both side with $1-x$ and plug $x=1$. However, it is so difficult to find $B$. Could you help me to find $B$
 A: \begin{equation*}
f(x)=\frac{x+\frac{3}{2}}{(x-1)(2+x+x^{2})}=\frac{A}{x-1}+\frac{Bx+C}{%
x^{2}+x+2}
\end{equation*}
cover-up method leads to
\begin{equation*}
A=\left. f(x)\left( x-1\right) \right\vert _{x=1}=\left. \frac{x+\frac{3}{2}%
}{(2+x+x^{2})}\right\vert _{x=1}=\frac{\frac{5}{2}}{4}=\frac{5}{8}.
\end{equation*}
generalized cover-up method leads to
\begin{equation*}
Bx+C=\left. f(x)\left( x^{2}+x+2\right) \right\vert _{x^{2}+x=-2}=\left. 
\frac{x+\frac{3}{2}}{(x-1)}\right\vert _{x^{2}+x=-2}
\end{equation*}
To find $B$ and $C$, multiply bottom and top of the fraction $\frac{x+\frac{3%
}{2}}{(x-1)}$ by $(x-s)$ for some appropriate $s$ such that the denominator
(bottom) will be as follows
\begin{equation*}
(x-1)(x-s)=x^{2}-(s+1)x+s=(x^{2}+x)+s
\end{equation*}
so we choose
\begin{equation*}
-(s+1)=+1,\ then\ s=-2
\end{equation*}
so
\begin{eqnarray*}
Bx+C &=&\left. f(x)\left( x^{2}+x+2\right) \right\vert _{x^{2}+x=-2}=\left. 
\frac{x+\frac{3}{2}}{(x-1)}\right\vert _{x^{2}+x=-2} \\
&=&\left. \frac{\left( x+\frac{3}{2}\right) (x+2)}{(x-1)(x+2)}\right\vert
_{x^{2}+x=-2} \\
&=&\left. \frac{x^{2}+2x+\frac{3}{2}x+3}{\left( x^{2}+x\right) -2}%
\right\vert _{x^{2}+x=-2} \\
&=&\left. \frac{(x^{2}+x)+\frac{5}{2}x+3}{\left( x^{2}+x\right) -2}%
\right\vert _{x^{2}+x=-2},\ replace\ (x^{2}+x)\ by\ -2 \\
&=&\left. \frac{-2+\frac{5}{2}x+3}{-2-2}\right\vert _{x^{2}+x=-2} \\
&=&\frac{\frac{5}{2}x+1}{-4} \\
&=&-\frac{5}{8}x-\frac{1}{4},\ then\ B=-\frac{5}{8},\ and\ C=-\frac{1}{4},
\end{eqnarray*}
therefore
\begin{equation*}
\frac{x+\frac{3}{2}}{(x-1)(2+x+x^{2})}=\frac{5/8}{x-1}+\frac{(-5/8)x+(-1/4)}{%
x^{2}+x+2}.\ \ \ \ \blacksquare 
\end{equation*}
EDIT: Actualy, when we replace $x^2+x$ by $-2$ we do not need to know what is the value of $x$ itself!
A: Starting from Mario G's suggestion in the comments...
$$\frac{x+\frac{3}{2}}{(1-x)(2+x+x^2)}=\frac{A}{x-1}+\frac{Bx+C}{x^2+x+2}$$
Multiply through by $(x-1)(2+x+x^2)$,
$$x+\frac{3}{2}=A(x^2+x+2)+(Bx+C)(x-1)$$
Collect powers of $x$ on the RHS.
$$x+\frac{3}{2}=(A+B)x^2+(A-B+C)x+(2A-C)$$
Now due to the linear independence of the powers of $x$, we can write three equations, matching the coefficients of each power.
$$\begin{align*}
0&=A+B \\
1&=A-B+C \\
\frac 32&=2A-C
\end{align*}$$
All that's left is to solve the above system. Adding all three equations gives:
$$\frac 52=4A \implies A= \frac 58 $$
Plug this result back into the first equation to get
$$B=-A = -\frac 58$$
And use the second equation to get
$$C=1+B-A = 1-\frac 54 = -\frac 14$$
