Express q as a function of p, given that one root of x^2 + px + q = 0 is twice the other.
First find the roots:
x = [-p (+/-) sqrt{p^2 - 4q}]/2
So we know that x(+) = 2*x(-) (since x(+) must be the larger of the two).
So:
[-p + sqrt{p^2 - 4q}]/2 = 2*[-p - sqrt{p^2 - 4q}]/2
-p + sqrt{p^2 - 4q} = 2*[-p - sqrt{p^2 - 4q}]
-p + sqrt{p^2 - 4q} = -2*p - 2*sqrt{p^2 - 4q}
3*sqrt{p^2 - 4q} = -p <-- Square both sides.
9*(p^2 - 4q) = p^2
8p^2 - 36q = 0
2p^2 - 9q = 0
q = (2/9)p^2
I'll leave it to you to check that this answer is correct. (Squaring both sides of an equation occasionally introduces "solutions" that aren't correct, so you always need to check you answer.)
-Dan