Regarding $\lim \limits_{x \to 0} \frac{e^x-1}{\sqrt{1-\cos x}}$ Question:

Find the limit of: $$\lim_{x \to 0} \frac{e^x-1}{\sqrt{1-\cos x}}$$

My approach:
By rationalizing the denominator, we get:
$$\lim_{x \to 0} \frac{(e^x-1)(\sqrt{1+\cos x})}{\sin x}$$
Dividing both the numerator and the denominator by $x$:
$$\lim_{x \to 0} \frac{\frac{(e^x-1)}{x}(\sqrt{1+\cos x})}{\frac{\sin x}{x}}$$
It is known that:
$$\lim_{x \to 0}\frac{(e^x-1)}{x} = 1$$
$$\lim_{x \to 0}\frac{\sin x}{x} = 1$$
Thus, simplifying, we get the answer to be $\sqrt2$
However, it is given that the function is divergent at $x = 0$ and thus the limit is undefined. Why is this so?
 A: What you did is wrong, remember that
$$|\sin x|=\begin{cases}\sin x&if\ x\in[0,\pi]\\ -\sin x&if\ x\in[0,-\pi]\end{cases}.$$
So,
$$\frac{e^x-1}{\sqrt{1-\cos x}}=\frac{(e^x-1)\sqrt{1+\cos x}}{\underbrace{\sqrt{1-\cos^2x}}_{=|\sin x|}}=\frac{(e^x-1)\sqrt{1+\cos x}}{|\sin x|}$$
and thus,
$$\lim_{x\to 0^+}\frac{e^x-1}{\sqrt{1-\cos x}}=\lim_{x\to 0^+}\frac{(e^x-1)\sqrt{1+\cos x}}{\sin x}=\sqrt 2$$
and 
$$\lim_{x\to 0^-}\frac{e^x-1}{\sqrt{1-\cos x}}=\lim_{x\to 0^-}\frac{(e^x-1)\sqrt{1+\cos x}}{-\sin x}=-\sqrt 2.$$
Therefore $$\lim_{x\to 0}\frac{e^x-1}{\sqrt{1-\cos x}}$$ is not defined.
A: Your problem is that in simplifying a square root, you should use the fact that $\sqrt{x^2}=|x|,$ not $x.$  So in your simplification you should have $|\sin x|$ instead of $\sin x.$  Since $\sin$ is an odd function, the limit from the left is negative and from the right is positive.
See https://www.desmos.com/calculator/bagsuuzsjp
A: Using Taylor will also give you a good explanation:
Note this
$$e^{x}=1+x+o(x)$$
And this 
$$\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{4!}+o(x^4)$$
at the neighbourhood of $x=0$, thus
$$e^x-1=x+o(x)$$
And 
$$1-\cos(x)=\frac{x^2}2-\frac{x^4}{4!}+o(x^4)$$
Hence
$$\lim_{x \to 0} \frac{e^x-1}{\sqrt{1-\cos x}}=\lim_{x\to0}\frac{x+o(x)}{\sqrt{\frac12x^2(1-\frac{x^2}{12}+o(x^2))}}=\sqrt2\lim_{x\to0}\frac{x+o(x)}{|x|\sqrt{1-\frac{x^2}{12}+o(x^2)}}$$
Then note that it can be either $x>0$ or $x<0$.I think you are certainly able to take it from here.
A: Using L'Hospitals rule directly:
$\frac{e^x-1}{\sqrt{1-cos x}}=\frac{(e^x-1)'}{(\sqrt{1-cos x})'}=\frac{2 e^x \sqrt{1-cos x}}{sin x}$. Now let $x \rightarrow 0$, what do you observe?
