TITLE: Why is $ e^{-\frac{x^2}{2}+c_1} = c_1\cdot e^{-\frac{x^2}{2}} $?
QUESTION [6 upvotes]: Recently I tried to solve this differential equation: 
$$ y'+xy = 0 $$
$$ \frac{dy}{dx} + xy = 0 $$
$$ \int \frac{dy}{y} = \int -x \,dx $$
This is my solution:
$$ y(x) = e^{-\frac{x^2}{2} + C_1} $$ 
According to Wolfram|Alpha this should be true but also not perfectly simplified. 
Wolfram's solution: 
$$ y(x) = C_1 \cdot e^{-\frac{x^2}{2}} $$
I don't get the last step at all.

REPLY [7 votes]: You should have
\begin{align}
|y| & = e^{-x^2/2 \, + \, C_1} \\[10pt]
& = e^{-x^2/2} e^{C_1} \\[10pt]
& = e^{-x^2/2} \cdot C_2 & & \text{and } C_2>0 \text{ since it is a value} \\
& & & \text{of the exponential function} \\[10pt]
\text{So } y & = e^{-x^2/2} \cdot C_3 & & \text{and } C_3 \ne 0.
\end{align}
However the method by which this solution was found assumes $y\ne0,$ since one divides by $y$ in order to get this. Therefore it only finds nonzero solutions. One must check separately whether $y=0$ is a solution. (And that's very easy.) Hence the general solution is
$$
y = e^{-x^2/2} \cdot C
$$
where $C$ can be any scalar.