Example 13. Find $\lim _{x \rightarrow 0}(\cos x)^{\frac{1}{x}}$.
Solution. By adding and subtracting 1 from $\cos x$ and applying the corresponding formula, we get

$$
\begin{aligned}
& \lim _{x \rightarrow 0}(\cos x)^{\frac{1}{x}}=\lim _{x \rightarrow 0}[1-(1-\cos x)]^{\frac{1}{x}}=\lim _{x \rightarrow 0}\left(1-2 \sin ^{2} \frac{x}{2}\right)^{\frac{1}{x}}= \\
& =\lim _{x \rightarrow 0}\left[\left(1-2 \sin ^{2} \frac{x}{2}\right)^{-\frac{1}{2 \sin ^{2} \frac{x}{2}}}\right]^{-\frac{2 \sin ^{2} \frac{x}{2}}{x}}=e^{\lim _{x \rightarrow 0}\left(-\frac{2 \sin ^{2} \frac{x}{2}}{x}\right)}
\end{aligned}
$$

Since

$$
\begin{aligned}
& \lim _{x \rightarrow 0}\left(-\frac{2 \sin ^{2} \frac{x}{2}}{x}\right)=-\lim _{x \rightarrow 0} \frac{\sin ^{2} \frac{x}{2}}{\frac{x}{2}}= \\
= & -\lim _{x \rightarrow 0} \frac{\sin \frac{x}{2}}{\frac{x}{2}} \cdot \lim _{x \rightarrow 0} \sin \frac{x}{2}=-1 \cdot 0=0
\end{aligned}
$$

$$
\lim _{x \rightarrow 0}(\cos x)^{\frac{1}{x}}=e^{0}=1
$$