Partial fractions decomposition of ${\frac{2x}{(x+2)^2}}$ Express in partial fraction form: $\displaystyle{\frac{2x}{(x+2)^2}}$
I think is $\displaystyle{\frac{2x}{(x+2)^{2}} = \frac{A}{x+2}+\frac{B}{(x+2)^2}}$
However when identifying $A$ and $B$, I'm not sure how to calculate A.
E.g.  $$2x = A\cdot (x+2) + B$$
Substitute $x=-2$    
$2\cdot(-2)$ = $A\cdot (2-2) +B$
$-4 = B$
In other questions there is always another factor to multiply by at this stage.

For instance, you can multiply both sides by $(x+2)^2$ in
$$\frac{2x}{(x+2)^2}=\frac{A}{x+2}+\frac{B}{(x+2)^2}$$
then
$$(x+2)^2\frac{2x}{(x+2)^2}=(x+2)^2\frac{A}{x+2}+(x+2)^2\frac{B}{(x+2)^2}$$
now simplify
$$(x+2)^2\frac{2x}{(x+2)^2}=(x+2)\cdot A+(x+2)^2\frac{B}{(x+2)^2}$$
and you can take the limit as $x\to 2$ both sides to show that:
$$ B = \underset{x\to -2}{\lim}{\ (x+2)^{2}\frac{2x}{(x+2)^2}}=-4. $$
for $A$ take before the limit the derivative w.r.t $x$ in both sides to get
$$ A = \underset{x\to -2}{\lim}{\ \frac{d}{dx}{2x}=2. }$$
Recall that, if $\ \displaystyle{f(x)=\frac{p(x)}{(x-r)^{k}}}$ and $(x-r)$ doesn't divide $p(x)$ you have:
$$f(x)=\frac{p(x)}{(x-r)^{k}}=\sum_{s=1}^{k}\frac{A_{s}}{(x-r)^{s}}$$
if you multiply by $(x-r)^{k}$ in both sides you will have:
$$ (x-r)^{k}f(x)=p(x)=\sum_{s=1}^{k}A_{s}\cdot(x-r)^{k-s}$$
and from that you have:
$$ A_{k}=\underset{x\to r}{\lim}{\ (x-r)^{k}f(x)} $$
and the others
$$A_{i}=\frac{1}{(k-i)!}\underset{x\to r}{\lim}{\ \frac{d^{k-i}}{dx^{k-i}}\left((x-r)^{k}f(x)\right)}$$
