Example 3. Find $\lim _{x \rightarrow 0} \frac{\ln \left(\sin ^{2} x+e^{x}\right)-x}{\ln \left(x^{2}+e^{2 x}\right)-2 x}$.
$$
\begin{array}{l}
\text { Solve the original expression }=\lim _{x \rightarrow 0} \ln \left(\sin ^{2} x+e^{x}\right)-\ln e^{x}\left(x^{2}+e^{2 x}\right)-\ln e^{2 x} \\
=\lim _{x \rightarrow 0} \frac{\ln \left(\frac{\sin ^{2} x+e^{x}}{e^{x}}\right)}{\ln \left(\frac{x^{2}+e^{2 x}}{e^{2 x}}\right)} \\
=\lim _{x \rightarrow 0} \frac{\ln \left(1+\frac{\sin ^{2} x}{e^{x}}\right)}{\ln \left(1+\frac{x^{2}}{e^{2 x}}\right)} \\
=\lim _{x \rightarrow 0} \frac{\frac{\sin ^{2} x}{e^{x}}}{\frac{x^{2}}{e^{2 x}}}=\lim _{x \rightarrow 0} e^{x} \frac{x^{2}}{x^{2}}=1 . \\
\end{array}
$$
(Because as $x \rightarrow 0$, $\ln \left(1+\frac{\sin ^{2} x}{e^{x}}\right)$
$$
\sim \frac{\sin ^{2} x}{e^{x}}, \ln \left(1+\frac{x^{2}}{e^{2 x}}\right) \sim \frac{x^{2}}{e^{2 x}})
$$