$g(x)=\frac{\phi(x)}{1-\Phi(x)}$, where $\phi(x)$ and $\Phi(x)$ are p.d.f and c.d.f of standard normal distribution respectively.
$g'(x)=\frac{\phi'(x)(1-\Phi(x))+\phi^2(x)}{(1-\Phi(x))^2}=\frac{\phi(x)}{(1-\Phi(x))^2} \left( \phi(x)-x(1-\Phi(x)) \right)$ since $\phi'(x)=-x\phi(x)$.
Let $h(x)=\phi(x)-x(1-\Phi(x))$, $h'(x)$ is thus $\phi'(x)-(1-\Phi(x))+x\phi(x)=\Phi(x)-1 \leq 0$
$h(x)$ is non-increasing, and $\lim_{x\to \infty} h(x)=0 $, thus $h(x)\geq0$ and since $\frac{\phi(x)}{(1-\Phi(x))^2}\geq 0$ then $g'(x)\geq0$. $g(x)$ must be non-decreasing.
But in Mathematica, I have this like a wavy line. Mathematica Image
What's the problem please!
You need to use
FullSimplify, after which you will obtain$$g(x) = \sqrt{\frac{2}{\pi}} \frac{e^{-x^2/2}}{\operatorname{erfc}(x/\sqrt{2})},$$ and this function evaluates correctly since the implementation of
Erfcavoids the loss of precision due to evaluatingErfat arguments that are so large that it is almost $1$.So for instance, input
to yield the form of $g$ shown above, then plot this function over the desired interval.