# Find $\lim _{x\to 0}\left(\frac{\cos \left(xe^x\right)-\cos \left(xe^{-x}\right)}{x^3}\right)=?$

$$\lim _{x\to 0}\left(\frac{\cos \left(xe^x\right)-\cos \left(xe^{-x}\right)}{x^3}\right)=?$$

Trig transformations and such don't seem to help at all, and L'Hospitals rule just complicates matters even more. So how would you solve this limit, thanks.

• By the way, it may be long but using L'Hospital three times does give the answer. – Vincenzo Oliva Jan 27 '16 at 8:29

Since $\cos t=1-t^2/2+o(t^3)$, we have $$\cos(xe^x)-\cos(xe^{-x})= -\frac{1}{2}x^2e^{2x}+\frac{1}{2}x^2e^{-2x}+o(x^3)$$ Now it should be quite easy.

Without Taylor:

By the difference of two cosines,

$$\frac{\cos(xe^x)-\cos(xe^{-x})}{x^3}=-2\frac{\sin(x\cosh(x))\sin(x\sinh(x))}{x^3}.$$

Then

$$-2\frac{\sin(x\cosh(x))\sin(x\sinh(x))}{x^3}=-2\frac{\sin(x\cosh(x))}{x\cosh(x)}\frac{\sin(x\sinh(x))}{x\sinh(x)}\cosh(x)\frac{\sinh(x)}x$$

which tends to $-2\cdot1\cdot1\cdot1\cdot1.$

• Elegant, for sure ! – Claude Leibovici Jan 27 '16 at 8:55
• @ClaudeLeibovici: I was too lazy to compute the Taylor of the composed function :) – Yves Daoust Jan 27 '16 at 9:01

$\cos(xe^x) = 1 - \dfrac{x^2e^{2x}}{2} + \dfrac{x^4e^{4x}}{24} + O(x^6)$, and $\cos(xe^{-x}) = 1-\dfrac{x^2e^{-x}}{2}+\dfrac{x^4e^{-4x}}{24} + O(x^6)$. You can take it from here.

Taylor series would help $$\cos(y)=1-\frac{y^2}{2}+\frac{y^4}{24}+O\left(y^5\right)$$ $$\cos(xe^x)=1-\frac 12 xe^x+\frac 1{24} (xe^x)^2+\cdots$$ $$xe^x=x+x^2+\frac{x^3}{2}+\frac{x^4}{6}+O\left(x^5\right)$$ $$\cos(xe^x)=1-\frac{x^2}{2}-x^3-\frac{23 x^4}{24}+O\left(x^5\right)$$ Do the same for the second term.