Given $x^2 +px + q$ has roots -1 & 4, find the values for p & q. 
Given $x^2 +px + q$ has roots $-1$ & $4$, find the values for $p$ & $q$.

Attempt:
$$
x = \frac{-p\pm\sqrt{p^2-4q}}{2}\\(p + 2x)^2 = p^2 - 4q\\
p^2 + 4px + 4x^2 = p^2 -4q
\\
q = -x^2 - px
\\
q = -(-1)^2 -p(-1)
\\
q = -1 - p
\\
q = -(4)^2-p(4)
\\
q = -16 - 4p
\\
-1 - p = - 16 - 4p
\\
3p = -15
\\
p = -5
\\
q = -1 - (-5)
\\
q = 4
$$
According to the book the answer should be $-3$ & $-4$

The Vieta's formulas tells you that
$$p=-(r+s),\\q=rs$$ (where $r,s$ are the roots).
