$\newcommand{\dollar}{\} \DeclareMathOperator{\erf}{erf} \DeclareMathOperator{\arctanh}{arctanh} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&}$

## Section2.3Differentiability

###### Motivating Questions
• What does it mean graphically to say that a function $f$ is differentiable at $x = a\text{?}$ How is this connected to the function being locally linear?

• How are the characteristics of a function having a limit, being continuous, and being differentiable at a given point related to one another?

In this section we aim to determine whether or not the function has a derivative $f'(a)$ at $x = a\text{.}$

### SubsectionBeing Differentiable at a Point

We recall that a function $f$ is said to be differentiable at $x = a$ if $f'(a)$ exists. Moreover, for $f'(a)$ to exist, we know that the graph of $y = f(x)$ must have a tangent line at the point $(a,f(a))\text{,}$ since the value of $f'(a)$ is precisely the slope of this line. Observe that in order to ask if $f$ has a tangent line at $(a,f(a))\text{,}$ it is necessary for $f$ to be continuous at $x = a\text{:}$ if $f$ fails to have a limit at $x = a\text{,}$ if $f(a)$ is not defined, or if $f(a)$ does not equal the value of $\displaystyle \lim_{x \to a} f(x)\text{,}$ then it doesn't make sense to talk about a tangent line to the curve at this point.

Indeed, it can be proved formally that if a function $f$ is differentiable at $x = a\text{,}$ then it must be continuous at $x = a\text{.}$ Stated differently, if $f$ is not continuous at $x = a\text{,}$ then it is automatically the case that $f$ is not differentiable there. For example, in Figure2.26 below, both $f$ and $g$ fail to be differentiable at $x = 1$ because neither function is continuous at $x = 1\text{.}$ Figure2.26Functions $f$ and $g$ that are not continuous (and hence not differentiable) at $x=1\text{,}$ and a function $h$ that is both continuous and differentiable at $x=1\text{.}$

A natural question to ask at this point is is there a difference between continuity and differentiability? In other words, can a function fail to be differentiable at a point where the function is continuous? To answer these questions, we consider a certain function $f\text{,}$ where the graph of $y=f(x)$ is displayed below in Figure2.27. We notice that $f$ has a sharp corner at the point $(1,1)\text{,}$ and further observe that $f$ is continuous at $x=1$ since $\displaystyle \lim_{x\to1} f(x)=1=f(1)\text{.}$ Figure2.27A function $f$ that is continuous at $x = 1$ but not differentiable at $x = 1\text{;}$ at right, we zoom in on the point $(1,1)$ in a magnified version of the box shown in the left-hand plot.

However, the function $f$ in Figure2.27 is not differentiable at $x = 1$ because $f'(1)$ fails to exist. One way to see this is to observe that $f'(x) = -1$ for every value of $x$ that is less than 1, while $f'(x) = +1$ for every value of $x$ that is greater than 1. That makes it seem that either $+1$ or $-1$ would be equally good candidates for the value of the derivative at $x = 1\text{.}$ Alternatively, we could use the limit definition of the derivative to attempt to compute $f'(1)\text{,}$ and discover that the derivative does not exist. Finally, we can see visually in Figure2.27 that this function does not have a tangent line at $x=1\text{.}$ Regardless of how closely we examine the function by zooming in on $(1,1)$ on the graph of $y=f(x)\text{,}$ it will always look like a V and never like a single line, which tells us there is no possibility for a tangent line there.

### SubsectionVertical Tangent Lines

Another example of when a function can fail to be differentiable at a point $x=a$ is if the function has a vertical tangent at the point. In other words, when $f$ is continuous at $x=a$ and $\displaystyle \lim_{x\to a}|f'(x)|=\infty\text{.}$ This means the tangent lines become very steep as we move closer to $x=a\text{.}$

###### Example2.28

In this example, let $f(x)=\sqrt{x}\text{.}$

In Figure2.29 below, we have the graph of $y=f(x)$ along with a progression of tangent lines at points approaching $(0,0)$ on the graph. As we approach $x=0\text{,}$ we see that the tangent lines drawn become steeper and steeper, ultimately leading to a vertical tangent line at $x=0\text{.}$ Figure2.29As we move closer to $x=0\text{,}$ the tangent lines to the graph of $y=f(x)$ become steeper and steeper. Notice that the tangent line closest to $x=0$ is nearly vertical.

We can also show this by calculating the limit of the derivative close to $x=0\text{:}$

\begin{equation*} \displaystyle \lim_{x\to 0}f'(x)=\lim_{x\to 0}\frac{1}{2\sqrt{x}}=\infty. \end{equation*}

Therefore, $f(x)$ is not differentiable at $x=0 \text{.}$

### SubsectionLinks Between Continuity, Differentiability, and Limits

To summarize the preceding discussion of differentiability, we make several important observations.

• If $f$ is differentiable at $x = a\text{,}$ then $f$ is continuous at $x = a\text{.}$ Equivalently, if$f$ fails to be continuous at $x = a\text{,}$ then $f$ will not be differentiable at $x = a\text{.}$

• A function can be continuous at a point without being differentiable there. In particular, a function $f$ is not differentiable at $x = a$ if the graph has a sharp corner (or cusp) at the point $(a,f(a))\text{.}$

• If $f$ is differentiable at $x = a\text{,}$ then $f$ is locally linear at $x = a\text{.}$ In other words, a differentiable function looks linear when viewed up close because it resembles its tangent line at any given point of differentiability.

###### Example2.30

