Computing $\lim_{x \to 0} \frac{\cos x - \sqrt{2 - e^{x^2}}}{\ln{(\cos x) + \frac{1}{2} x \sin x}} \cdot \frac{(x+2)^{2017}}{(x-2)^{2015}}$ I'm studying for an exam, but I have trouble with computing the following limit:
$$\lim_{x \to 0}  \frac{\cos x - \sqrt{2 - e^{x^2}}}{\ln{(\cos x) + \frac{1}{2} x \sin x}} \cdot \frac{(x+2)^{2017}}{(x-2)^{2015}}$$
I tried directly plugging in a $0$, but that just results in $\frac{0}{0}$. Using L'Hospital's rule doesn't seem like it would help simplify this. Any help would be appreciated.

As pointed out, you can pull out the terms on the right to get a factor of $-4$.
Next, $$\sqrt{2-e^{x^2}} = \sqrt{2 - 1 - x^2 - \frac{x^4}{2} + O(x^6)} = 1 - \frac{x^2}{2} - \frac{3x^4}{8} + O(x^6)\\
\cos x - \sqrt{2-e^{x^2}} = 1 - \frac{x^2}{2} + \frac{x^4}{24} - 1 + \frac{x^2}{2} + \frac{3x^4}{8} + O(x^6) =  \frac{5x^4}{12} + O(x^6) 
$$
For the denominator:
$$
\log(\cos(x)) = \log \left(1-\frac{x^2}{2} +\frac{x^4}{24} + O(x^6) \right) =  \left(-\frac{x^2}{2} +\frac{x^4}{24} \right)- \frac12 \left(-\frac{x^2}{2} +\frac{x^4}{24} \right)^2+O(x^6)\\=-\frac{x^2}2 - \frac{x^4}{12}+ O(x^6) \\
\log(\cos(x)) +\frac12x\sin x =-\frac{x^2}2 - \frac{x^4}{12} + \frac{x^2}2 -  \frac{x^4}{12}+ O(x^6) = -\frac{x^4}{6} + + O(x^6)
$$
Putting everything together, the $x^4$ cancel each other and we get
$$
\frac{(-4)(\frac5{12})}{ (-\frac16) }= 10
$$
 Please give Dr. Graubner the credit, he got to his answer before I got to the correct value for my answer.
