<s>[INST] How to get rid of the absolute value function when solving an ODE? Problem: $y'+yx=0, \quad y(0)=-1$
We separate it:
$\frac{dy}{dx}=-yx \Rightarrow \int\frac{-1}{y}dy=\int x dx = \frac{1}{2}x^2 + C_1$
With $\int\frac{-1}{y}dy=\log(\frac{1}{|y|})+C_2$
we get 
$\log(\frac{1}{|y|})=\frac{1}{2}x^2 + C$
We solve for $y$:
$|y|=e^{-\frac{1}{2}x^2}\cdot e^C=e^{-\frac{1}{2}x^2}\cdot \hat{C}$
Now, what is the best argumentation to get "rid" of $|\cdot |$?
Like I know that e.g. $|a|=b \Leftrightarrow a=\pm b$ but then I still have $\pm$. I "know" that some wil ltell me that I can "put it into $C$" but that not really an arugmentation. Maybe I just don't get how $C$ can determine if we have the positive or negative solution or why we can't have both at the same time.  It just feels like I lack proper understanding to properly argument here.
 [/INST] 
$y'+yx=0$

$$
\frac{dy}{y} = -xdx \Rightarrow  \int \frac{dy}{y} = \int -xdx  \Rightarrow \ln |y| = -\frac{1}{2}x^2  + C_1.
$$

*

*$y > 0$. we have $\ln y = -\frac{1}{2}x^2  + C_1$, so $y = C_1e^{-\frac{1}{2}x^2}$.

*$y < 0$. we have $\ln -y = -\frac{1}{2}x^2  + C_1$, so $y = C_2e^{-\frac{1}{2}x^2}$.

*$y = 0$. we have $y = 0$, so $y = 0 \cdot e^{-\frac{1}{2}x^2}$.

Thus we can use constant $C$ replace absolute value sign, $y= Ce^{-\frac{1}{2}x^2}$.
</s>