Computing $\lim_{x\to 0}\left(\frac{\cot(x)}{x^3}-\frac{1}{x^4}+\frac{1}{3x^2}\right)$ I am trying to compute the following limit:
$$\lim_{x\to 0}\left(\frac{\cot(x)}{x^3}-\frac{1}{x^4}+\frac{1}{3x^2}\right)$$
I have tried by rewriting it as $\lim_{x\to 0}\left(\frac{3x+(x^3-3)\tan(x)}{3x^4 \tan(x)}\right)$ and applying De l'Hopital's Rule but the expression quickly becomes unmanageable:
$$\lim_{x\to 0}\left(\frac{3x+(x^3-3)\tan(x)}{3x^4 \tan(x)}\right)\overset{H}{=}\lim_{x\to 0}\frac{3+(x^2 - 3) \sec^2(x) + 2 x \tan(x)}{3 x^3 (4 \tan(x) + x \sec^2(x))}$$
so I then tried by using the Maclaurin expression for $\tan(x)$:
\begin{align*}
\lim_{x\to 0}\left(\frac{\cot(x)}{x^3}-\frac{1}{x^4}+\frac{1}{3x^2}\right)&=\lim_{x\to 0}\frac{1}{x^2}\left(\frac{x-\tan(x)}{x^2\tan(x)}+\frac{1}{3}\right)=\lim_{x\to 0}\frac{1}{x^2}\left(\frac{x-\left(x+\frac{x^3}{3}+\frac{2}{15}x^5\right)}{x\left(\frac{x^3}{3}+\frac{2}{15}x^5\right)}+\frac{1}{3}\right)\\
&=\lim_{x\to 0}\frac{1}{x^2}\left(\frac{-\frac{1}{3}-\frac{2}{15}x^2}{1+\frac{x^2}{3}+\frac{2}{15}x^4}+\frac{1}{3}\right)=+\infty\cdot 0
\end{align*}
and I got an indeterminate form.
I am currently out of ideas so I would appreciate some help in figuring this out, thanks.

EDIT: It just occurred to me that
\begin{align*}
\lim_{x\to 0}\frac{1}{x^2}\left(\frac{-\frac{1}{3}-\frac{2}{15}x^2}{1+\frac{x^2}{3}+\frac{2}{15}x^4}+\frac{1}{3}\right)=\lim_{x\to 0}\frac{1}{x^2}\left(\frac{-\frac{1}{3}-\frac{2}{15}x^2+\frac{1}{3}+\frac{1}{9}x^2+\frac{2}{45}x^4}{1+\frac{x^2}{3}+\frac{2}{15}x^4}\right)\\ \lim_{x\to 0} \frac{1}{x^2}\left(\frac{-\frac{1}{45}x^2+\frac{2}{45}x^4}{1+\frac{x^2}{3}+\frac{2}{15}x^4}\right)=\lim_{x\to 0}\frac{-\frac{1}{45}+\frac{2}{45}x^2}{1+\frac{x^2}{3}+\frac{2}{15}x^4}=-\frac{1}{45}.
\end{align*}
 A: To calculate $\lim_{x\to 0}\frac{1}{x^2}\left(\frac{-\frac{1}{3}-\frac{2}{15}x^2}{1+\frac{x^2}{3}+\frac{2}{15}x^4}+\frac{1}{3}\right)$ I suggest making it a single fraction:
$$\frac{1}{x^2}\left(\frac{-\frac{1}{3}-\frac{2}{15}x^2}{1+\frac{x^2}{3}+\frac{2}{15}x^4}+\frac{1}{3}\right) = \frac{\frac13\left(1+\frac{x^2}3+\frac2{15}x^4\right)-\frac{1}{3}-\frac{2}{15}x^2}{x^2\left(1+\frac{x^2}{3}+\frac{2}{15}x^4\right)}=\frac{\frac{x^2}9-\frac2{15}x^2+\frac{2}{45}x^4}{x^2\left(1+\frac{x^2}{3}+\frac{2}{15}x^4\right)}=\frac{-\frac1{45}x^2+\frac2{45}x^4}{x^2\left(1+\frac{x^2}3+\frac2{15}x^4\right)}$$
Can you take it from here?
A: Using
$$ \lim_{x\to 0}\frac{\tan x}{x}=1$$
you have
$$\lim_{x\to 0}\left(\frac{\cot(x)}{x^3}-\frac{1}{x^4}+\frac{1}{3x^2}\right)=\lim_{x\to 0}\left(\frac{3x+(x^2-3)\tan(x)}{3x^4 \tan(x)}\right)=\lim_{x\to 0}\left(\frac{3x+(x^2-3)\tan(x)}{3x^4\cdot x}\right)\frac{x}{\tan x}=\lim_{x\to 0}\left(\frac{3x+(x^2-3)\tan(x)}{3x^5}\right). $$
Now you can use LH'opital's Rule.
A: This example is much simpler to solve if one first simplifies to a common denominator...
$$
\lim_{x\to 0}\left(\frac{\cot(x)}{x^3}-\frac{1}{x^4}+\frac{1}{3x^2}\right)=\lim_{x\to 0}\left(\frac{3x\cot(x)-3+x^2}{3x^4}\right)
$$
... and then uses a series expansion for $\cot(x)$ to understand the behavior of the numerator.
$$
\lim_{x\to 0}\left(\frac{3x(\frac{1}{x}-\frac{x}{3}-\frac{x^3}{45}-\frac{2x^5}{945}-\dots)-3+x^2}{3x^4}\right)
$$
If you simplify the first two terms, $3x(1/x-x/3)=3-x^2$, then you see that this is cancelled out the two last terms in the denominator.
$$
\lim_{x\to 0}\left(\frac{3x(-\frac{x^3}{45}-\frac{2x^5}{945}-\dots)}{3x^4}\right)=\lim_{x\to 0}\left(\frac{(-\frac{x^3}{45}-\frac{2x^5}{945}-\dots)}{x^3}\right)=\lim_{x\to 0}\left(-\frac{1}{45}-\frac{2x^2}{945}-\dots\right)
$$
which is now easy to solve since all the expanded terms (except the first) go to zero in the limit.
A: The expression under limit can be written as $$\frac{3x-3\tan x+x^2\tan x}{3x^4\tan x}$$ Since $(\tan x) /x\to 1$ the desired limit is equal to the limit of $$\frac{3x-3\tan x+x^2\tan x}{3x^5}$$ Adding and subtracting $x^3$ in numerator we see that the expression can be rewritten as $$\frac{3x-3\tan x+x^3}{3x^5}+\frac{\tan x-x} {3x^3}$$ The last fraction tends to $1/9$ (via L'Hospital's Rule or Taylor expansion) and thus we need to evaluate the limit $L$ of first fraction above and get desired answer as $L+(1/9)$.
To get $L$ we can apply L'Hospital's Rule to get the expression $$\frac{1-\sec^2x+x^2} {5x^4} =\frac{x^2-\tan^2x}{5x^4}$$ which can be written as $$\frac{1}{5}\left(1+\frac{\tan x} {x} \right) \cdot\frac{x-\tan x} {x^3}$$ so that $$L=\frac{1}{5}\cdot 2\cdot \left(-\frac{1}{3}\right)=-\frac{2}{15}$$ The desired limit is $L+(1/9)=-1/45$. In the entire process L'Hospital's Rule has been used twice.
