# 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.

• Do you mean (e^x)^2? – user2825632 Sep 9 '16 at 17:51
• First of all, You can split off the $\dfrac{(x+2)^{2017}}{(x-2)^{2015}}$. That gives a nonzero constant ($-4$) in the limit. Second, do you know Taylor expansions? – Daniel Fischer Sep 9 '16 at 17:54
• Nope, I wrote that correctly. It's e^(x^2). – Radiant Sep 9 '16 at 17:56
• Yeah, I know Taylor expansions but didn't really think of using them. I'll try that now. @Daniel – Radiant Sep 9 '16 at 17:57
• Try it. You'll see that numerator and denominator are $O(x^4)$ (haven't checked whether the biquadratic terms also vanish), so you'd need at least four rounds of L'H if you used that. – Daniel Fischer Sep 9 '16 at 17:59

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.
This is another case of intimidation via use of large numbers. The part $(x + 2)^{2017}/(x - 2)^{2015}$ is a rational function which is defined for $x = 0$ and hence its limit as $x \to 0$ is same as its value at $x = 0$ and thus the limit of this part is $-4$. We can thus proceed as follows \begin{align} L &= \lim_{x \to 0}\dfrac{\cos x - \sqrt{2 - e^{x^{2}}}}{\log\cos x + \dfrac{1}{2}x \sin x}\cdot\frac{(x + 2)^{2017}}{(x - 2)^{2015}}\notag\\ &= -4\lim_{x \to 0}\dfrac{2\cos x - 2\sqrt{2 - e^{x^{2}}}}{2\log\cos x + x \sin x}\notag\\ &= -8\lim_{x \to 0}\dfrac{\cos x - \sqrt{2 - e^{x^{2}}}}{2\log\cos x + x \sin x}\notag\\ &= -8\lim_{x \to 0}\dfrac{\cos^{2} x - (2 - e^{x^{2}})}{\{2\log\cos x + x \sin x\}\{\cos x + \sqrt{2 - e^{x^{2}}}\}}\notag\\ &= -4\lim_{x \to 0}\dfrac{\cos^{2} x - (2 - e^{x^{2}})}{2\log\cos x + x \sin x}\tag{1} \end{align} Now we can see that $$\frac{d}{dx}\log\cos x = -\tan x = -x - \frac{x^{3}}{3} + o(x^{3})$$ and hence via integration it follows that $$\log\cos x = - \frac{x^{2}}{2} - \frac{x^{4}}{12} - o(x^{4})$$ so that $$2\log\cos x + x\sin x = - \frac{x^{4}}{3} + o(x^{4})\tag{2}$$ and clearly $$\cos^{2}x - 2 + e^{x^{2}} = \frac{\cos 2x + 2e^{x^{2}} - 3}{2} = \frac{5x^{4}}{6} + o(x^{4})\tag{3}$$ It should now be obvious from equations $(1), (2)$ and $(3)$ that the desired limit is $$-4\cdot\frac{5/6}{-1/3} = 10$$ I have tried to get the required Taylor series expansion for $\log\cos x$ without using any tedious calculation.
for the first factor we get by the rules of L'Hospital $$-\frac{5}{2}$$