Section 3.2 Definition
The tangent problem solution from the previous section motivates us to define a function in the following way.
Definition 3.2.1.
For a fucntion defined on an interval and a point \(x\) in that interval, we define
\begin{equation*}
f'(x)=\displaystyle \lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
\end{equation*}
for any \(x\) for which this limit exists. We call this function the "derivative" of \(f\) and for any \(x\) where its defined, we say that \(f\) is "differentiable" there. The derivative function \(f'(x)\) is sometimes denoted \(\frac{df}{dx}(x)\text{.}\)For example, suppose the function is just a constant like \(f(x)=k\text{.}\) Think about the graph of that function. It’s just a flat line at a height of \(k\text{.}\) Consequently, regardless of the value of \(x\text{,}\) the tangent line is flat (i.e. \(0\) slope), so when \(f(x)\) is constant, we get \(f'(x)=0\) for all values of \(x\text{.}\) We note here that when the expression for the definition of \(f\) is particularly simple, we often lazily just write the expression down instead of the name of the function. So, for example, we could write \(k'=0\text{.}\)
Here’s another example. Consider \(f(x)=x\text{.}\) The graph of \(x\) is a straight line with slope \(1\text{.}\) So, this is any easy one to get the derivative at any value of \(x\text{.}\) Namely, for \(f(x)=x\text{,}\) we have \(f'(x)=1\) (i.e. \(x'=1\)) for any value of \(x\text{.}\)
So, those two examples don’t require the use of any of our new limit finding skills. They are obvious from geometry. But, In the previous section, we did some of these computations for \(f(x)=x^2\text{.}\) Looking back, you’ll recall we found \(f'(1)=2\text{.}\) Even more, if you worked through the example there doing both of the given \(x\) values, you would have found that \(f'(-.5)=-1\) and \(f'(1.5)=3\text{.}\) So, based on those facts, can you speculate on a general expression for \((x^2)'\text{?}\) Well, let’s use our limit finding skills to compute \(f'(x)\) for a very broad range of \(x\) values all at once. So, suppose \(x\) is, generically, a number in the domain of \(f(x)=x^2\text{.}\) Now,
\begin{equation*}
\begin{array}{llll}
f'(x) \amp = \amp \displaystyle \lim_{h\to 0} \frac{f(x+h)-f(x)}{h} \amp (\text{from definition of derivative}) \\
\amp = \amp \displaystyle \lim_{h\to 0} \frac{(x+h)^2-x^2}{h} \amp (\text{from definition of f}) \\
\amp = \amp \displaystyle \lim_{h\to 0} \frac{x^2+2xh+h^2-x^2}{h} \amp (\text{from basic algebra}) \\
\amp = \amp \displaystyle \lim_{h\to 0} \frac{h(2x+h)}{h} \amp (\text{from basic algebra}) \\
\amp = \amp \displaystyle \lim_{h\to 0} 2x+h \amp (\text{from basic algebra}) \\
\amp = \amp \displaystyle 2x \amp (\text{from limit basics}) \\
\end{array}
\end{equation*}
Notice here that the derivative function requires computing a limit using the value \(f(x)\text{.}\) So, the domain of the derivative is, at most, the domain of \(f\text{.}\) So, does that mean that it is always the case that for every \(x\) in the domain of \(f\text{,}\) we can find \(f'(x)\text{?}\) No. Unfortunately not. Consider for example \(f(x)=|x|\text{.}\) Let’s graph this function near \(x=0\text{.}\)
Think for a moment of the point \((0,0)\) on this graph. It is not entirely clear what the tangent line there should be. There are lots of lines touching that point that don’t "cut" through the graph and could be possible tangent lines. It’s apparent that for \(x \gt 0\) the slope of the tangent line is \(1\) and for \(x \lt 0\) the slope of the tangent line is \(-1\text{.}\) But what about at \(x=0\text{?}\) Well, let’s compute using the definition.
\begin{equation*}
\begin{array}{llll}
f'(0) \amp = \amp \displaystyle \lim_{h\to 0} \frac{f(0+h)-f(0)}{h} \amp (\text{from definition of derivative}) \\
\amp = \amp \displaystyle \lim_{h\to 0} \frac{|0+h|-|0|}{h} \amp (\text{def of absolute value}) \\
\amp = \amp \displaystyle \lim_{h\to 0} \frac{|h|}{h} \amp (\text{def of absolute value}) \\
\end{array}
\end{equation*}
We looked at this limit in the chapter on limits. It turns out that it doesn’t exist as we found \(\displaystyle \lim_{h\to 0^{+}} \frac{|h|}{h} = 1\) but unfortunately \(\displaystyle \lim_{h\to 0^{-}} \frac{|h|}{h} = -1\text{.}\) So, \(f'(x)\) does not exist / is not defined when \(x=0\text{.}\) Apparently, that is generally the case when "cusps" like this exist in the graph.
There is another circumstance where one can see that derivatives do not exist. Specifically, if you look at a function that has a discontinuity somehwere, you would observe that the derivative does not exist there. For example, look at the function
\begin{equation*}
f(x) = \left\{ \begin{array}{cc}
1 \amp 0 \lt x\\
-1 \amp x \le 0
\end{array}
\right.
\end{equation*}
which is graphed here.
Suppose we try to find its derivative at
\(x=0\) (i.e. slope of the tangent line to
\((0,f(0))=(0,-1)\)). To see what it should be from the definition, let’s add tiny positive values of
\(h\) like
\(.5, .2,\) and
\(.1\) to
\(x=0\text{.}\) These give
\(f(.5)=1, f(.2)=1,\) and
\(f(.1)=1\text{.}\) Let’s plot those and see what the lines through those points and
\((0,-1)\) look like.
We see here that the limit of those slopes is positively infinite. In other words, it doesn’t exist. In general it is true that a failure of continuity at a point means that the function can’t be differentiated there. Stated more directly we have ...
Theorem 3.2.2.
If \(f\) is differentiable at a given value in its domain, then it must be continous there too.