The given limit is: $$\lim_{x \to \infty} \left (\cos \dfrac {1}{x} \right)^{\displaystyle x^2} $$
The answer is $\dfrac{1}{\sqrt e}.$
My working: $$\lim_{x \to \infty} \left (\cos \dfrac {1}{x} \right)^{\displaystyle x^2} $$ $$=\lim_{x \to \infty} e^{\displaystyle \ln{\left(\cos \dfrac {1}{x} \right)^{\displaystyle x^2}}} $$ $$=\lim_{x \to \infty} e^{\displaystyle \ln{\left( \sqrt {1-\sin^2 \dfrac {1}{x}} \right)^{\displaystyle x^2}}} $$ $$=\lim_{x \to \infty} e^{\displaystyle \ln{\left({1-\sin^2 \dfrac {1}{x}} \right)^{\dfrac {x^2}{2}}}} $$
I am stuck at the 4th limit and I don't know how to go on. What should I do?
I would write $$\left[\left(\cos\left(\frac{1}{x}\right)^{1/x}\right)\right]^{x^3}$$