Solving limit $x$ tending to $0$ for $(\tan(x) - \sin(x))/x^3$ I have a solution which gives the answer as $1$:


*

*Write $\tan(x)$ as $\sin(x)/\cos(x)$.

*Take $\sin(x)$ common, and multiply&divide by $\cos(x)$.

*Rewrite $(1-\cos(x))$ as $2\sin^2(x/2)$

*Apply limit for $\sin(x)/x$, $\sin^2(x/2)/x^2$.

*That leaves me with $1/(2\cos(x))$, which is $1/2$.


That is what I believe to be the right answer: $1/2$.
But, my real question is, why can't I take $1/(x^2)$ common, and rewrite it as $(\tan(x)/x - \sin(x)/x)(1/x^2)$, apply limit to $\tan(x)/x$ and $\sin(x)/x$ and rewrite it as $(1-1)/(x^2)$, which gives me $0$. What is the flaw here? Is there some rule of limits I'm missing here? 
 A: $$\lim_{x\to a}f(x)g(x)=\left(\lim_{x\to a}f(x)\right)\left(\lim_{x\to a}g(x)\right)$$
only if both $\lim_{x\to a}f(x)$ and $\lim_{x\to a}g(x)$ exist.  The flaw is that $\lim_{x\to 0}x^{-2}=\infty$ so you can not apply the limit law.  $1/2$ is the correct answer.
A: Note that $(\frac1{x^2})\to \infty \text{ as } x\to 0$
Now $(\frac{\tan x}x - \frac{\sin x}x)\cdot \frac1{x^2}$ is a type of $0\cdot \infty$ 
which is not clear for us to say something about the convergency of the limit
A: It is perfectly valid to write $$\lim_{x \to 0}\frac{\tan x - \sin x}{x^{3}} = \lim_{x \to 0}\left(\frac{\tan x}{x} - \frac{\sin x}{x}\right)\cdot\frac{1}{x^{2}}$$ The next step where you replace the expression in parentheses with $(1-1)$ is invalid and it is invalid precisely because $(1 - 1) = 0$. Had this been non-zero your idea would have been a valid step irrespective of the fact that the remaining part $\lim_{x \to 0}1/x^{2}$ does not exist.
Please see this answer where I explain how and when we can replace a sub-expression by its limit while evaluating the limit of a complex expression in step by step manner.
