<s>[INST] How many times must I apply L’Hopital? I have this limit:
$$\lim _{x\to 0}\left(\frac{e^{x^2}+2\cos \left(x\right)-3}{x\sin \left(x^3\right)}\right)=\left(\frac 00\right)=\lim _{x\to 0}\frac{\frac{d}{dx}\left(e^{x^2}+2\cos \left(x\right)-3\right)}{\frac{d}{dx}\left(x\sin \left(x^3\right)\right)}$$
$$\lim_{x\to0}\frac{2e^{x^2}x-2\sin \left(x\right)}{\frac{d}{dx}\left(x\right)\sin \left(x^3\right)+\frac{d}{dx}\left(\sin \left(x^3\right)\right)x}=\lim_{x\to0}\frac{2e^{x^2}x-2\sin \left(x\right)}{\sin \left(x^3\right)+3x^3\cos \left(x^3\right)+\sin \left(x^3\right)}$$
but yet we have $(0/0)$. If I apply L’Hopital again, I obtain
$$=\lim_{x\to0}\frac{2\left(2e^{x^2}x^2+e^{x^2}\right)-2\cos \left(x\right)}{15x^2\cos \left(x^3\right)-9x^5\sin \left(x^3\right)}$$
again giving $(0/0)$. But if I apply L’Hopital a thousand times I'll go on tilt. What is the best solution in these cases? With the main limits or applying upper bonds?
 [/INST] You have one too many copies of the $\sin x^3$ in your denominator after the first derivative, so let's take a step back. If you're prepared to use Taylor series,$$\begin{align}e^{x^2}+2\cos x-3&=1+x^2+\frac12x^4+2-x^2+\frac{1}{12}x^4-3+o(x^4)\\&\sim\frac{7}{12}x^4,\\x\sin x^3&\sim x^4,\end{align}$$so the limit is $\frac{7}{12}$.
</s>