3.1 Introduction to the Derivative

3.1.1 From Secants to Tangents

We recall the Tangent Line Problem back in Section 2.2.1. Consider a sufficiently well-behaved function f:ℝ→ℝf\colon\mathbb{R}\to\mathbb{R}. We wish to determine the slope of its graph at a precise point P=(c,f⁢(c))P=(c,f(c)).

Because it takes two points to define a line, we artificially construct a second point nearby: Q=(c+Δ⁢x,f⁢(c+Δ⁢x))Q=(c+\Delta x,f(c+\Delta x)). The line passing through PP and QQ is termed a secant line. Its slope is given by the standard “rise over run”:

equation (3.1) (3.1)
msec=riserun=f⁢(c+Δ⁢x)−f⁢(c)(c+Δ⁢x)−c=f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x.m_{\text{sec}}=\frac{\text{rise}}{\text{run}}=\frac{f(c+\Delta x)-f(c)}{(c+% \Delta x)-c}=\frac{f(c+\Delta x)-f(c)}{\Delta x}.
Intuition (Zooming In).

Imagine looking at a smooth curve under a microscope. As you increase the magnification around the point PP, the curve appears flatter and flatter. This local linearity is the essence of differential calculus. By letting Δ⁢x→0\Delta x\to 0, the point QQ slides along the curve toward PP. The secant line gradually pivots and converges to the ultimate geometric object of our desire: the tangent line.

We invoke the magic of limits. As Δ⁢x\Delta x vanishes, the secant slope gracefully approximates the tangent slope:

equation (3.2) (3.2)
mtan=limΔ⁢x→0msec=limΔ⁢x→0f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x.m_{\text{tan}}=\lim_{\Delta x\to 0}m_{\text{sec}}=\lim_{\Delta x\to 0}\frac{f(% c+\Delta x)-f(c)}{\Delta x}.

One we know the tangent slope mtanm_{\text{tan}}, finding the equation of the tangent line to the graph of ff at the point (c,f⁢(c))(c,f(c)) is a trivial exercise in algebra. We simply use the point-slope form:

equation (3.3) (3.3)
y−f⁢(c)=mtan⁢(x−c).y-f(c)=m_{\text{tan}}(x-c).
Moral.

The limit of the difference quotient in (3.1) has many physical meanings and applications that go well beyond the initial geometric intuition of a tangent line. It represents the instantaneous rate of change of any given quantity: velocity, marginal cost, or the flow of heat, etc. This versatility is what motivated Definition 3.1.1.

Definition 3.1.1 (The Derivative at a Point).

Let f:ℝ→ℝf\colon\mathbb{R}\to\mathbb{R} be a function and cc be a real number. If the limit

equation (3.4) (3.4)
limΔ⁢x→0f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x\lim_{\Delta x\to 0}\frac{f(c+\Delta x)-f(c)}{\Delta x}

converges to some real number LL, we say ff is differentiable at cc with derivative LL. We denote this by

f′⁢(c)=L.f^{\prime}(c)=L.

If the limit does not exist—including the case where cc is not even in dom⁡(f)\operatorname{dom}(f)—then we leave f′⁢(c)f^{\prime}(c) undefined and say ff is not differentiable at cc. Furthermore, if ff is differentiable at any point in an open interval II, we say ff is differentiable on II.

Remark 3.1.2 (On Notation).

Calculus suffers from an abundance of historical notation. For the derivative, one might encounter:

f′⁢(c),d⁢fd⁢x⁢(c),Dx⁢f⁢(c),f˙⁢(c),…f^{\prime}(c),\quad\frac{\mathrm{d}f}{\mathrm{d}x}(c),\quad D_{x}f(c),\quad% \dot{f}(c),\quad\dots

Each has its pros and cons depending on the tradition of the subject. The clearest notation, completely free of ambiguities, would technically require the concept of a directional derivative, but we shall leave that for a future chapter on multivariable mathematics. For our immediate needs, the Lagrange notation f′f^{\prime} and the Leibniz notation d⁢fd⁢x\frac{\mathrm{d}f}{\mathrm{d}x} will serve us well.

Remark 3.1.3.

There are several equivalent ways to write the limit (3.4) in Definition 3.1.1. For example, if we use the substitution h=Δ⁢xh=\Delta x, then we can write the derivative as:

equation (3.5) (3.5)
f′⁢(c)=limh→0f⁢(c+h)−f⁢(c)h,f^{\prime}(c)=\lim_{h\to 0}\frac{f(c+h)-f(c)}{h},

provided the limit exists. Alternatively, if we let the moving point x=c+Δ⁢xx=c+\Delta x, we can recast the formulation as:

equation (3.6) (3.6)
f′⁢(c)=limx→cf⁢(x)−f⁢(c)x−c,f^{\prime}(c)=\lim_{x\to c}\frac{f(x)-f(c)}{x-c},

