Solving the equation $\frac{gy}{x} + \frac{2y^2}{x} = \frac{gy}{y^2} + \frac{2x}{y^2}$ for $x$ or $y$ One day, while making and doing math problems, I came across this equation:

$$\frac{gy}{x} + \frac{2y^2}{x} = \frac{gy}{y^2} + \frac{2x}{y^2}$$

After some simple steps, I found $g$, but I couldn't find $x$ or $y$.
Here's a picture, since I'm not good with MathJax.

 A: Multiply $$\frac{gy}{x} + \frac{2y^2}{x} = \frac{gy}{y^2} + \frac{2x}{y^2}$$ by $x y^2$ to obtain
$$g y^3 + 2 y^4 = g x y + 2 x^2.$$ 
By grouping the terms together this becomes $g y (y^2 - x) + 2 (y^4 - x^2) = 0$ and factoring the last term leads to
$$(y^2 - x)(2 y^2 + g y + 2 x) = 0.$$
Solving to $x$ yields two possible values:
$$x \in \left\{y^2, - \frac{y (2 y + g)}{2} \right\}.$$
A: Multiplying by $$x\ne 0$$ we get
$$gy+2y^2=\frac{gx}{y}+\frac{2x^2}{y^2}$$
Now you can multiply by $$y^2$$
We get
$$gy^3+2y^4=gxy+2x^2$$
A: I would rather approach on a very different way...I want to solve for y.
So,here we are given, 
$$\frac{gy}{x} + \frac{2y^2}{x} = \frac{gy}{y^2} + \frac{2x}{y^2}$$
Now,assume that $g$ is our variable and $x$ and $y$ are constant.then equalling the coefficients we can say that, 
$$\dfrac{y}{x}=\dfrac{y}{y^2} ~~and~~\dfrac{2y^2}{x}=\dfrac{2x}{y^2}$$ 
All of these come to an end,where 
$$y^2=x$$
Hence,$$y=\pm\sqrt{x}$$
If you want to solve for x, then you should follow leucippus solution.
