Tricky limits problem Find the limit of
$$\lim_{x\to0}\left[1 + \left(\frac{\log \cos x}{\log \cos(x/2)}\right)^2 \right]^2$$
Any help would be thoroughly appreciated.
 A: $$\lim_{x\to0}\left[1 + \left(\frac{\log \cos x}{\log \cos(x/2)}\right)^2 \right]^2$$
$$\left[1+\lim_{x\to0}\left(\frac{\log \cos x}{\log \cos(x/2)}\right)^2 \right]^2$$
$$\left[1+\left(\lim_{x\to0}\frac{\log \cos x}{\log \cos(x/2)}\right)^2 \right]^2$$
Apply L'Hopital
$$\left[1+\left(2\cdot\lim_{x\to0}\frac{\tan x}{\tan(x/2)}\right)^2 \right]^2$$
Apply L'Hopital
$$\left[1+\left(4\cdot\lim_{x\to0}\frac{\sec^2 x}{\sec^2(x/2)}\right)^2 \right]^2$$
$$\left[1+\left(4\cdot\frac{\sec^20}{\sec^20}\right)^2 \right]^2$$
$$\left[1+\left(4\cdot\frac{1}{1}\right)^2 \right]^2=289$$
A: Hint: use the fact that
$$
\log x \sim_{x\to 1} x-1\\
\cos u =_{u\to 0} 1 - \frac{u^2}2 + o(u^2)
$$

then you get
$$
\log \cos x \sim-\frac{x^2}2\\
\log \cos \frac x2 \sim-\frac{x^2}8\\
\frac{\log \cos x}{\log \cos \frac x2} \to 4
$$
so the final limit is
$$
(1 + 4^2)^2 = 17^2 = 289
$$
A: From the Taylor formula $\log(\cos x)$ behaves as $x^2/2$ near 0, hence the limit is $(1+4^2)^2=17^2$.
A: $t=\cos(x/2)\to 1$
$\frac{\log \cos x}{\log \cos(x/2)}=\frac{\log 2\cos^2 (\frac{x}{2})-1}{\log \cos(x/2)}=\frac{\log 2t^2-1}{\log t}$
$\lim_{x\to 0}\frac{\log \cos x}{\log \cos(x/2)}=\lim_{t\to 1}\frac{\log (2t^2-1)}{\log t}=4$ by L'Hospital's rule.
Then use composite rule of limit.
A: Hints:
As $x \to 0$, $$\ln \cos x \sim \cos x-1 \sim -\frac{x^2}{2}$$
