The root of the equation 2x+(p+1)x+q=0 are 1 and3, where p and q are constant. Find the values of p and q

To find the values of p and q, we can use the fact that the sum of the roots of a quadratic equation is equal to the negation of the coefficient of the linear term divided by the coefficient of the quadratic term.

In this equation, the coefficient of the linear term is (p+1) and the coefficient of the quadratic term is 2. The sum of the roots is 1 + 3 = 4.

So we have:

(p+1)/2 = -4

Simplifying this equation, we get:

p+1 = -8

Subtracting 1 from both sides, we find:

p = -9

Now we can substitute the value of p into the original equation to find the value of q:

2(1) + (-9+1)(1) + q = 0

2 - 8 + q = 0

-6 + q = 0

q = 6

Therefore, the values of p and q are -9 and 6, respectively.