<s>[INST] Two methods lead to different answers Question: 

Evaluate limit
  $$\lim_{x\to 0}\frac{10^x-2^x-5^x+1}{x\tan x}$$

My attempt:
$$\lim_{x\to 0}\frac{10^x-2^x-5^x+1}{x\tan x}$$
$$= \lim_{x\to 0}\frac{(10^x-1)-(2^x-1)-(5^x-1)}{x\tan x}$$
$$= \lim_{x\to 0}\frac{(10^x-1)/x-(2^x-1)/x-(5^x-1)/x}{\tan x}$$
Now using identity $\lim_{x\to 0} \frac{a^x-1}{x}=\ln a$, we get:
$$= \lim_{x\to 0}\frac{\ln 10-\ln5-\ln2}{\tan x}= \lim_{x\to 0}\frac{\ln 1}{\tan x}= \lim_{x\to 0}\frac{0}{\tan x}= 0$$

The answer however is obviously wrong. I have the correct solution in my school book. But I wish to know why my solution is wrong. I have consulted my classmates but none of them can see the problem here either.
 [/INST] This may be solved with Taylor approximations.  Recall that
$$e^x=1+x+\frac12x^2+\mathcal O(x^3)$$
It thus follows that
$$\frac{a^x-1}x=\ln(a)+\frac{\ln^2(a)}2x+\mathcal O(x^2)$$
And
$$\frac{10^x-1}x-\frac{2^x-1}x-\frac{5^x-1}x=\left[\frac{\ln^2(10)-\ln^2(2)-\ln^2(5)}2\right]x+\mathcal O(x^2)$$
Now recall that $\lim_{x\to0}\frac{\tan(x)}x=1$, so
$$\begin{align}\frac{10^x-2^x-5^x+1}{x\tan(x)}&=\frac{\frac{10^x-1}x-\frac{2^x-1}x-\frac{5^x-1}x}{\tan(x)}\\&=\frac{\left[\frac{\ln^2(10)-\ln^2(2)-\ln^2(5)}2\right]x+\mathcal O(x^2)}{\tan(x)}\\&=\frac{\frac{\ln^2(10)-\ln^2(2)-\ln^2(5)}2+\mathcal O(x)}{\frac{\tan(x)}x}\\&\to\frac{\frac{\ln^2(10)-\ln^2(2)-\ln^2(5)}2+0}1\end{align}$$

$$L=\frac{\ln^2(10)-\ln^2(2)-\ln^2(5)}2$$
  $$=\ln5\ln2$$

</s>