The root ratio of x ^ 2 + PX + q = 0 is 1:2, and the discriminant value is 1. Find the value of PQ and solve the equation

The root ratio of x ^ 2 + PX + q = 0 is 1:2, and the discriminant value is 1. Find the value of PQ and solve the equation

Let two be m and N respectively, and the ratio of roots is 1:2, then M = 2n
Discriminant = (P ^ 2-4q) / 2 = 1
p^2-4q-2=0
And M + n = - P, m * n = q, M = 2n
∴3n=-p,2n^2=q
So n ^ 2 = 2, q = 4