# 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^b = \exp(b \ln a)$ – Najib Idrissi Oct 9 '14 at 10:06
• This kind of limit almost always can be solved by writing $f$ as $\exp\circ \log \circ f$. – Git Gud Oct 9 '14 at 10:06
• Ooooooh! Wow, thanks guys! Much appreciated! – Old mate Oct 9 '14 at 10:07
• To reinforce the hints above and give it a more general nature: Continuous functions can be passed inside and outside limits. So if you have a function that's hard to take the limit of, but you can apply a continuouus function to make it easier (like natural log), you take the limit of the continuous function of your function, then undo it :) – Alan Oct 9 '14 at 10:11

## 4 Answers

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}$$

• nice method, to take the logarithm! – David Holden Oct 9 '14 at 11:23
• @DavidHolden All limits of the form $\lim_{x\to a}f(x)^{g(x)}$ should be treated with the logarithm. It generally simplifies things. – egreg Oct 9 '14 at 11:36

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}$$

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$

• @NajibIdrissi, I meant the edited version – lab bhattacharjee Oct 9 '14 at 10:24

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.