# plotting – Ratio involving CDF and PDF of a standard normal random variable behaves unexpected when plotted

Good morning,

I am plotting the function $$h(x)$$, see below, and obtain an oscillating behavior in the range $$x in (7.2,8.3)$$ that cannot be explained by the function itself. Also for $$x ge 8.4$$ it seems to be a constant function which is not plausible either, and the limit for $$x to infty$$ should be $$-1$$ and not $$0.5$$ as visually indicated.

Here is the code:

``````h(x_):=(x*CDF(NormalDistribution(0, 1), x)*Log(CDF(NormalDistribution(0, 1), x)))/PDF(NormalDistribution(0, 1), x);  Plot(h(x), {x, -7, 20})
``````

There seems to be a numerical issue that I cannot resolve. Do you have any idea?