How to approach $\displaystyle\lim_{x\to0} (\cos x)^{\frac{1}{x^2}}$ I'm working through some apparently tricky limits (for a basic fellow like me), and I'm not sure how to treat the following situation:
$$\displaystyle\lim_{x\to0} (\cos x)^{\frac{1}{x^2}}$$
How does one deal with powers which include $x$ when evaluating limits? I'm not after an exact evaluation of the limit. I'm just interested in how to go about it so that I can reach the answer Wolfram spits out as $$\frac{1}{\sqrt{e}}$$
Thanks for your patience and time, all.

Using Taylor series, you could do the following $$A=\cos (x)^{\frac{1}{x^2}}$$ $$\log(A)=\frac{1}{x^2} \log(\cos(x))$$ $$\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}+O\left(x^7\right)$$ $$\log(1+y)=y-\frac{y^2}{2}+\frac{y^3}{3}+O\left(y^4\right)$$ Replace $y$ in this last expansion by $$y=-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}$$ So, $$\log(\cos(x))=-\frac{x^2}{2}-\frac{x^4}{12}-\frac{x^6}{45}+O\left(x^7\right)$$ $$\log(A)=-\frac{1}{2}-\frac{x^2}{12}-\frac{x^4}{45}+O\left(x^5\right)$$ $$A=\frac{1}{\sqrt{e}}-\frac{x^2}{12 \sqrt{e}}+O\left(x^4\right)$$ For illustration, 


*

*let us use $x=0.1$; the value of $A_{exact} \approx 0.6060241$ while $A_{approx} \approx 0.6060252$ which is quite good.

*let us use $x=0.5$; the value of $A_{exact} \approx 0.5931328$ while $A_{approx} \approx 0.5938946$ which is not so bad.

