# Error calculating the limit $\lim_{x \to 0}{\frac{x-\tan(x)}{x^2 \cdot \sin(x)}}$

Given this limit:

$$\lim_{x \to 0}{\frac{x-\tan(x)}{x^2 \cdot \sin(x)}}$$

Wolfram says the result is $\frac{1}{3}$ , but I tried to solve it and I get 0:

$$\lim_{x \to 0}{\frac{x \cdot (1-\frac{\tan(x)}{x})}{x \cdot (x \cdot \sin(x))}} =$$ $$\lim_{x \to 0}{\frac{1-\frac{\tan(x)}{x}}{x \cdot \sin(x)}} =$$ $$\lim_{x \to 0}{\frac{1}{x \cdot \sin(x)}} - \frac{1}{x \cdot \sin(x)} = 0$$

This because $\lim_{x \to 0}{\frac{\tan(x)}{x}} = 1$

But the result is wrong.

I would like to know not only it's right solution, but also (and specially) what's wrong in this attempt to solve it.

• What is this $tg$ function? – Nick Peterson Jul 12 '13 at 20:47
• It's tangent, isn't tg a correct way to represent it? – Ramy Al Zuhouri Jul 12 '13 at 20:49
• @nrpeterson it's tangent. In some countries mathematicians use tg notation over tan. – Kaster Jul 12 '13 at 20:50
• Error is in going from next to last line to last line. Both $\frac{1}{x\sin x}$ and $\frac{\tan x/x}{x\sin x}$ blow up. That tells you nothing about what happens to their difference. – André Nicolas Jul 12 '13 at 21:03

By the Taylor series we have $$\tan x=x+\frac{x^3}{3}+O\left(x^5\right)$$ and $$\sin x=x+O(x^2)$$ so

$$\lim_{x\to0}\frac{x-\tan(x)}{x^2 \cdot \sin(x)}=\lim_{x\to0}\frac{-\frac{x^3}{3}+O\left(x^5\right)}{x^3+O(x^4)}=-\frac{1}{3}$$

• Should it be $sin(x)= x + O(x^3)$ ? – Ramy Al Zuhouri Jul 12 '13 at 21:12
• Since $\sin x= x +0 x^2- x^3/6+\cdots$ so we can write also $\sin x =x+O(x^2)$ but what you're writing is the most known. – user63181 Jul 12 '13 at 21:20

Sombody else has already shown you a way to compute the limit yourself; let me explain the problem with your attempt.

The issue here is that this last step is in an indeterminate form "$\infty-\infty$", which need not tend to 0.

Think about it this way: consider $x^2$ and $(1+\frac{1}{x})x^2$. As $x\rightarrow\infty$, clearly $1+\frac{1}{x}\rightarrow1$; but $$\left(1+\frac{1}{x}\right)x^2-x^2=x\rightarrow\infty\text{ as }x\rightarrow\infty.$$

• Thank you,I have accepted that answer but this one was very useful too. – Ramy Al Zuhouri Jul 12 '13 at 21:04

This example has the same problem: \begin{align} \lim_{x\to0}\frac{(1+x)-1}{x} &=\lim_{x\to0}\left(\frac{1+x}{x}-\frac{1}{x}\right)\\ &=\lim_{x\to0}\left(\frac{1}{x}-\frac{1}{x}\right)\\[6pt] &=0 \end{align} It is not permitted to take the limit of a piece of an expression before the other parts.

On the other hand, since we are subtracting exact equals, we can do \begin{align} \lim_{x\to0}\frac{(1+x)-1}{x} &=\lim_{x\to0}\left(\frac{1+x}{x}-\frac{1}{x}\right)\\ &=\lim_{x\to0}\left(\frac{x}{x}\right)\\[6pt] &=1 \end{align}

Now, let's evaluate the limit is a couple of ways.

Without using calculus, we cam work from this answer and subtract $(10)$ from $(9)$ to get $$\lim_{x\to0}\frac{\tan(x)-x}{x^3}=\frac13$$ Divide by $$\lim_{x\to0}\frac{\sin(x)}{x}=1$$ (proven geometrically here) to get $$\lim_{x\to0}\frac{\tan(x)-x}{x^2\sin(x)}=\frac13$$ We can also use L'Hospital \begin{align} \lim_{x\to0}\frac{\tan(x)-x}{x^2\sin(x)} &=\lim_{x\to0}\frac{\tan(x)-x}{x^3}\lim_{x\to0}\frac{x}{\sin(x)}\\ &=\lim_{x\to0}\frac{\sec^2(x)-1}{3x^2}\lim_{x\to0}\frac{1}{\cos(x)}\\ &=\lim_{x\to0}\frac{2\sec^2(x)\tan(x)}{6x}\cdot1\\ &=\frac13\lim_{x\to0}\sec^2(x)\lim_{x\to0}\frac{\tan(x)}{x}\\ &=\frac13\cdot1\cdot\lim_{x\to0}\frac{\sec^2(x)}{1}\\ &=\frac13 \end{align}

As $$\lim_{x \to 0}{\frac{x-\tan(x)}{x^2 \cdot \sin(x)}}$$ is of the form $\frac\infty\infty,$

We can utilize L'Hôpital's rule, too.

So, $$\lim_{x \to 0}{\frac{x-\tan(x)}{x^2 \cdot \sin(x)}}=\lim_{x \to 0}\frac{1-\sec^2x}{2x\sin x+x^2\cos x}=-\lim_{x \to 0}\frac{\tan^2x}{2x\sin x+x^2\cos x}$$

$$=-\lim_{x \to 0}\frac{\sin^2x}{\cos^2x(2x\sin x+x^2\cos x)}$$

$$= -\left(\lim_{x \to 0}\frac{\sin x}x\right)^2\cdot\frac1{\lim_{x \to 0}\cos^2x\cdot \left(2\lim_{x \to 0}\frac{\sin x}x+\lim_{x \to 0}\cos x\right)}$$ (Dividing the numerator & the denominator by $x^2$ )

Now, we know, $\lim_{h\to0}\frac{\sin h}h=?$ and $\lim_{h\to0}\cos h=?$

\begin{align} &\lim_{x \to 0}{\frac{1-\frac{\tan(x)}{x}}{x \cdot \sin(x)}}\\ &=\lim_{x \to 0}{\left(\frac{1}{x \cdot \sin(x)}-\frac{\frac{\tan(x)}{x}}{x \cdot \sin(x)}\right)}\\ &\neq\lim_{x \to 0}{\left(\frac{1}{x \cdot \sin(x)}-\frac{\lim_{x \to 0}{\frac{\tan(x)}{x}}}{x \cdot \sin(x)}\right)}\\ &=\lim_{x \to 0}{\left(\frac{1}{x \cdot \sin(x)}-\frac{1}{x \cdot \sin(x)}\right)}\\ &=\lim_{x \to 0}{0}=0 \end{align}