In this example, let $f$ be the function whose graph is given below in Figure2.31. Figure2.31The graph of $y = f(x)$ for Example2.30.
1. State all values of $a$ for which $f$ is not continuous at $x = a\text{.}$ For each, provide a reason for your conclusion.

2. State all values of $a$ for which $f$ is not differentiable at $x = a\text{.}$ For each, provide a reason for your conclusion.

3. State all values of $a$ for which $f$ is not differentiable, but is continuous at $x = a\text{.}$ Think about why this is the case.

1. At $a = -2 \text{,}$ $\displaystyle \lim_{x\to-2}f(x)$ does not exist; at $a=-1\text{,}$ $\displaystyle \lim_{x\to-1}f(x)\neq f(-1)\text{;}$ at $a=2\text{,}$ $\displaystyle \lim_{x\to2}f(x)$ does not exist; at $a=3\text{,}$ $f(3)$ is undefined.

2. $a = -2, -1, 2, 3\text{,}$ because $f$ is not continuous at these points; $a=-3,1\text{,}$ because $f$ does not have a tangent line at these points.

3. $a = -3,1\text{.}$

Solution
1. $f$ is not continuous at $a = -2, 2$ because at each of these points $\displaystyle \lim_{x\to a}f(x)$ does not exist. $f$ is not continuous at $a = -3$ because $\displaystyle \lim_{x\to -1}f(x)=-3.5\text{,}$ but $f(-1)=1\text{.}$ $f$ is not continuous at $a=3$ because $f(3)$ is not defined.

2. $f$ is not differentiable at $a = -2, -1, 2, 3$ because at each of these points $f$ is not continuous. In addition, $f$ is not differentiable at $a = -3$ and $a = 1$ because the graph of $f$ has a corner point (or cusp) at each of these values.

3. The only two points where $f$ is continuous but not differentiable are $a=-3,1\text{.}$ This is because of the corner point (or cusp). These points fit the criteria for continuity, but there is no discernible tangent line.

###### Example2.32

True or false: if a function $p$ is differentiable at $x = b\text{,}$ then $\displaystyle \lim_{x \to b} p(x)$ must exist. Write at least one sentence to justify your choice.

Hint

What does being differentiable at a point tell you about continuity there?

True.

Solution

We know that a function $f$ is continuous whenever it is differentiable, and that one characteristic of $f$ being continuous at $x=a$ is that $\displaystyle \lim_{x\to a}f(x)$ exists. Therefore the statement if a function $p$ is differentiable at $x = b\text{,}$ then $\displaystyle \lim_{x \to b} p(x)$ must exist is true.

### SubsectionSummary

• A function $f$ is differentiable at $x = a$ whenever $f'(a)$ exists, which means that $f$ has a tangent line at $(a,f(a))$ and thus $f$ is locally linear at $x = a\text{.}$ Informally, this means that the function looks like a line when viewed up close at $(a,f(a))$ and that there is not a corner point or cusp at $(a,f(a))\text{.}$

• Differentiability is a stronger condition than continuity, which is a stronger condition than having a limit. In particular, if $f$ is differentiable at $x = a\text{,}$ then $f$ is also continuous at $x = a\text{,}$ and if $f$ is continuous at $x = a\text{,}$ then $f$ has a limit at $x = a\text{.}$

• A continuous function fails to be differentiable at any point where the graph has a corner point or cusp, or where the graph has a vertical tangent line.

### SubsectionExercises

Consider the graph of the function $y = p(x)$ that is provided in Figure2.33. Assume that each portion of the graph of $p$ is a straight line, as pictured. Figure2.33At left, the piecewise linear function $y = p(x)\text{.}$ At right, axes for plotting $y = p'(x)\text{.}$
1. State all values of $a$ for which $\lim_{x \to a} p(x)$ does not exist.

2. State all values of $a$ for which $p$ is not continuous at $a\text{.}$

3. State all values of $a$ for which $p$ is not differentiable at $x = a\text{.}$

4. On the axes provided in Figure2.33, sketch an accurate graph of $y = p'(x)\text{.}$

For each of the following prompts, give an example of a function that satisfies the stated criteria; a formula or a graph, with reasoning, is sufficient for each. If no such example is possible, explain why.

1. A function $f$ that is continuous at $a = 2$ but not differentiable at $a = 2\text{.}$

2. A function $g$ that is differentiable at $a = 3$ but does not have a limit at $a=3\text{.}$

3. A function $h$ that has a limit at $a = -2\text{,}$ is defined at $a = -2\text{,}$ but is not continuous at $a = -2\text{.}$

4. A function $p$ that satisfies all of the following:

• $p(-1) = 3$ and $\lim_{x \to -1} p(x) = 2$

• $p(0) = 1$ and $p'(0) = 0$

• $\lim_{x \to 1} p(x) = p(1)$ and $p'(1)$ does not exist

Consider the function $g(x) = \sqrt{|x|}\text{.}$

1. Use a graph to explain visually why $g$ is not differentiable at $x = 0\text{.}$

2. Use the limit definition of the derivative to show that

\begin{equation*} g'(0) = \lim_{h \to 0} \frac{\sqrt{|h|}}{h}\text{.} \end{equation*}
3. Investigate the value of $g'(0)$ by estimating the limit in (b) using small positive and negative values of $h\text{.}$ For instance, you might compute $\frac{\sqrt{|-0.01|}}{0.01}\text{.}$ Be sure to use several different values of $h$ (both positive and negative), including ones closer to 0 than 0.01. What do your results tell you about $g'(0)\text{?}$

4. Use your graph in (a) to sketch an approximate graph of $y = g'(x)\text{.}$