How to solve $xy'-y=0$ when $x<0$?
It seem to be a simple equation, but it is confusing when $x<0$ $$\frac{y'}{y}=\frac{1}{x}$$ Now to integrate the both sides must I assume that $y$ is positive then
$$\ln y =- \ln(-x)+c$$so $$y(x)=e^{-\ln(-x)}$$ Am I right? what if the assumption on $y$ is false?
This equation has a solution over all $\mathbb{R}$? Thanks in advence
$$\frac{y'}{y}=\frac1x$$ integrates as
$$\log |y|=\log |x|+c$$
then
$$y=\pm Cx.$$
As $C$ could have any sign, the $\pm$ is superfluous and
$$y=Cx.$$
But
as there is a singularity at $x=0$, you cannot cross this point and you must consider two independent pieces:
$$y(x):=\begin{cases}x\le0\to C_-x,\\x\ge0\to C_+x.\end{cases}$$ where the constants need not be equal.
At $x=0$, the equation reduces to $y=0$ and this is compatible with the above solution.
But if you insist that $y'$ exists at $x=0$, the constants must be equal.