If the sum of $n$ terms of an $A.P.$ is $(pn+qn^2)$ where $p$ and $q$ are constants, then find the common difference $d$.
$\begin{array}{1 1}p \\ q\\ 2p \\2q\end{array}$