I want to find the limit of $$\frac{e^x + \frac1{e^x} - 2\cos x}{x\tan x}$$ as $x$ tends to $0$.
My attempt: The limit of $\frac{e^x + 1/e^x - 2cosx}{xtanx}$ should be the same as the limit of $\frac{2 - 2\cos x}{x\tan x}$, which can evaluated using the standard limits of $x/\sin x$ and $((1-\cos x)/x^2)$. But this gives me the answer as $1$, while the correct answer is $2$. I suspect the error is in writing it as $\frac{2 - 2cosx}{xtanx}$, but am unable to see why. Please help.
To give context - I can use only the basic limit laws for algebraic combinations of limits and some standard limits.
You cannot apply partial limits in addition and subtraction. Though, it can be used in products.
\begin{align} \lim_{x \to 0} \frac{e^x + 1/e^x - 2 \cos x}{x \tan x} &=\lim_{x \to 0} \frac{e^x + 1/e^x - 2 \cos x}{x^2} \times \frac{x}{\tan x }\\ &=\lim_{x \to 0} \frac{e^x + 1/e^x - 2 \cos x}{x^2} \times \lim_{x \to 0} \frac{x}{\tan x }\\ &=\lim_{x \to 0} \frac{e^x \color{red}{-1 -x } + 1/e^x \color{red}{-1 +x +2} - 2 \cos x}{x^2}\\ &=\lim_{x \to 0} \frac{ \color{blue}{e^x -1 -x} + \color{red}{e^{-x} -1 +x} +2 \sin ^2 (x/2)}{x^2}\\ &=\lim_{x \to 0} \frac{ \color{blue}{e^x -1 -x}}{x^2} + \lim_{x \to 0} \frac{\color{red}{e^{-x} -1 +x}}{x^2}+ \lim_{x \to 0} \frac{2 \sin ^2 (x/2)}{x^2}\\ \end{align}
Can you proceed using standard limits now?