I have a problem that involves finding $e$ such that $\left( g-e \right)^2=g$. Maxima tells me that $e=g \pm \sqrt{g}$, but I can't work on that equation to get this result. Actually, I can't go past $2ge - e^2 = g^2 - g$. Can someone show me the algebraic steps to get that result?