How does $\frac{-1}{x^2}+2x=0$ become $2x^3-1=0$? Below is part of a solution to a critical points question. I'm just not sure how the equation on the left becomes the equation on the right. Could someone please show me the steps in-between? Thanks.

$$\frac{-1}{x^2}+2x=0 \implies 2x^3-1=0$$


For $x\neq 0$, we have $0= - \frac{1}{x^2} + 2x =- \frac{1}{x^2} + \frac{x^2}{x^2} \times 2x = - \frac{1}{x^2} + \frac{2x^3}{x^2} = \frac{2x^3 -1}{x^2}$.
So we have $\frac{2x^3 -1}{x^2} = 0$ which will give us $2x^3 -1 = 0.$
And we are done.
