To prove $\lim_{x\to 0}\frac{e^x-e^{x\cos x}}{x-\sin x}=3$ I came across this question to prove the given limit
$$\lim_{x\to 0}\frac{e^x-e^{x\cos x}}{x-\sin x}=3$$
First I tried using LHospital's rule directly.
Then I tried using expansion of $e^x$ and then using LHospital's rule but I am getting stuck.

I solved it using Taylor expansion:
First we calculate some ugly derivatives:
$$(e^{x\cos(x)})' = (\cos(x) - x\sin(x))e^{x\cos(x)},$$
$$(e^{x\cos(x)})'' = [(-2\sin(x) - x\cos(x))+(\cos(x)-x\sin(x))^2] e^{x\cos(x)}$$
and
$$(e^{x\cos(x)})''' = [(-3\cos(x) + x\sin(x))+(\cos(x)-x\sin(x))^3+2(\cos(x)-x\sin(x))(-2\sin(x)-x\cos(x)) ]e^{x\cos(x)}.$$
From that we have that the first, second and third derivatives of $e^{x\cos(x)}$ at $x=0$ are $1$ ,$1$ and $-2$. Therefore we have
$$e^{x\cos(x)} = 1+x+\frac{1}{2!}x^2-\frac{2}{3!}x^3+o(x^3).$$
Using the Taylor's expansion of $e^x$ and $\sin(x)$ we get:
$$e^x - e^{x\cos(x)} = -\frac{-3}{3!}x^3+o(x^3)$$
and
$$x-\sin(x) = -\frac{1}{3!}x^3+o(x^3).$$
Therefore we obtain
$$\lim_{x\to 0}\frac{e^x - e^{x\cos(x)}}{x-\sin(x) } = \lim_{x\to 0}\frac{-\frac{-3}{3!}x^3+o(x^3)}{-\frac{1}{3!}x^3+o(x^3)} = 3.$$
