How to expand $\left(1+px+qx^2\right)^{-2}$ The coefficients of $x$ and $x^2$ in the expansion of $\left(1+px+qx^2\right)^{-2}$ in ascending powers of $x$ are 4 and 14 respectively. Find the values of $p$ and $q$.
How should you go about solving this? 

In general
$$(1+y)^{-2} = \sum_{k=0}^{\infty} (-1)^k (k+1) \, y^k$$
so that
$$(1+p x+q x^2)^{-2} = 1 - 2 (p x+q x^2) + 3 (p x + q x^2)^2 - \cdots$$
Out to $O(x^2)$:
$$(1+p x+q x^2)^{-2} = 1 -2 p x + (3 p^2 - 2 q) x^2 + \cdots$$
$$-2 p = 4 \implies p=-2$$
$$3 p^2-2 q=14 \implies -2 q=2 \implies q = -1$$
You can also consider the derivatives of $(1+y)^{-2}$ at $y=0$:
$$\frac{d}{dy} (1+y)^{-2} = -2 (1+y)^{-3}$$
$$\frac12 \frac{d^2}{dy^2} (1+y)^{-2} = 3 (1+y)^{-4}$$
