Difficult limits question I'm prepping for this entrance exam called the JEE Advanced(An Exam in India) and I found this in the previous year papers. I've noticed that the L'Hopital rule doesn't work here nor expanding $\cos x$ or $e$, nor could I factorise or use the sandwich theorem. I just couldn't get anywhere. Would really appreciate if you gave me some tips on the thought process of solving limits questions and how to proceed when you see a limits question.
The question: 
                   $$\lim_{x->0} \frac{e^{\cos(x^n)} - e}{x^m}= -\frac{e}{2}$$
Then find $\frac{m}{n}$. Thanks in advance!
PS: I didn't know how to use mathmetical symbols here. Hope you understand the question.
 A: I suppose $n,m$ are positive integers.
As $x \to 0$ we have:
\begin{align}
\cos(x^n) &= 1 - \frac{x^{2n}}{2} + O(x^{4n})
\\
e^{\cos(x^n)} &= e e^{-x^{2n}/2+O(x^{4n})}
= e\left(1-\frac{x^{2n}}{2}+O(x^{4n})\right)
= e-\frac{e x^{2n}}{2}+O(x^{4n})
\\
e^{\cos(x^n)} - e &= -\frac{e x^{2n}}{2}+O(x^{4n})
\\
\frac{e^{\cos(x^n)} - e}{x^m} &= -\frac{e x^{2n-m}}{2}+O(x^{4n-m})
\end{align}
So to get limit $-e/2$ we need $2n-m = 0$.  That is: $m=2n$ so $\frac{m}{n} = 2$.
A: Assuming $m, n$ to be positive we can see that the numerator of the expression under limit is of the form $A-B$ where both $A, B$ tend to $e$. Then we can rewrite it as $$B((A/B) - 1)$$ Clearly $A/B\to 1$ and hence if $$t=\log(A/B)=\log A-\log B\to 0$$ and we can write $A/B=\exp(t) $. Thus $B((A/B) - 1)$ can be rewritten as $$B(\exp(t) - 1)=B\cdot\frac{\exp(t)-1}{t}\cdot t=B\cdot\frac{\exp(\log A-\log B) - 1}{\log A-\log B} \cdot(\log A-\log B) $$ Now $B\to e$ and the fraction in middle above tends to $1$ and hence the given limit condition implies $$\lim_{x\to 0}e\cdot\frac{\cos x^n-1}{x^m}=-\frac{e}{2}$$ which further leads to $$\lim_{x\to 0}\frac{1-\cos x^n} {x^m} =\frac{1}{2}$$ The expression under limit above can be written as $$\frac{1-\cos x^n} {x^{2n}}\cdot\frac{x^{2n}}{x^m}$$ and the first fraction tends to $1/2$. It follows that we have $$\lim_{x\to 0}x^{2n-m}=1$$ which is possible only when $m=2n$ and thus $m/n=2$.
There is no need of any advanced tools like LHospital or Taylor series. 
A: Hint:
Use Taylor's expansion of the numerator: $\;\cos x^n=1-\dfrac {x^{2n}}2+o(x^{2n})$, so
$$\mathrm e^{\cos x^n}=\mathrm e^{1-\tfrac {x^{2n}}2+o(x^{2n})}=\mathrm e\Bigl(1-\frac {x^{2n}}2+o(x^{2n})\Bigr).$$
Can you proceed?
A: $$l = \lim_{x\to0}\frac{e^{\cos(x^n)}-e}{x^m} = -\frac{e}{2}$$
Applying L'hopital's rule,
$$\lim_{x\to0}\frac{-e^{\cos(x^n)}\cdot\sin(x^n)\cdot nx^{n-1}}{mx^{m-1}} = -\frac{e}{2}$$
$$-\frac{n}{m}\lim_{x\to0}\frac{ e^{\cos(x^n)}\cdot\sin(x^n)}{x^{m-n}} = -\frac{e}{2}$$
$$\frac{n}{m}\lim_{x\to0} e^{\cos(x^n)}\lim_{x\to0}\frac{\sin(x^n)}{x^{m-n}} = \frac{e}{2}$$
$$\frac{n}{m}\cdot e\lim_{x\to0}\frac{\sin(x^n)}{x^{m-n}} = \frac{e}{2}$$
Now, $\lim_{x\to0}\frac{\sin(x^n)}{x^{m-n}} = 1 $ if $m-n=n$ or $m =2n$
So, 
$$\frac{n}{m}\cdot e\cdot1 = \frac{e}{2}$$
Again it follows $m=2n$ 
So, $$\frac{m}{n} = 2$$
A: L'Hospital works here actually.
$$\lim_{x->0} \frac{e^{\cos(x^n)} - e}{x^m} = \lim_{x \to 0} \frac{-nx^{n-1}\sin(x^n)e^{\cos(x^n)}}{mx^{m-1}} = \lim_{x \to 0}\frac{-nx^{n}\sin(x^n)e^{\cos(x^n)}}{mx^{m}}$$
Now, divide nominator and denominator by $x^{m-n}$ in order to have $x^n$ in denominator (Then we can use the property $\lim_{x \to 0} \frac{\sin(x^n)}{x^n} = 1$)
$$ = \lim_{x \to 0}\frac{-nx^{2n-m}\sin(x^n)e^{\cos(x^n)}}{mx^{n}} = \lim_{x \to 0}\frac{-nx^{2n-m}e}{m} = -\frac{e}{2} \implies \lim_{x \to 0}x^{2n-m} = \frac{m}{2n}$$
$$\implies m = 2n \text{ or } m = 0$$
But in $m = 0$ case, the first expression has a limit not equal to $-\frac{e}{2}$. So $m = 2n$. 
