I have been working on the following problem for some time now, to no avail, so any advice whatsoever is greatly appreciated.
I would like to optimize
$\min_{0 \leq r \leq 1} \ \ L = Prob(y>0)*(k) + (1-Prob(y>0))*(1-r)*l$
or
$L = (1-F_Y (0))*k+F_Y (0)*(1-r)*l$
with respect to $r$, where $F_Y (y)$ is the cdf of $y \sim \mbox{ i.i.d. } \mathcal{N}[\mu+r,\sigma^2]$
So in a sense, the minimization looks for the "optimal distribution" of $y$ out of a set of distributions which vary only with respect to the mean.
I have worked on finding the derivative of $L$ with respect to $r$, which (if I haven't mad a mistake) comes down to
$\frac{d L}{d r} = - \frac{l}{2} - \frac{1}{\sqrt{\pi}}e^{-(-\frac{\mu+r}{\sqrt{2 \sigma^2}})^2}(k-(1-r)l) - l*\frac{1}{\sqrt{\pi}}\int\limits_{-\infty}^{-\frac{\mu+r}{\sqrt{2 \sigma^2}}} {e^{-t^2}dt} $
Since there is no closed form of the error function's integral, I am kind of stuck with how to solve for $r$. Any kind of help would be greatly appreciated - please apologize in advance any obvious blunders...
Edit: I know that $I \equiv \int\limits_{-\infty}^{\infty} {e^{-t^2}dt}=\sqrt{\pi}$, and $\int\limits_{-\infty}^{0} {e^{-t^2}dt}=\frac{\sqrt{\pi}}{2}$. Would it be possible to somehow find a similar solution with $-\frac{\mu+r}{\sqrt{2 \sigma^2}}$ as the upper bound of the integral?