<s>[INST] Evaluation of limit at infinity: $\lim_{x\to\infty} x^2 \sin(\ln(\cos(\frac{\pi}{x})^{1/2}))$ $$\lim_{x\to\infty} x^2 \sin(\ln(\cos(\frac{\pi}{x})^{1/2}))$$
What I tried was writing $1/x=t$ and making the limit tend to zero and writing the cos term in the form of sin
 [/INST] Using Taylor series for $\cos u$, $\sqrt{1+u}$, $\ln(1+u)$, and $\sin u$ when $u\to 0$. When $x\to \infty$, $\frac{1}{x} \to 0$, so
$$\cos\frac{\pi}{x} = 1- \frac{\pi^2}{2x^2} + o\left(\frac{1}{x^2}\right)$$
and
$$\sqrt{ \cos(\frac{\pi}{x}) } = \sqrt{ 1- \frac{\pi^2}{2x^2} + o\left(\frac{1}{x^2}\right) } = 1- \frac{\pi^2}{4x^2} + o\left(\frac{1}{x^2}\right)$$
so that
$$\ln \sqrt{ \cos(\frac{\pi}{x}) } = \ln\left (1- \frac{\pi^2}{4x^2} + o\left(\frac{1}{x^2}\right) \right) = - \frac{\pi^2}{4x^2} + o\left(\frac{1}{x^2}\right)$$
and finally
$$
x^2 \sin \ln \sqrt{ \cos(\frac{\pi}{x}) } = x^2 \sin\!\left( - \frac{\pi^2}{4x^2} + o\!\left(\frac{1}{x^2}\right)\right)
= -x^2 \left(\frac{\pi^2}{4x^2} + o\!\left(\frac{1}{x^2}\right)\right) = - \frac{\pi^2}{4} + o(1)$$
</s>