\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1cm,y=1cm] \begin{axis}[ x=5cm,y=1.5cm, axis lines=middle, xmin=-1.2, xmax=1.2, ymin=-1.4, ymax=1.4, ytick={-1,...,1}, xtick=\empty, xlabel=$x$, ylabel=$y$, ] \addplot[domain=0.05:3.8, red, line width=1,samples=5000] {sin(deg(1/(x)))}; \addplot[domain=-3.8:-0.05, red, line width=1,samples=5000] {sin(deg(1/(x)))}; %\draw (-0.32,0.1) node[anchor=north west] {$-\frac{1}{\pi}$}; %\draw (0.32,0.1) node[anchor=north west] {$\frac{1}{\pi}$}; \draw[] (axis cs:-0.32, 0.1) -- (axis cs:-0.32, -0.1); \node () at (axis cs:-0.35,-0.45) {$-\frac{1}{\pi}$}; \draw[] (axis cs:0.32, 0.1) -- (axis cs:0.32, -0.1); \node () at (axis cs:0.33,-0.45) {$\frac{1}{\pi}$}; %\node[color=red, font=\footnotesize] at (-1,-0.25) {$f(x)=3x^3 - x^2 - 10x$}; %\node[color=blue, font=\footnotesize] at (axis cs: 1.1,2.2) {$g(x)=- x^2 + 2x$}; \end{axis} \end{tikzpicture}