# Why is $e^{-\frac{x^2}{2}+c_1} = c_1\cdot e^{-\frac{x^2}{2}}$?

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.

Notice that $$e^{-\frac{x^2}{2}+c_1} = e^{-\frac{x^2}{2}} e^{c_1}$$ But $e^{c_1}$ is a constant, so just denote it as $K$, hence $$e^{-\frac{x^2}{2}+c_1} = K e^{-\frac{x^2}{2}}$$
Usually the notation indicates you have a constant and it does not mean that $$e^{-\frac{x^2}{2}+c_1} = c_1\cdot e^{-\frac{x^2}{2}}$$
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.
$$y(x) = e^{-\frac{x^2}{2} + C_1}=\underbrace{\mathrm{e}^{C_1}}_{\mbox{const}}\mathrm{e}^{-\frac{x^2}{2}}.$$