I am trying to plot this function $f$ which satisfies $f$ bounded, monotone, $C^\infty$, but $f'(x) \nrightarrow 0$ as $x\rightarrow\infty$. I am running a linux computer with mathematica 12.3. My code is
h[x_] := Piecewise[{{Exp[100]*Exp[-1/x^2 - 1/(x - 1)^2],
0 < x < 1 }},0]
g[x_] := h[Floor[x]^2 (x - Floor[x])]
f[x_] := NIntegrate[g[t], {t, 0, x}]
Plot[f[x],{x,0,10}]
The Exp[100] is there because otherwise I get this error:
How can I fix this to see this beauty?
h
. $\endgroup$Syed
when I run your code. I am on v13.0. Win10-x64. $\endgroup$f[x_?NumericQ] := NIntegrate[g[t], {t, 0, x}]
$\endgroup$