<s>[INST] Find $\lim_{x \to 0}\left(\frac{\cos x}{\cos(2x)}\right)^{\frac{1}{x^2}}$ $$\lim_{x \to 0}\left(\frac{\cos x}{\cos(2x)}\right)^{\frac{1}{x^2}}$$
What I have done is to take the $\ln$ 
$$e^{\lim_{x \to 0}\ln\left(\left(\frac{\cos x}{\cos(2x)}\right)^{\frac{1}{x^2}}\right)}$$
$$y={\lim_{x \to 0}{\frac{1}{x^2}}\cdot \ln\frac{\cos x}{\cos(2x)}}$$
Applying l'hopital to get 
$$y={\lim_{x \to 0}{\frac{-2}{x^3}}\cdot \frac{\cos(2x)}{\cos x}\cdot \frac{-\sin x\cos(2x)+2\sin(2x)\cos x}{(\cos(2x)^2)}}={\lim_{x \to 0}\frac{-2}{x^3\cdot \cos x}\cdot \frac{-\sin x\cos(2x)+2\sin(2x)\cos x}{(\cos(2x))}}$$
Should I apply l'hopital again?
 [/INST] If $L=\lim\ (\frac{\cos\ x}{\cos\ 2x})^\frac{1}{x^2}$ then
\begin{align} \ln\ L &= \lim \frac{\ln\ \cos\ x -\ln\ \cos\ 2x}{x^2}
\\
&=\lim \ \frac{ \frac{-\sin\ x}{\cos\ x} + \frac{2\sin\ 2x}{\cos\
2x}}{2x} \\&= \lim\ \frac{-\sin\ x +2\sin\ 2x}{2x}\\& = \lim\
\frac{-\cos\ x + 4\cos\ 2x}{2} =\frac{3}{2},\ L=e^\frac{3}{2}
\end{align}
</s>