which sometimes offers algebraic simplifications depending on the function.

Let us compute the derivatives of a few basic functions directly from the definition.

Example 3.1.4 (The Constant Function).

Let f⁢(x)=kf(x)=k, where kk is a constant. Let cc be any real number.

limΔ⁢x→0f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x=limΔ⁢x→0k−kΔ⁢x=0.\lim_{\Delta x\to 0}\frac{f(c+\Delta x)-f(c)}{\Delta x}=\lim_{\Delta x\to 0}% \frac{k-k}{\Delta x}=0.

So, f′⁢(c)=0f^{\prime}(c)=0 for any real number cc. Geometrically, this is obvious: a horizontal line has zero slope.

Example 3.1.5 (The Identity Function).

Let f⁢(x)=xf(x)=x, and let cc be a real number.

limΔ⁢x→0f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x=limΔ⁢x→0(c+Δ⁢x)−cΔ⁢x=limΔ⁢x→0Δ⁢xΔ⁢x=1.\lim_{\Delta x\to 0}\frac{f(c+\Delta x)-f(c)}{\Delta x}=\lim_{\Delta x\to 0}% \frac{(c+\Delta x)-c}{\Delta x}=\lim_{\Delta x\to 0}\frac{\Delta x}{\Delta x}=1.

So, f′⁢(c)=1f^{\prime}(c)=1 for any real number cc. Again, perfectly aligned with our understanding that the line y=xy=x has a slope of 11.

Now let us increase the complexity slightly and observe the algebra required to resolve the indeterminate form 0/00/0.

Example 3.1.6 (The Quadratic Function).

Let f⁢(x)=x2f(x)=x^{2}, and let cc be a real number. We proceed via the limit definition:

limΔ⁢x→0f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x=limΔ⁢x→0(c+Δ⁢x)2−c2Δ⁢x=limΔ⁢x→0(c2+2⁢c⁢Δ⁢x+(Δ⁢x)2)−c2Δ⁢x=limΔ⁢x→0Δ⁢x⁢(2⁢c+Δ⁢x)Δ⁢x.\begin{split}\lim_{\Delta x\to 0}\frac{f(c+\Delta x)-f(c)}{\Delta x}&{}=\lim_{% \Delta x\to 0}\frac{(c+\Delta x)^{2}-c^{2}}{\Delta x}\\ &{}=\lim_{\Delta x\to 0}\frac{(c^{2}+2c\Delta x+(\Delta x)^{2})-c^{2}}{\Delta x% }\\ &{}=\lim_{\Delta x\to 0}\frac{\Delta x(2c+\Delta x)}{\Delta x}.\end{split}

Provided Δ⁢x≠0\Delta x\neq 0 (which is strictly true under the limit operation), we can cancel the Δ⁢x\Delta x terms:

limΔ⁢x→0f⁢(c+Δ⁢x)−f⁢(c)Δ⁢x=limΔ⁢x→0(2⁢c+Δ⁢x)=2⁢c.\lim_{\Delta x\to 0}\frac{f(c+\Delta x)-f(c)}{\Delta x}=\lim_{\Delta x\to 0}(2% c+\Delta x)=2c.

So, f′⁢(c)=2⁢cf^{\prime}(c)=2c.

Application. Let us find the tangent line to the graph of f⁢(x)=x2f(x)=x^{2} at the coordinate (2,4)(2,4).

mtan=f′⁢(2)=2⁢(2)=4.m_{\text{tan}}=f^{\prime}(2)=2(2)=4.

Using the point-slope form (3.3):

y−f⁢(2)=mtan⁢(x−2)y−22=4⁢(x−2)y=4⁢x−8+4y=4⁢x−4.\begin{split}y-f(2)&{}=m_{\text{tan}}(x-2)\\ y-2^{2}&{}=4(x-2)\\ y&{}=4x-8+4\\ y&{}=4x-4.\end{split}

3.1.2 The Derivative as a Function

In the previous examples, given a real number cc, if ff is differentiable at cc, we mapped the value c↦f′⁢(c)c\mapsto f^{\prime}(c). Thus, the derivative f′f^{\prime} can itself be viewed as a function from ℝ\mathbb{R} to ℝ\mathbb{R}.

Since it is a function in its own right, we usually revert to the standard independent variable xx. For instance, in Example 3.1.6 where f⁢(x)=x2f(x)=x^{2}, we write:

f′⁢(x)=2⁢x.f^{\prime}(x)=2x.

Thus, both ff and f′f^{\prime} are functions of xx mapping from ℝ→ℝ\mathbb{R}\to\mathbb{R}. This raises a subtle question:

Do we always have dom⁡(f′)=dom⁡(f)\operatorname{dom}(f^{\prime})=\operatorname{dom}(f)?

Caveat (The Shrinking Domain).

