Why is this continuous function not differentiable?

106 Views Asked by At

Let $g : \mathbb{R} \to \mathbb{R}$, such that \begin{equation} g(x)=\begin{cases} 2x + 1 & \text{ if } x < 0,\\ e^x & \text{ otherwise}. \end{cases} \end{equation}

I am trying to understand the properties of this function. I already know that it is continuous, as its' components are continuous functions(because $2x+1$ is linear and $e^x$ is exponential).

But I don't understand why it is not differentiable, because I think that the derivates of both of the component functions exist at any given point within the specified ranges ($x<0$ for $2x + 1$ and $x \geq 0$ for $e^x$).

Can you please explain the differentiability of this function?

1

There are 1 best solutions below

0
On

The derivative of the left-half of the function $(2x+1)$ is $2$. The derivative of the right-half of the function for all other $x$-values is $e^x$. Using this information, we can formulate another piecewise function that shows the derivative of $g(x)$.

$g'(x)= \begin{cases} 2 \,, & \text{for} \;\;\; x \lt 0\\ e^x \,, & \text{for} \;\;\; x \ge 0 \end{cases} $

This function seems to support the original claim you made. It clearly shows that $g'(x)$ exists for all real numbers, including $x=0$. However, this is a trap! We have to look at the derivative in the context of the original function. At $x=0$, $g(x)$ has a sharp cusp, which makes it impossible to predict the behavior of the function around that point. And that ruins the whole point of the derivative. If I showed you the function $g(x)$ with the right-half erased, and asked you to draw a line continuing the slope of the left-half, you would probably draw a line continuing with a slope of $2$. It would be impossible for you to know that the right-half follows the slope of $e^x$ instead of $2x+1$.

Also, if you're familiar with the concept of tangent lines showing the instantaneous slope of a function, there would be infinitely many possible tangent lines at $g(0)$, making it impossible to agree on the slope at that point.