If -1 and 3 are the roots of x2+px+q=0, find the values of p and q.
Since -1 is a root,
(−1)2+p(−1)+q=0⇒−p+q=−1...(1)
Since 3 is a root,
32+3p+q=0⇒3p+q=−9...(2)
Subtracting equation (2) from equation (1), −4p=8⇒p=−2
Substituting this in equation (1), 2+q=−1⇒q=−3