The answer is a resounding No. The operation of differentiation is delicate; it requires a certain smoothness that the original function may lack. As a result, taking a derivative can brutally shear away points from the function’s domain. In general, we only have the subset relation dom⁡(f′)⊆dom⁡(f)\operatorname{dom}(f^{\prime})\subseteq\operatorname{dom}(f).

Here is a counterexample. Consider the absolute value function f⁢(x)=|x|f(x)=\left\lvert x\right\rvert. Obviously, dom⁡(f)=ℝ\operatorname{dom}(f)=\mathbb{R}. Let us rewrite f⁢(x)f(x) as a piecewise function:

f⁢(x)={xif ⁢x∈[0,∞)−xif ⁢x∈(−∞,0).f(x)=\begin{cases}x&\text{if }x\in[0,\infty)\\ -x&\text{if }x\in(-\infty,0).\end{cases}

The calculation in Example 3.1.5 shows that f′⁢(x)=1f^{\prime}(x)=1 on (0,∞)(0,\infty) and f′⁢(x)=−1f^{\prime}(x)=-1 on (−∞,0)(-\infty,0) (notice the open intervals here; why do we use open intervals but not closed intervals?) this tells us that at the very least, we have:

dom⁡(f′)⊇(−∞,0)∪(0,∞).\operatorname{dom}(f^{\prime})\supseteq(-\infty,0)\cup(0,\infty).

But what happens at x=0x=0? Let us check rigorously. We must evaluate:

limΔ⁢x→0f⁢(0+Δ⁢x)−f⁢(0)Δ⁢x=limΔ⁢x→0|Δ⁢x|Δ⁢x.\lim_{\Delta x\to 0}\frac{f(0+\Delta x)-f(0)}{\Delta x}=\lim_{\Delta x\to 0}% \frac{\left\lvert\Delta x\right\rvert}{\Delta x}.

At this point, it is clear that we need to know the sign of Δ⁢x\Delta x to evaluate the absolute value. So we must split the limit into one-sided limits:

limΔ⁢x→0+|Δ⁢x|Δ⁢x=limΔ⁢x→0+Δ⁢xΔ⁢x=1,limΔ⁢x→0−|Δ⁢x|Δ⁢x=limΔ⁢x→0−−Δ⁢xΔ⁢x=−1.\begin{split}\lim_{\Delta x\to 0^{+}}\frac{\left\lvert\Delta x\right\rvert}{% \Delta x}&{}=\lim_{\Delta x\to 0^{+}}\frac{\Delta x}{\Delta x}=1,\\[4.30554pt] \lim_{\Delta x\to 0^{-}}\frac{\left\lvert\Delta x\right\rvert}{\Delta x}&{}=% \lim_{\Delta x\to 0^{-}}\frac{-\Delta x}{\Delta x}=-1.\end{split}

Because the right-hand limit (11) and the left-hand limit (−1-1) disagree, the two-sided limit limΔ⁢x→0|Δ⁢x|Δ⁢x\lim_{\Delta x\to 0}\frac{\left\lvert\Delta x\right\rvert}{\Delta x} does not exist.

Consequently, ff is not differentiable at 0. We conclude that

equation (3.7) (3.7)
dom⁡(f′)=(−∞,0)∪(0,∞),\operatorname{dom}(f^{\prime})=(-\infty,0)\cup(0,\infty),

which is a strict subset of dom⁡(f)\operatorname{dom}(f).

Intuition.

The graph of f⁢(x)=|x|f(x)=\left\lvert x\right\rvert has a kink at x=0x=0, which prevents the function to be differentiable at 0.

Exercise 3.1.7 (On openness of the interval in the definition of derivative).

When we define differentiability of a function ff on an interval II in Definition 3.1.1, we require II is open (i.e., II is of the form (a,b)(a,b)). Why?

Exercise 3.1.8.

Can we ever have dom⁡(f)\operatorname{dom}(f) be a strict subset of dom⁡(f′)\operatorname{dom}(f^{\prime})?

Exercise for the reader: Ponder this question. By definition, can one evaluate a difference quotient at cc if f⁢(c)f(c) does not even exist? Those questions about domains will come back when you study power series in Calculus II. 

We conclude this section with a few exercises to build your computational muscle and geometric intuition.

Exercise 3.1.9.

Find the derivative of f⁢(x)=2xf(x)=\frac{2}{x}.

Exercise 3.1.10.

Find the tangent line at x=1x=1 of the function f⁢(x)=xf(x)=\sqrt{x}.

Exercise 3.1.11.

Suppose ff and gg are two differentiable functions on ℝ\mathbb{R} and f′⁢(x)=g′⁢(x)f^{\prime}(x)=g^{\prime}(x) for all real number xx. Can we conclude that f⁢(x)=g⁢(x)f(x)=g(x) for all real number xx?