# Differentiability issue with this function

$f:D\to{R}$ $$f(x)=\frac{1}{x-2}e^{\left|x\right|}$$

Find the domain $D$ of the function and study whether the function is differentiable. Find the left and right derivatives in the points where the function isn't differentiable.

Since we have $x-2$ as the denominator I have to have $x\ne2$ which would give me $f\colon \mathbb{R}\setminus \{2\} \to \mathbb{R}$, that being the domain $D$ of the function.

As for differentiability, I write the function as follows:

$$f(x)=\left\{\begin{array}{cc} \frac{1}{x-2}e^x & x \ge 0 \\ \frac{1}{x-2}e^{-x} & x<0 \end{array}\right.$$

I then tried to find the left and right derivatives of the function in $x=0$ since I know that if they're equal, the function is differentiable.

I got $f'_s(0)=\frac{1}{4}$ and $f'_d(0)=-\frac{3}{4}$ which means the function isn't differentiable?

Was my thought process and work done right? I feel as if I have some kind of error. Also, shouldn't I check whether the function is differentiable in $x=2$ and find the left and right derivatives in that point as well?

• Your work looks good to me. As you state, the function isn't even continuous at x = 2 (there isn't even some convenient value you can set f(2) to which would make it continuous), so differentiability at x = 2 isn't meaningful. – lulu Jul 7 '15 at 14:40
• Yeah, but I have to calculate the side derivatives in points where the function isn't differentiable, so if it isn't at $x=2$ then I have to calculate them there too. Thanks for the reply! – MikhaelM Jul 7 '15 at 14:44
• also your limites are ok, thus the function isn't differentiable at the point $x=0$ – Dr. Sonnhard Graubner Jul 7 '15 at 14:46
• It seems that you only proved that the derivative is discontinuous at $0$. You have not shown that the derivative fails to exist. To do this, revert to the definition. All you really need to show is that the derivative of $|x|$ does not exits at $x=0$. If it did, then since composites of differentiable functions are differentiable, $e^{|x|}/(x-2)$ would be differentiable. If you don't like that, show that $e^{|x|}$ fails to be differentiable at $0$. Take $\lim_{h\to 0}\frac{e^{|h|}-1}{h}$ and see that you're back to taking $\lim_{h\to 0}\frac{|h|}{h}$, which does not exist. – Mark Viola Jul 7 '15 at 15:10
• I didn't prove continuity or discontinuity, I think. I had limits of $f'(x)$ - the derivative, when $x\to0$ left and right, and I proved that those aren't equal, which according to what I know, would mean that the function isn't differentiable at x=0 ... From what I can tell the function is actually continuous at $x=0$ since $f_d(0) = f_s(0)=f(0)$ – MikhaelM Jul 7 '15 at 15:18