<s>[INST] Evaluating $\lim_{x \to 0} \frac{(1 + \sin x + \sin^2 x)^{1/x} - (1 + \sin x)^{1/x}}{x}$ I did this:
$$\begin{align}
\lim_{x \to 0} \frac{(1 + \sin x + \sin^2 x)^{1/x} - (1 + \sin x)^{1/x}}{x} &\sim \lim_{x \to 0} \frac{(1 + x + x^2)^{1/x} - (1 + x)^{1/x}}{x} = \\
&= \lim_{x \to 0} \left [ (1+x)^{1/x} \frac{\left ( \frac{1 + x + x^2}{1 + x} \right )^{1/x} - 1}{x} \right ] =\\
&= \lim_{x \to 0} (1+x)^{1/x} \cdot \lim_{x \to 0} \frac{\left ( 1 + \frac{x^2}{1 + x} \right )^{1/x} - 1}{x} =\\
&= e \cdot \lim_{x \to 0} \frac{e^{\frac{1}{x} \cdot \ln \left ( 1 + \frac{x^2}{1+x} \right )} - 1}{x} \sim \\
&\sim e \cdot \lim_{x \to 0} \frac{e^{\frac{x}{1 + x}} - 1}{x} \sim \\
&\sim e \cdot \lim_{x \to 0} \frac{1}{1 + x} = e
\end{align}$$
Is it right? If it is, how to evaluate the limit faster? It was pretty long the way I did it.
 [/INST] By applying Lagrange's Mean Value Theorem to the function $f(t) = e^t$ we have that
$$\begin{align}
\frac{1}{x} \left( (1+ \sin x + \sin^2 x)^{1/x} - (1+ \sin x)^{1/x} \right)
&= \frac{1}{x} \left( e^{ \frac{ \log(1+ \sin x + \sin^2 x) }{x} } - e^{ \frac{ \log(1+ \sin x) }{x} } \right)
\\&= \frac{1}{x} e^{\theta_x} \left( \frac{ \log(1+ \sin x + \sin^2 x)}{x} - \frac{ \log(1+ \sin x)}{x} \right)
\\ &= e^{\theta_x} \left( \frac{ \log(1+ \sin x + \sin^2 x) - \log(1+ \sin x)}{x^2} \right) 
\end{align}$$
where $\theta_x \in \left( \frac{ \log(1+ \sin x) }{x}, \frac{ \log(1+ \sin x + \sin^2 x) }{x} \right)$. Then by squeezing, it is easy to see that $\lim_{x\to0} \theta_x = 1$.
Furthermore we note that by Taylor Series 
$$\begin{align}
\frac{ \log(1+ \sin x + \sin^2 x) - \log(1 + \sin x)}{x^2} &= \frac{ \log(1+ x + x^2 + O(x^3)) - \log(1 + x + O(x^3))}{x^2} \\&= \frac{ x + x^2/2 - ( x - x^2/2) + O(x^3)}{x^2} \\&= 1 + O(x)
\end{align}$$
Now passing to the limit as $x\to0$ in the upper expression yields the desired result.
</s>