Partial fraction (doubt) I have this partial fraction
$$\displaystyle\frac{1}{(2+x)^2(4+x)^2}$$
I tried to resolve using this method:
$$\displaystyle\frac{A}{2+x}+\displaystyle\frac{B}{(2+x)^2}+\displaystyle\frac{C}{4+x}+\displaystyle\frac{D}{(4+x)^2}$$
$$1=A(2+x)(4+x)^2+B(4+x)^2+C(4+x)(2+x)^2+D(2+x)^2$$
When x=-2
$$1=B(4-2)^2$$
$$B=\displaystyle\frac{1}{4}$$
When x=-4
$$1=D(2-4)^2$$ 
$$D=\displaystyle\frac{1}{4}$$ 
When x=0
$$1=A(2)(16)+B(16)+C(4)(4)+D(4)$$
$$1=A(32)+B(16)+C(16)+D(4)$$
Replacing the values for B y D
$$1=A(32)+4+C(16)+1$$
$$1-4-1=A(32)+c(16)$$
$$-4=A(32)+C(16)$$
How I can get the values ​​of $A$ and $D$?
 A: If you clear fractions you get $$A(2+x)(4+x)^2+B(4+x)^2+C(4+x)(2+x)^2+D(2+x)^2=1$$
The easy ones are $x=-2$ which gives $B=\frac 14$ and $x=-4$ which gives $D=\frac 14$
Now equate the coefficients of $x^3$ on each side to give $$A+C=0$$ and set $x=0$ (or equivalently equate constant coefficients), to give $$32A+16B+16C+4D=1$$ which becomes $$16A+4+0+1=1$$
Where the $0$ comes from $16(A+C)=0$
I think it is the equating coefficients of $x^3$ - or using a value like $x=1$ which you've missed - you need four data points to identify the four unknown values.
A: Heaviside cover-up is an alternative technique worth exploring.
It directly gives $\begin{align}B = \frac{1}{(4+x)^2}\Bigg|_{x=-2} =  \frac{1}{4} \text{ and } D = \frac{1}{(2+x)^2}\Bigg|_{x=-4} =  \frac{1}{4}\end{align}\tag{1}$
Next, it requires that the $B$ and $D$ terms be moved to the other side.
The partial fraction identity then becomes 
$\begin{eqnarray}\frac{A}{2+x} + \frac{C}{4+x} &= &\frac{1}{(2+x)^2(4+x)^2} - \frac{1/4}{(2+x)^2} - \frac{1/4}{(4+x)^2}\\&=&\frac{4-(4+x)^2-(2+x)^2}{4(2+x)^2(4+x)^2}\\&=&\frac{-2(8 + 6x + x^2)}{4(2+x)^2(4+x)^2}\\&=&\frac{-1/2}{(2+x)(4+x)}\end{eqnarray}$
which gives $\begin{align}A = \frac{-1/2}{(4+x)}\Bigg|_{x=-2} =  -\frac{1}{4} \text{ and } C = \frac{-1/2}{(2+x)}\Bigg|_{x=-4} =  \frac{1}{4}\end{align}\tag{2}$
Remark: Note how this technique eliminates the need to solve a system of linear equations for finding out the partial fraction decomposition coefficients (which can often be tedious).
See here for some more examples.
A: take LCM of second expression 
you get and sum it
{A(2+x)(4+x)^2 +B(4+x)^2+C(2+x)^2(4+x)+D(2+x)^2}/{(x+2)^2(x+4)^2}= your 1st expression 
so you have {A(2+x)(4+x)^2 +B(4+x)^2+C(2+x)^2(4+x)+D(2+x)^2}=1 
compare coefficients of x^3 ,x^2,x^1 and x^0 which on right side of  aboveequation are equal to 0,0,0 and 1 respectively.
you have 
A+C=0
8A+B+4C+D=0
32A+8B + 20C+ 4D=0
32A + 16B + 16C +4D=1
soLVING YOU GET 
B=1/12, D=7/12 ,A =-1/6, C=1/6
A: Try another value of $x$ as well, say $x=2$, giving $1 = 144A + 9 + 64C + 4$, or $144A + 96C = -12$. Combined with the equation you already have, $32A+16C=-4$, solving gives $A=-\frac{1}{4}$, $C=\frac{1}{4}$.
A: Assign different values to $x$, like $-1, 0, +1, +2$ and solve the linear system of 4 equations in 4 unknowns.
$$\left[\begin{array}{cccc}
1/1& 1/1& 1/3& 1/9\\
1/2& 1/4& 1/4& 1/16\\
1/3& 1/9& 1/5& 1/25\\
1/4& 1/16& 1/6& 1/36
\end{array}\right]
\left[\begin{array}{c}
A\\
B\\
C\\
D\end{array}\right]=
\left[\begin{array}{c}
1/9\\
1/64\\
1/225\\
1/576\end{array}\right]$$
$$\left[\begin{array}{c}
A\\
B\\
C\\
D\end{array}\right]=
\left[\begin{array}{c}
-1/4\\
1/4\\
1/4\\
1/4\end{array}\right]$$
