I constructed the curve of the mentioned function but it is not displayed correctly.
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=$x$,
ylabel=$y$,
domain=0:0.6,
samples=100,
axis lines=middle,
xmin=0, xmax=0.6,
ymin=-0.4, ymax=0.2,
enlargelimits=true,
xtick={0,0.1,0.2,0.3,0.4,0.5,0.6},
ytick={-0.1,0,0.1,0.2},
grid=both,
width=10cm,
height=7cm,
]
\addplot[blue, ultra thick] {x*e^(1/x) - e^((1-x^2)/x) - x - 1};
\addlegendentry{\( (\mathscr{C}_h) \)}
\end{axis}
\end{tikzpicture}
\end{document}
That's what I want


I tried to zoom by reducing xmax and ymax but it's the same.
– Dots Mar 28 '24 at 11:20^in calculations. For examplee^xwould be calculated asexp{x* log(e))wherelog(e)will be calculated using the numerical value ofe. Similarlyx^2will be translated asx*xif you are lucky, andexp(2*log(x))otherwise. – John Kormylo Mar 28 '24 at 17:07