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?
 A: I'll keep this at high school level, without Taylor expansion that's quite an advanced topic. So just l'Hôpital and standard limits.
Suppose you have to compute a limit of the form
$$
\lim_{x\to c}\frac{f(x)}{g(x)}\tag{*}
$$
and that you know that, for some function $h$, you also have
$$
\lim_{x\to c}\frac{h(x)}{g(x)}=1
$$
then you can rewrite (*) as
$$
\lim_{x\to c}\frac{f(x)}{h(x)}\frac{h(x)}{g(x)}
$$
As a consequence of the theorems on limits, if
$$
\lim_{x\to c}\frac{f(x)}{h(x)}=l
$$
then also the limit (*) will be $l$ as well.
In your case you can note that
$$
1=\lim_{x\to0}\frac{x^3}{\sin(x^3)}=\lim_{x\to0}\frac{x^4}{x\sin(x^3)}
$$
and so you can reduce to computing
$$
\lim_{x\to0}\frac{e^{x^2}+2\cos x-3}{x^4}
$$
that's much less demanding in terms of l'Hôpital. Let's apply it to get
$$
\lim_{x\to0}\frac{2xe^{x^2}-2\sin x}{4x^3}=\lim_{x\to0}\frac{xe^{x^2}-\sin x}{2x^3}\tag{**}
$$
Now, what's the limit I saw some days ago with the sine and $x^3$? Yes, that one!
$$
\lim_{x\to0}\frac{x-\sin x}{x^3}=\frac{1}{6}
$$
OK, let's subtract and add $x$ in the numerator of (**):
$$
\lim_{x\to0}\frac{xe^{x^2}-x+x-\sin x}{2x^3}=
\lim_{x\to0}\frac{1}{2}\left(\frac{e^{x^2}-1}{x^2}+\frac{x-\sin x}{x^3}\right)
=\frac{1}{2}\left(1+\frac{1}{6}\right)=\frac{7}{12}
$$
A: 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}$.
A: 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}$.
