<s>[INST] Find limit at 0 of cosine function with embedded sine I'm getting stuck on the following exercise where I have to find the limit as x approaches zero, for this cosine function:
$$\lim_{x \to 0}\cos\left(\frac{\pi\sin^2(x)}{x^2}\right)$$
The graph shows that there should be a limit of $-1$ at $0$, but I can't find a nice trigonometric identity that allows me to rewrite this such that the $x^2$ in the denominator disappears.
Any indication on how to solve this?
 [/INST] \begin{align*}
\lim_{x \rightarrow 0} &{}\cos \left( \frac{\pi \sin^2 x}{x^2}  \right)  \\
    &= \cos \left( \lim_{x \rightarrow 0}\frac{\pi \sin^2 x}{x^2}  \right)  &  &\text{cosine is continuous}  \\
    &= \cos \left( \pi \lim_{x \rightarrow 0}\frac{\sin^2 x}{x^2}  \right)  &  &\text{constant multiple}  \\
    &= \cos \left( \pi \left(\lim_{x \rightarrow 0} \frac{\sin x}{x}\right)^2  \right)  &  &\text{$x \mapsto x^2$ is continuous}  \\
    &= \cos \left( \pi \left(1\right)^2  \right)  &  &\text{trigonometric limit}  \\
    &= -1  \text{.}
\end{align*}
The trigonometric limit used is one of a pair of fundamental limits, $\lim_{x \rightarrow 0} \frac{\sin x}{x} = 1$ and $\lim_{x \rightarrow 0} \frac{1 - \cos x}{x} = 0$, which are usually found by application of the squeeze theorem.
</s>