$$\frac{2x^2}{(x+1)^2(x^2+4x+5)}$$
$$2x^2=A(x+1)(x^2+4x+5)+B(x^2+4x+5)+(Cx+D)(x+1)^2$$
We can get $B=1$ if we put $-1$ for $x$. But I don't know how can we solve for $A$, $C$ and $D$ since we can't make this $(x^2+4x+5)=0$? Help?
$$\frac{2x^2}{(x+1)^2(x^2+4x+5)}$$
$$2x^2=A(x+1)(x^2+4x+5)+B(x^2+4x+5)+(Cx+D)(x+1)^2$$
We can get $B=1$ if we put $-1$ for $x$. But I don't know how can we solve for $A$, $C$ and $D$ since we can't make this $(x^2+4x+5)=0$? Help?
On
$\frac{2x^2}{(x+1)^2(x^2+4x+5)}=\frac A{x+1}+\frac B{(x+1)^2}+ \frac{Cx+D}{x^2+4x+5}$
$2x^2 = A(x+1)(x^2+4x+5)+B(x^2+4x+5)+(Cx+D)(x+1)^2$
$ 2x^2 = A(x^3+5x^2+9x+5) + B(x^2+4x+5)+(Cx+D)(x^2+1+2x)$
$2x^2 = x^3(A+C) +x^2(5A+B+2C+D)+x(9A+4B++C+2D)+(5A+5B+D)$
comparing the coefficients of $x^3,x^2x,$ and constants gives;
$A+C=0\\5A+B+2C+D=2\\9A+4B+C+2D=0\\5A+5B+D=0$
solving the given equations givens, $A =-3, B=1,C=3,D=10$
On
First, multiply out the polynomials, getting a list of polynomials for each unknown. For instance, for A it will be $(x+1)(x^2+4x+5) = x^3+5x^2+9x+5$.
Next, you can eliminate the x's (just make sure that if any power of x has a coefficient of zero, you include the zero).
This will be:
A: 1 5 9 5
B: 0 1 4 5
C: 0 1 1 0
D: 0 0 1 1
You can then create a matrix with these lists as columns:
M = $\begin{bmatrix}1& 0 &0 &0\\ 5& 1 &1& 0\\9& 4& 1& 1\\ 5 &5& 0 &1\end{bmatrix}$
You can then put the unknowns A,B,C, and D as a vector, and M times that vector should be equal to the needed value of $2x^2$, i.e.
$\begin{bmatrix}1& 0 &0 &0\\ 5& 1 &1& 0\\9& 4& 1& 1\\ 5 &5& 0 &1\end{bmatrix}$ $\begin{bmatrix}A\\B\\C\\D\end{bmatrix}$ = $\begin{bmatrix}0\\ 1\\0\\ 0\end{bmatrix}$
You can either row reduce by hand, or (if allowed), you can find an online matrix calculator.
$$2x^2=A(x+1)(x^2+4x+5)+B(x^2+4x+5)+Cx(x+1)^2+D(x+1)^2$$ As you noted, plug $x=-1$ to find that $B=1$.
Now, plug $x=0$ to get $0=5A+5B+D\implies D=-5A-5$.
Plug $x=1$ to get $2=20A+10B+4C+4D\implies C=3$.
Plug $x=2$ to get $8=51A+17B+18C+9D\implies A=-3\implies D=10$.
Another way is to open the parenthesis and get $$2x^2=(A+C)x^3+(5A+B+2C+D)x^2+(9A+4B+C+2D)x+5A+5B+D$$ i.e \begin{align*}A+C&=0\\5A+B+2C+D&=2\\9A+4B+C+2D&=0\\5A+5B+D&=0\end{align*}Solving the system will give you the parameters.