Find lim$_{x \to 0}\left(\frac{1}{x} - \frac{\cos x}{\sin x}\right).$ $$\lim_{x \to 0} \left(\frac{1}{x} - \frac{\cos x}{\sin x}\right) = \frac{\sin x - x\cos x}{x\sin x}=  \frac{0}{0}.$$
L'Hopital's: $$\lim_{x \to 0} \frac{f'(x)}{g'(x)} = -\frac{1}{x^2} + \frac{1}{\sin ^2x} = \frac{0}{0}.$$
Once again, using L'Hopital's: $$\lim_{x \to 0} \frac{f''(x)}{g''(x)} = \frac{2}{x^3}- \frac{2\cos x}{\sin ^3x} = \frac{0}{0}\,\ldots$$ The terms are getting endless here. Any help? Thanks. 
 A: $$\begin{align}\lim_{x\to 0}\frac{\sin x-x\cos x}{x\sin x}&=\lim_{x\to 0}\frac{\cos x-(\cos x-x\sin x)}{\sin x+x\cos x}\\&=\lim_{x\to 0}\frac{x\sin x}{\sin x+x\cos x}\\&=\lim_{x\to 0}\frac{x}{1+\frac{x}{\sin x}\cdot \cos x}\\&=\frac{0}{1+1\cdot 1}\end{align}$$
A: Learn to love asymptotics;
$$\frac {\tan x - x}{x \tan x} \sim \frac{x + x^3/3 - x}{x^2} \sim x/3 \to 0$$
A: Use Taylor-MacLaurin at order $2$:
\begin{align*}\frac1x - \frac{\cos x}{\sin x}&=\frac1x - \frac{1-\dfrac{x^2}2+o(x^2)}{x-\dfrac{x^3}6+o(x^3)}=\frac1x-\frac1x\left(\frac{1-\smash[t]{\dfrac{x^2}2}+o(x^2)}{1-\smash[b]{\dfrac{x^2}6}+o(x^2)}\right)\\&=\frac1x-\frac1x\Bigl(1-\frac{x^2}3+o(x^2)\Bigr)= \frac x3+o(x)\underset{x\to 0}{\longrightarrow} 0.\end{align*}
A: $\lim_{x \to 0}\frac{\sin(x)-x\cos(x)}{x\sin(x)}=\lim_{x \to 0}\frac{\cos(x)-\cos(x)+x\sin(x)}{\sin(x)+x\cos(x)}=\lim_{x \to 0}\frac{\sin(x)}{\frac{\sin(x)}{x}+\cos(x)}=0$
A: You have
$$
-\frac{1}{x^2} + \frac{1}{\sin ^2x}
$$
You can't apply L'Hopital's rules to either of the two fractions above since the numerators do not approach $0$ or $\pm\infty$.  But you can first add the fractions and then use L'Hopital's rule:
$$
-\frac{1}{x^2} + \frac{1}{\sin ^2x} = \frac{-\sin^2 x + x^2}{x^2\sin^2 x}
$$
A: $$\lim_{x\to 0} \frac{1}{x}-\frac{\cos(x)}{\sin(x)}=\lim_{x\to 0} \frac{1}{x}-\frac{1}{\tan(x)}=\lim_{x\to 0} \frac{1}{x}-\frac{1}{x+\frac{x^3}{3}+O(x^5)}=\lim_{x\to 0}\frac{1}{x}-\frac{1}{x}=0$$
A: Since no one mentioned it, I will go for the overkill. $\cot z$ is a meromorphic function on the complex plane and $\frac{1}{z}$ is exactly its singular part in the origin, since:
$$ \sin z = z \prod_{n\geq 1}\left(1-\frac{z^2}{n^2\pi^2}\right)\tag{1} $$
implies:
$$ \log \sin z = \log z + \sum_{n\geq 1}\log\left(1-\frac{z^2}{n^2\pi^2}\right)\tag{2} $$
then:
$$ \cot z = \frac{1}{z}-\sum_{n\geq 1}\frac{2z}{n^2\pi^2-z^2}\tag{3} $$
as well as:
$$ \frac{1}{z}-\cot z = 2z\sum_{n\geq 1}\frac{1}{\pi^2 n^2-z^2}=2z\left(\frac{\zeta(2)}{\pi^2}+\frac{\zeta(4)}{\pi^4}z^2+\frac{\zeta(6)}{\pi^6}z^6+\ldots\right)\tag{4}$$
so the wanted limit is just zero. By the way, the last formula allows us to compute the values of the zeta function over the positive even integers in terms of the derivatives of $z\cot z$ at $z=0$.
