The split normal distribution is a probability density function consisting of two halves of normal distributions, one below the mode $\mu$ and one above it, with different standard deviations, scaled to be continuous. It is defined as follows:
$$s(t) = \begin{cases}t\lt\mu & A\exp\left(-\frac{\left(t-\mu\right)^2}{2\sigma^2_1}\right) \\ t\ge\mu & A\exp\left(-\frac{\left(t-\mu\right)^2}{2\sigma^2_2}\right)\end{cases}$$
where $\sigma_1$ and $\sigma_2$ are the standard deviations for the left and right sides, respectively, and $A$ (a constant used to make sure the halves meet) is as follows: $$A = \frac{\sqrt{\frac{2}{\pi}}}{\sigma_1+\sigma_2}$$
I am trying to find such a distribution's cumulative distribution function, as follows: $$S(x) = \int_{-\infty}^{x} s(t)dt $$
Unfortunately, I don't know enough calculus to actually integrate this myself, so I tried to use Wolfram|Alpha. However, I could find no way to input a piecewise function, so I tried my best to rely on integration rules instead. My first thought was to convert $S(x)$ into the following form:
$$S(x) = \begin{cases}t\lt\mu & \int_{-\infty}^t{s(t)dt} \\ t\ge\mu & \int_{-\infty}^\mu{s(t)dt} + \int_\mu^t{s(t)dt} \end{cases}$$
However, Wolfram was unable to evaluate the former integral (in the allotted time), so I had to rephrase it into ones that it could, like this:
$$S(x) = \begin{cases}t\lt\mu & \int_{-\infty}^\mu{s(t)dt} - \int_t^\mu{s(t)dt} \\ t\ge\mu & \int_{-\infty}^\mu{s(t)dt} + \int_\mu^t{s(t)dt}\end{cases}$$
I believe these become this when evaluated (the only difference between the two is the right-side sigmas):
$$S(x) = \begin{cases}t\lt\mu & 2\sigma_1 - 2\sigma_1 \mathrm{erf}\left(\frac{\sqrt{2}\left(u-t\right)}{2\sigma_1}\right) \\ t\ge\mu & 2\sigma_1 - 2\sigma_2 \mathrm{erf}\left(\frac{\sqrt{2}\left(u-t\right)}{2\sigma_2}\right)\end{cases}$$
Are there any mistakes in this process, or is this the correct cumulative density function? I'm not that practiced with manipulating integrals, so I feel like I may be missing some subtle error.



