Calculate the limit $\lim_{x\to 0} \left(\frac 1{x^2}-\cot^2x\right)$ The answer of the given limit is $2/3$, but I cannot reach it. I have tried to use the L'Hospital rule, but I couldn't drive it to the end. Please give a detailed solution!
$$\lim_{x\to 0}  \left(\dfrac 1{x^2}-\cot^2x\right)$$
 A: One may recall that, as $x \to 0$, we have
$$
\cos x= 1-\frac{x^2}2+\frac{x^4}{24}+O(x^6)
$$
$$
\sin x= x-\frac{x^3}6+\frac{x^5}{120}+O(x^6)
$$ and using
$$
\frac1{1-u}=1+u+u^2+O(u^3), \quad u \to 0,
$$ it gives
$$
\cot x = \frac{\cos x}{\sin x}=\frac{1}{x}-\frac{x}{3}+O(x^3)
$$ and
$$
\cot^2 x = \frac{1}{x^2}-\frac23+O(x^2)
$$ Thus, as $x \to 0$,

$$
\frac{1}{x^2}-\cot^2 x=\color{blue}{\frac23}+O(x^2)
$$ 

and the desired limit is $\color{blue}{\dfrac23}$.
A: We can proceed in the following manner
\begin{align}
L &= \lim_{x \to 0}\left(\frac{1}{x^{2}} - \cot^{2}x\right)\notag\\
&= \lim_{x \to 0}\left(\frac{1}{x^{2}} - \frac{\cos^{2}x}{\sin^{2}x}\right)\notag\\
&= \lim_{x \to 0}\frac{\sin^{2}x - x^{2}\cos^{2}x}{x^{2}\sin^{2}x}\notag\\
&= \lim_{x \to 0}\frac{\sin^{2}x - x^{2}\cos^{2}x}{x^{4}}\cdot\frac{x^{2}}{\sin^{2}x}\notag\\
&= \lim_{x \to 0}\frac{\sin^{2}x - x^{2}\cos^{2}x}{x^{4}}\cdot 1^{2}\notag\\
&= \lim_{x \to 0}\frac{\sin x - x\cos x}{x^{3}}\cdot\frac{\sin x + x\cos x}{x}\notag\\
&= \lim_{x \to 0}\frac{\sin x - x\cos x}{x^{3}}\cdot\left(\frac{\sin x}{x} + \cos x\right)\notag\\
&= 2\lim_{x \to 0}\frac{\sin x - x\cos x}{x^{3}}\notag\\
&= 2\lim_{x \to 0}\frac{\cos x - \cos x + x\sin x}{3x^{2}}\text{ (via LHR)}\notag\\
&= \frac{2}{3}\lim_{x \to 0}\frac{\sin x}{x}\notag\\
&= \frac{2}{3}\notag
\end{align}
As I have told often on MSE, LHR is best used with a combination of standard limits and rules of "algebra of limits". When you have to differentiate too many times in applying LHR its a signal that you are going on a laborious path and perhaps there is a simpler route. The above solution looks a bit long because of detailed steps otherwise its very simple.
A: As an alternative to l'Hôpital's rule, consider the Taylor series of $\cot x$:
$$\cot x = \frac1x - \frac13 x - \frac1{45}x^3 - \ldots$$
Therefore,
$$\begin{align}
\cot^2 x &= \frac1{x^2} - \frac23 - \big(\frac2{45} - \frac19\big)x^2 - \ldots\\
&= \frac1{x^2} - \frac23 + \frac1{15}x^2 - \ldots
\end{align}$$
You can now easily take the limit, since the $\frac1{x^2}$ terms will cancel out.
A: Here's a non-series solution.
$$\lim_{x \rightarrow 0} \left(\frac{1}{x^2} - \cot^2(x)\right) = \lim_{x \rightarrow 0} \frac{\sin^2(x) - x^2\cos^2(x)}{x^2\sin^2(x)}$$
Instead of directly doing l'Hospital, we can make our life easier using $\lim_{x \rightarrow 0}\frac{\sin(x)}{x} = 1$ Or rather, $\lim_{x \rightarrow 0}\frac{x}{\sin(x)} = 1$:
$$\lim_{x \rightarrow 0} \frac{\sin^2(x) - x^2\cos^2(x)}{x^2\sin^2(x)} = \lim_{x \rightarrow 0}\left(\frac{x}{\sin(x)}\right)^2\left(\frac{\sin^2(x) - x^2\cos^2(x)}{x^4}\right) = \lim_{x \rightarrow 0} \frac{\sin^2(x) - x^2\cos^2(x)}{x^4}$$
Now l'Hospital. Note that we can freely factor out constants, and also $\cos(x)$ (as it approaches 1 as $x \rightarrow 0$):
\begin{align*} \lim_{x \rightarrow 0} \frac{\sin^2(x) - x^2\cos^2(x)}{x^4} &= \lim_{x \rightarrow 0} \frac{2\sin(x)\cos(x) - 2x\cos^2(x) + 2x^2\sin(x)\cos(x)}{4x^3} \\
&= \frac{1}{2}\lim_{x \rightarrow 0}\frac{\sin(x) - x\cos(x) + x^2\sin(x)}{x^3} \\
&= \frac{1}{2}\lim_{x \rightarrow 0}\frac{\cos(x) - \cos(x) + x\sin(x) + 2x\sin(x) + x^2\cos(x)}{3x^2} \\
&= \frac{1}{6}\lim_{x \rightarrow 0}\frac{3x\sin(x) + x^2\cos(x)}{x^2} \\
&= \frac{1}{6}\left(\lim_{x \rightarrow 0}3\frac{\sin(x)}{x} + \lim_{x \rightarrow 0} \cos(x)\right) \\
&= \frac{1}{6}(3 + 1) = \frac{2}{3}\end{align*}
A: 
Solution by using L-Hospital's rule (no series expansion) 
  $$\lim_{x\to 0} \left(\frac{1}{x^2}-\cot^2 x\right)$$ $$=\lim_{x\to 0} \left(\frac{1}{x^2}-\frac{\cos^2 x}{\sin^2x}\right)$$ $$=\lim_{x\to 0} \left(\frac{\sin^2x-x^2\cos^2 x}{x^2\sin^2x}\right)$$ $$=\lim_{x\to 0} \left(\frac{\sin^2x-x^2(1-\sin^2 x)}{x^2\sin^2x}\right)$$ $$=\lim_{x\to 0} \left(\frac{\sin^2x-x^2+x^2\sin^2 x}{x^2\sin^2x}\right)$$ $$=\lim_{x\to 0} \left(\frac{\sin^2x-x^2}{x^2\sin^2x}+1\right)$$ $$=1+\lim_{x\to 0} \left(\frac{\sin^2x-x^2}{x^2\sin^2x}\right)$$ Now, using L-Hospital's rule as follows $$1+\lim_{x\to 0} \left(\frac{\frac{d}{dx}(\sin^2x-x^2)}{\frac{d}{dx}(x^2\sin^2x)}\right)$$ $$=1+\lim_{x\to 0} \left(\frac{\sin 2x-2x}{x^2\sin 2x+2x\sin^2x}\right)$$ Apply L-H  $$=1+\lim_{x\to 0} \left(\frac{2\cos 2x-2}{2x^2\cos 2x+2x\sin 2x+2x\sin 2x+2\sin^2x}\right)$$ $$=1+\lim_{x\to 0} \left(\frac{2\cos 2x-2}{2x^2\cos 2x+4x\sin 2x+2\sin^2x}\right)$$ Apply L-H $$=1+\lim_{x\to 0} \left(\frac{-4\sin 2x}{-4x^2\sin 2x+4x\cos 2x+8x\cos 2x+4\sin 2x+2\sin 2x}\right)$$ $$=1-4\lim_{x\to 0} \left(\frac{\sin 2x}{-4x^2\sin 2x+12x\cos 2x+6\sin 2x}\right)$$ Apply L-H $$=1-4\lim_{x\to 0} \left(\frac{2\cos 2x}{-8x^2\cos 2x-8x\sin 2x-24x\sin 2x+12\cos 2x+12\cos 2x}\right)$$ $$=1-8\lim_{x\to 0} \left(\frac{\cos 2x}{-8x^2\cos 2x-32x\sin 2x+24\cos 2x}\right)$$ $$=1-8\left(\frac{1}{0-0+24}\right)=1-\frac{8}{24}=1-\frac{1}{3}=\color{blue}{\frac{2}{3}}$$

