<s>[INST] Is the function is differentiable at $0$? Is the function  given by
$\displaystyle  f(x) =  \begin{cases} \dfrac{1}{x\log(2)} - \dfrac{1}{2^x -1}, \quad &x \neq 0, \\ \dfrac{1}{2}  , &x = 0 \end{cases}$
differentiable at $0$ ?
My attempt : $f'(0) =  \frac {f(x)  -f(0)}{x-0}$
$$\lim _{x\to 0}f'(0) = \lim _{x\to 0}\frac {\frac{1}{x\log(2)} - \frac{1}{2^x -1} - \frac{1}{0\log(2)} - \frac{1}{2^0 -1}}{x- 0}$$
$$\lim _{x\to 0}\frac {\frac{1}{x\log(2)} - \frac{1}{2^x -1} - \frac{1}{0} - \frac{1}{0}}{x- 0}$$
Now I am not able  to proceed further.
Any hints /solution   will  be appreciated.
Thanks in advance
 [/INST] The idea is to use an expansion near $x=0$:
$$\frac{1}{2^x-1}=\frac{1}{e^{x \ln(2)}-1}=\frac{1}{1+x \ln(2) +\frac{x^2 \ln(2)^2}{2}+\frac{x^3 \ln(2)^3}{6}-1+o(x^3)}=\frac{1}{x \ln(2) \left(1+\frac{x \ln(2)}{2}+\frac{x^2 \ln(2)^2}{6}+o(x^2) \right)}$$
so near $x=0$:
\begin{align}
f(x)&=\frac{1}{x \ln(2)}-\frac{1}{x \ln(2) \left(1+\frac{x \ln(2)}{2}+\frac{x^2 \ln(2)^2}{6}+o(x^2) \right)}\\
&=\frac{1}{x \ln(2)}-\frac{1}{x \ln(2)} \left(1-\frac{x \ln(2)}{2}-\frac{x^2 \ln(2)^2}{6}+\left(\frac{x \ln(2)}{2}\right)^2+o(x^2) \right)\\
&=\frac{1}{2}+x \left(\frac{\ln(2)}{6}-\frac{\ln(2)}{4} \right)+o(x)
\end{align}
so, as $f(0)=\frac{1}{2}$:
$$\frac{f(x)-f(0)}{x-0}=\frac{\frac{1}{2}-x \frac{\ln(2)}{12}+o(x)}{x}=-\frac{\ln(2)}{12}+o(1)$$
so $f$ is differentiable at $x=0$ and:
$$f'(0)=-\frac{\ln(2)}{12}$$
</s>