The quadratic equation $x^2+px+q=0$ has roots $-2$ and $6$. Find the value of $p$ and $q$.
Do I have to make two equations?
Something like this?
When $x=-2$, (real and distinct roots) $b^2-4ac>0$
$(-2)^2+p(-2)+q>0$
Making an equation: $q>-4+2p$ —————(1)
Then $x=6$….Should it be something like this or any different method?
Best Answer
Use Viete's formulas: the roots of $\;ax^2+bx+c=0\;,\;\;a\neq 0\;$ , are $\;\alpha\,,\,\beta\;$ iff
$$ax^2+bx+c=a(x-\alpha)(x-\beta)$$
and from here
$$\begin{align*}(1)&\;\;\alpha+\beta=-\frac ba\\(2)&\;\;\;\;\;\;\alpha\beta=\frac ca\end{align*}$$