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?

Let's first attack the numerator alone, repetitively differentiating until we no longer get zero.  Let $N = \mathrm{e}^{x^2} + 2 \cos x - 3$. 
\begin{align*}
\frac{\mathrm{d}}{\mathrm{d}x} N  &=  2 x \mathrm{e}^{x^2} - 2 \sin x  \xrightarrow{x \rightarrow 0} 0  \text{,}  \\
\frac{\mathrm{d}^2}{\mathrm{d}x^2} N  &=  (4 x^2 +2)\mathrm{e}^{x^2} - 2 \cos x  \xrightarrow{x \rightarrow 0} 0  \text{,}  \\
\frac{\mathrm{d}^3}{\mathrm{d}x^3} N  &=  (8 x^3 +12 x)\mathrm{e}^{x^2} + 2 \sin x  \xrightarrow{x \rightarrow 0} 0  \text{,}  \\
\frac{\mathrm{d}^4}{\mathrm{d}x^4} N  &=  (16 x^4 +48x^2+12)\mathrm{e}^{x^2} + 2 \cos x  \xrightarrow{x \rightarrow 0} 14  \text{.}
\end{align*}
Now let $D = x \sin x^3$.  If any of its first three derivatives are nonzero, our limit is zero.  Otherwise, the fourth derivative will resolve the value of the limit.
\begin{align*}
\frac{\mathrm{d}}{\mathrm{d}x} D &= 3 x^3 \cos x^3 + \sin x^3 \xrightarrow{x \rightarrow 0} 0  \text{,}  \\
\frac{\mathrm{d}^2}{\mathrm{d}x^2} D &= 12 x^2 \cos x^3 - 9x^5  \sin x^3 \xrightarrow{x \rightarrow 0} 0  \text{,}  \\
\frac{\mathrm{d}^3}{\mathrm{d}x^3} D &= (24x - 27 x^7) \cos x^3 - 81 x^4 \sin x^3 \xrightarrow{x \rightarrow 0} 0  \text{,}  \\
\frac{\mathrm{d}^4}{\mathrm{d}x^4} D &= (24 - 432 x^6) \cos x^3 + (-396 x^3 + 81 x^9) \sin x^3 \xrightarrow{x \rightarrow 0} 24  \text{.}
\end{align*}
So the limit is $\frac{14}{24} = \frac{7}{12}$.
