<s>[INST] $\lim_{x\to 0}\frac{1}{x}−\frac{2}{e^{2x}−1}$ doesn't get solved as expected A question says $f:\Bbb R\setminus\{0\} \to \Bbb R$, $f(x)=\dfrac{1}{x}−\dfrac{2}{e^{2x}−1}$. The limit as the function approaches $x=0$ is logically $0$, as in;
$\lim \limits_{x \to 0}\dfrac{e^{2x}-1}{2x} = 1$ This function then becomes $\dfrac{1}{x}−\dfrac{2}{2x} =0$
But when I graphed it online, the function approached $1$.
 [/INST] You did an approximation error. When $x\to0$ it is $\frac{2}{e^{2x}-1}=\frac{2}{1+2x+\frac{1}{2}(2x)^2+\text{o}(x^2)-1}=\frac{1}{x+x^2+\text{o}(x^2)}$, so
$$\frac{1}{x}-\frac{2}{e^{2x}-1}=\frac{1}{x}-\frac{1}{x+x^2+\text{o}(x^2)}=\frac{1}{x}\left(1-\frac{1}{1+x+\text{o}(x)}\right)$$
Using the fact that $\frac{1}{1+\varepsilon}=1-\varepsilon+\text{o}(\varepsilon)$ when $\varepsilon \to 0$, you have
$$\frac{1}{x}\left(1-\frac{1}{1+x+\text{o}(x)}\right)=\frac{1}{x}\left(1-1+x+\text{o}(x)\right)=1+\text{o}(1) \to 1 \ \text{when} \ x \to 0$$
</s>