d/g is a real number if the roots of the equation x^2 + dx + g^2 = 0 have the same absolute value?

$d$ and $g$ are complex numbers and $g$ is not eqaul to $0$. Prove that if the roots of the equation $$x^2 + dx + g^2 = 0$$ have the same absolute value, then $d/g$ is a real number.

I tried to solve the problem by finding the roots and then transforming the results into the form of $d/g$. But it seems that I am going in the wrong direction.

Could somebody tell as to how the problem could be solved?

• math.stackexchange.com/questions/1091646/… – Bumblebee Mar 29 '15 at 19:50
• @randomgirl: $x_1 = 1$ and $x_2 = i$ is a valid example which the roots have the same absolute value but they are not of the form $a\pm bi$. Note that $d$ and $g^2$ are complex. – kennytm Mar 29 '15 at 20:08

(I assume we already knew $e^{i\phi}=\cos\phi+i\sin\phi$ here.)
Let the two roots be $x_1 = Re^{i\theta_1}$ and $x_2 = Re^{i\theta_2}$. Then we get:
Thus $g = \pm R e^{i(\theta_1 + \theta_2)/2}$. The sign will not affect whether $d/g$ is real so we just choose "−" here.