So I have two examples:
- $ \displaystyle\lim_{x \to 0} \frac{\cos(xe^x) - \cos(xe^{-x})}{x^3} $
- $\displaystyle\lim_{x \to 0} \frac{xe^{-\frac{x}{2}} - \sin(\ln(1+x))}{x^3}$
Using the same rules:
$e^x \sim 1+x$
$\sin(x) \sim x$
$\ln(1+x) \sim x$
$\cos(x) \sim 1 - \frac{x^2}{2}$
I get $-2$ for the first limit, which is the right answer, but I get $+\infty$ for the second one, but that answer is wrong. Can someone explain me how this works or tell me where to look up more about this way of solving limits. It seems that I'm missing something important here.
The way I solved them is just by replacing $\sin(x)$ with $x$ and so on.
The infinitesimals you have used are insufficient for the numerator of the second problem. Both \begin{align*} \left. \left( \frac{\mathrm{d}}{\mathrm{d}x} \left( x \mathrm{e}^{-x/2} - \sin(\ln(x+1)) \right) \right) \right|_{x \rightarrow 0} &= 0 \text{ and } \\ \left. \left( \frac{\mathrm{d}^2}{\mathrm{d}x^2} \left( x \mathrm{e}^{-x/2} - \sin(\ln(x+1)) \right) \right) \right|_{x \rightarrow 0} &= 0 \text{.} \end{align*} So you need to raise the order of approximation. \begin{align*} \mathrm{e}^x &\sim 1+x+\frac{x^2}{2} &&\text{,} \\ \sin(x) &\sim x - \frac{x^3}{6} &&\text{, and } \\ \ln(1+x) &\sim x - \frac{x^2}{2} + \frac{x^3}{3} \text{,} \end{align*} where we do not extend the series for sine because it is of third order. Notice we only extend enough to ensure that we get all terms in $x^3$ and of lower degree. To see that: