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.
 A: Use $\cos(x) = 1 - \frac12 x^2 + \cal{O}(x^4)$ and $\sin(x) = x - \frac{x^3}{6} + \cal{O}(x^5)$. Then 
$$
\lim_{x\to 0}\frac{e^x-e^{x\cos x}}{x-\sin x}=\lim_{x\to 0}e^x\frac{1-e^{-x^3/2 + \cal{O}(x^5)}}{x-\sin x}= \lim_{x\to 0}\frac{{x^3/2  + \cal{O}(x^5)}}{x^3/6 + \cal{O}(x^5)}=\lim_{x\to 0}\frac{{1/2  + \cal{O}(x^2)}}{1/6 + \cal{O}(x^2)}= 3
$$
A: You can use L'Hospital's Rule or Taylor's series and easily get the answer, but these techniques are never applied directly (unless the problem is too simple). 
We can proceed as follows
\begin{align}
L&=\lim_{x\to 0}\frac{e^{x}-e^{x\cos x}} {x-\sin x} \notag\\
&=\lim_{x\to 0}e^{x\cos x} \cdot \frac{e^{x(1-\cos x)} - 1}{x(1-\cos x)}\cdot \frac{1-\cos x} {x^{2}}\cdot\frac{x^{3}}{x-\sin x} \notag\\
&=1\cdot 1\cdot\frac{1}{2}\cdot 6=3\notag
\end{align}
All the limits are well known and you can evaluate limit of $(x-\sin x) /x^{3}$ either using L'Hospital's Rule or Taylor series to get $1/6$. Therefore its reciprocal tends to $6$.
A: 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.$$
A: L'Hopital worked. You need to do it three times.
$f(x) = e^{x} - e^{xcosx} ,   g(x) = x - sinx$
$f^{1}(x) = e^{x} - (cosx-xsinx)e^{xcosx},  g^{1}(x) = (1-cosx)$.
$f^{2}(x) = e^{x} - e^{xcosx}{(cosx-xsinx)^{2} -2sinx + xcosx}$,  $g^{2}$(x) = sinx. 
$f^{3}$(x) = $e^{x} - (-2cosx - (cosx-xsinx))e^{xcosx} +  e^{xcosx}(cosx-xsinx)(-2sinx-xcosx) +(cosx-xisinx)^{3}e^{xcosx} + 2(-sinx-cosx-xsinx))e^{xcosx}$ 
 $g^{3}$(x) = cosx
