At which values of $x$ is $f(x)$ differentiable?

$f(x) = \begin{cases} 1-e^{-x}, & \text{$x \gt 0$} \\ \ln(1-x), & \text{$x\le 0$} \end{cases}$

I first proved that $f(x)$ is continuous for every $x$:

$$ \lim_{x \to 0^+}f(x) = 1-e^{-0} = 0 $$

$$ \lim_{x \to 0^-}f(x) = \ln(1-x) = 0 $$

and $f(0) = 0$, is this OK? was that necessary when proving that a function is differentiable at a point?

Next, I wanna prove the limit using the definition of derivative, so:

$$ \lim_{x\to0^+} \frac{f(x)-f(0)}{x-0} = \frac{1-e^{-x}-(1-e^0)}{x} = \frac{-e^{-x}+e^0}{x} $$

$$ \lim_{x\to0^-} \frac{f(x)-f(0)}{x-0} = \frac{\ln(1-x)-0}{x} = \frac{\ln(1-x)}{x} $$

How do I continue from here? I'm stuck at both sides, some help please?:)



Using the fact that, $\lim_{x\to0}\dfrac{a^x-1}{x}=\log_ea$ (check out when $(a = e)$!)




$\lim_{x\to0^-}\dfrac{\ln(1-x)}{x}$ , (put $ln(1-x)=t$ so that when $x\to0^-$ gives $t\to 0^+$)

Simplifying expression in terms of $t$



Your work is correct. Notice that the limit on the right and on the left are the derivative of $1-e^{-x}$ and $\ln(1-x)$ respectively at $0$ so you need to verify that they are equal.

  • $\begingroup$ can you tell me how to continue to evaluate the expression in the definition of derivative? $\endgroup$ – FigureItOut Dec 29 '14 at 18:27
  • $\begingroup$ You can use the L'Hôpital's rule. $\endgroup$ – user63181 Dec 29 '14 at 18:29
  • $\begingroup$ You don't need LHR here, because of what you pointed out Sami, that these are the definitions of the left- and right- derivatives: $\dfrac {f(x) - f(c)}{x - c} \ \text{as} \ x \to c^{\pm}$ $\endgroup$ – GFauxPas Dec 29 '14 at 20:52
  • $\begingroup$ @Sami Could you do me a favor and upvote this, if you haven't already. I've received two downvotes to enable auto deletion. $\endgroup$ – Namaste Dec 31 '14 at 14:53

Note that you have an error: by definition, $f(0)=\ln(1-0)=0$, and that happens on both "sides" of zero. So,

$$ \lim_{x\to0^+} \frac{f(x)-f(0)}{x-0} = \frac{1-e^{-x}-\color{red}{0}}{x} = \frac{1-e^{-x}-\color{red}{0}}{x}\qquad(1) $$

$$ \lim_{x\to0^-} \frac{f(x)-f(0)}{x-0} = \frac{\ln(1-x)-0}{x} = \frac{\ln(1-x)}{x}\qquad(2) $$

In the first limit, note the numerator tends to $0$ and the denominator to $0$, so we can use L'Hôpital's Rule: $$ (1)\qquad\lim_{x\to0^+}\frac{1-e^{-x}}{x}\overbrace{=}^{\text{LHR}}\lim_{x\to0^+}\frac{e^{-x}}{1}=1$$ For the second limit, note that is of the form $\frac{0}{0}$, so we use L'Hôpital's Rule: $$ (2)\qquad \lim_{x\to0^-}\frac{\ln(1-x)}{x}\overbrace{=}^{\text{LHR}}\lim_{x\to0^-}\frac{-\frac{1}{1-x}}{1}=\lim_{x\to0^-}\frac{1}{x-1}=\frac{1}{0-1}=-1$$

Both limits are different, so $f(x)$ is not differentiable at $x=0$.

  • 1
    $\begingroup$ You can't use LHR on $\dfrac {-e^{-x}}{x} \ \text{as} \ x \to 0^+$. Equation $(1)$ is wrong. $\endgroup$ – GFauxPas Dec 29 '14 at 20:45
  • $\begingroup$ Oh, you're right! Editing my answer now $\endgroup$ – cjferes Dec 30 '14 at 19:52
  • $\begingroup$ Edited! can you review the answer, and if it's correct, remove the downvote? thanks $\endgroup$ – cjferes Dec 30 '14 at 19:54
  • $\begingroup$ I'm afraid you still have $1 - e^{-x} = -e^{-x}$ in $(1)$. $\endgroup$ – GFauxPas Dec 30 '14 at 21:27
  • $\begingroup$ haha, didn't see it. Thanks for the corrections! $\endgroup$ – cjferes Dec 30 '14 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.