Consider
$$f(x)=\begin{cases}
\frac {x}{e^x-1} & \text{if x $\ne$ 0}\\
c & \text{if x = 0}
\end{cases}$$
I know that if $f(x)$ is continuous, then $$c = \lim_{x\to 0} \frac {x}{e^x-1} = 1$$ because $\frac {x}{e^x-1}$ is not continuous at $x=0$. Now I want to find the derivative $f'(0)$. Do I just differentiate $c$ to get $f'(0)=0$ or differentiate $\frac {x}{e^x-1}$ then substitute $x=0$ to get "undefined" as the answer?
2 Answers
The derivative $f'(0)$ is defined by
$$\lim_{h\to 0} \frac{f(0+h)- f(0)}{h}$$
so you are evaluating $f$ at $x$-values other than $c$. So the question comes down to whether the values of $\frac{f(0+h)-f(0)}{h}$ converge to a value (from both sides) around $0$.
Differentiating $c$ is therefore a non-starter (as you've realised); differentiating $\frac{x}{e^x -1}$ is on the right track but you shouldn't just be thinking in terms of substituting $0$ into that derivative.
-
$\begingroup$ Thanks! That means f(x) must be differentiated using limit but not "normal formula" like the quotient rule! $\endgroup$– GeraldSep 29, 2020 at 4:51
-
$\begingroup$ @Gerald You can use the normal formulae to get an expression for the derivative, but should then think about limits rather than just substituting $x=0$ into the result. $\endgroup$– dbmag9Sep 29, 2020 at 5:01
Note that $$f'(0)=\lim_{h\to0}\frac{f(h)-f(0)}{h}=\lim_{h\to0}\frac{\frac{h}{e^h-1}-c}{h}=\lim_{h\to0}\frac{e^h-1-he^h}{(e^h-1)^2}=\lim_{h\to0}\frac{he^h}{2(e^h-1)e^h}=\frac{1}{2}$$
(Using L'Hopital's rule)