Artificial intelligent assistant

Why does $\lim_{x\to 0}x^{\cos 1/x}$ fluctuate between $0$ and $\infty$? I graphed the function $$y = x^{\cos(1/x)}$$ in matplotlib and realized that much like $\displaystyle y = \sin(\frac1x)$, the function has no limit as $x\to0^+$. However, $y = x^{\cos(1/x)}$ fluctuates between 0 and $+\infty$. $$0^0=1$$ Neither of which approaches infinity. Why is $\displaystyle y$ bounded by infinity and 0 as x approaches 0?

If $x=1/(2n\pi)$ where $n$ is an integer, then $$x^{\cos(1/x)}=x\to0\quad\hbox{as $n\to\infty$}.$$ If $x=1/((2n+1)\pi)$ then $$x^{\cos(1/x)}=x^{-1}\to\infty\quad\hbox{as $n\to\infty$}.$$ So for various (positive) values of $x$, your expression oscillates between $0$ and $\infty$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1e23c53868375bda9bcf4f34f970e330