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.
 A: Let $$ L :=\lim_{x\rightarrow 0} (\cos\ x)^\frac{1}{x^2} $$
so that $$ \ln\ L =\lim_{x\rightarrow 0} \frac{\ln\ \cos\ x}{x^2} $$
by L'Hospital, $$ =\lim_{x\rightarrow 0} \frac{-\tan\ x}{2x}
=-\frac{1}{2} $$ Hence $$ L = e^\frac{-1}{2}$$
A: just as a first guess note that $\cos x$ is approximated by $1-\frac{x^2}2$ near $x=0$ and
$$
(1-\frac{x^2}2)^{\frac1{x^2}} \to e^{-\frac12}
$$
A: Setting $x=2h$ $$\lim_{h\to0}(1-2\sin^2h)^{\frac1{4h^2}}=\left(\lim_{h\to0}\left[1+(-2\sin^2h)\right]^{-2\sin^2h}\right)^{-\frac12\left(\lim_{h\to0}\frac{\sin h}h\right)^2}$$
The inner limit converges to $e$
A: 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.

