bernoulli equations1 Question:
Solve the following bernoulli equations.
$$xy'+y=y^{-2}$$
I solving:
$$w=y^1+2$$ $$,$$
$$\frac{w'}{1+2}+1w=1$$
$$\frac{-w'}{3}=-1$$
$$\frac{1}{3}(\frac{-1}{3}w'-w)=-1$$
$$d(\frac{-1}{3}w)=-1$$
$$\frac{-1}{3}w=-1+C$$
$$= \left\{ 
  \begin{array}{l l}
    w=9 & \quad \\\
    w=y^3 & \quad \  \end{array} \right.$$
I think  I got the wrong solved.
Please help me.

First observe that if $x = 0$ then $y = 1$ is the solution.
Next, assume $x \neq 0$. The equation can be written as
$$y^2y' + \frac{y^3}{x} = \frac{1}{x}.$$
Put $w := y^3$ then $w' = 3y^2y'$ and the equation becomes linear:
$$\frac{w'}{3} + \frac{w}{x} = \frac{1}{x}.$$
This can be solved by separation of variables. Therefore the answer is
$$
y = \begin{cases}
1 & x = 0 \\
\sqrt[3]{1 + \frac{c}{x^3}} & x \neq 0
\end{cases}
$$
for some positive constant $c$.
