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.
$\endgroup$ 23 Answers
$\begingroup$$$|y|=e^{-\frac{1}{2}x^2}\cdot e^C \implies y(x)=\pm e^Ce^{-x^2/2}$$ Well you can substitute $k= \pm e^C$ so that $$y(x)=ke^{-x^2/2}$$ With integrating factor that problem of the absolute value doesn't arise $$y'+yx=0, \quad y(0)=-1$$ $$ \implies (ye^{x^2/2})'=0 \implies ye^{x^2/2}=C$$ $$y(x)=Ce^{-x^2/2}$$
$\endgroup$ 3 $\begingroup$In transforming the solution equation to $$ye^{\frac12x^2}=\pm e^C,$$ where the sign is possibly dependent on $x$, there is on the left side a continuous function, on the right a function that takes only two distinct values. There can only be equality of both sides if the common object is a constant function, $ye^{\frac12x^2}=A$ where the constant is one of $A=\pm e^C$. Inserting the condition at $x=0$ we can also write $$ y(x)=y(0)e^{-\frac12x^2} $$
Another way to see this is to remark that $y=0$ is a solution, and by the uniqueness theorem no other solution can have the value zero, cross the $y=0$ axis, thus any other solution has a constant sign.
For a short interval around the initial point the function must have the same sign as the initial value by continuity.
$\endgroup$ $\begingroup$$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}$.
$\endgroup$