Why the function $y=\frac{1}{x}$ with $x\neq 0$ is NOT a solution of the differential equation $y' + y^2 =0$
I did it, but for me it should be the solution.
$\frac{dy}{dx} = -x^{-2}$
$y' + y^2= -x^{-2} + \frac{1}{x^2} = 0$
So where is the error and why is $y(x)=\frac{1}{x}$ not a solution.
$$ y= \frac {1}{x}$$ is just one particular solution not the general solution.
The general solution is $$y=\frac {1}{x-c}$$ where c is an arbitrary constant.
If an initial value is given then you can find the constant c.
For example if $y(0)=3$, then $$ c= \frac {-1}{3}$$ which results in $$ y=\frac {3}{x+1} $$