Lesson 14 of 24
In Progress

The Derivative as a Function

As we have seen, the derivative of a function at a given point gives us the rate of change or slope of the tangent line to the function at that point. If we differentiate a position function at a given time, we obtain the velocity at that time. It seems reasonable to conclude that knowing the derivative of the function at every point would produce valuable information about the behavior of the function. However, the process of finding the derivative at even a handful of values using the techniques of the preceding section would quickly become quite tedious. In this section we define the derivative function and learn a process for finding it.

Derivative Functions

The derivative function gives the derivative of a function at each point in the domain of the original function for which the derivative is defined. We can formally define a derivative function as follows.


Let f be a function. The derivative function, denoted by f^{\prime}, is the function whose domain consists of those values of x such that the following limit exists:f^{\prime}(x)=\underset{h\to 0}{\lim}\frac{f(x+h)-f(x)}{h}.

A function f(x) is said to be differentiable at  if
f^{\prime}(a) exists. More generally, a function is said to be differentiable on  if it is differentiable at every point in an open set S, and a differentiable function is one in which f^{\prime}(x) exists on its domain.

In the next few examples we use (Figure) to find the derivative of a function.

Finding the Derivative of a Square-Root Function

Find the derivative of f(x)=\sqrt{x}.


\begin{array}{lllll}f^{\prime}(x)& =\underset{h\to 0}{\lim}\frac{\sqrt{x+h}-\sqrt{x}}{h} & & & \begin{array}{l}\text{Substitute} \, f(x+h)=\sqrt{x+h} \, \text{and} \, f(x)=\sqrt{x} \\ \text{into} \, f^{\prime}(x)=\underset{h\to 0}{\lim}\frac{f(x+h)-f(x)}{h}. \end{array} \\ & =\underset{h\to 0}{\lim}\frac{\sqrt{x+h}-\sqrt{x}}{h}\cdot \frac{\sqrt{x+h}+\sqrt{x}}{\sqrt{x+h}+\sqrt{x}} & & & \begin{array}{l}\text{Multiply numerator and denominator by} \\ \sqrt{x+h}+\sqrt{x} \, \text{without distributing in the} \\ \text{denominator.} \end{array} \\ & =\underset{h\to 0}{\lim}\frac{h}{h(\sqrt{x+h}+\sqrt{x})} & & & \text{Multiply the numerators and simplify.} \\ & =\underset{h\to 0}{\lim}\frac{1}{(\sqrt{x+h}+\sqrt{x})} & & & \text{Cancel the} \, h. \\ & =\frac{1}{2\sqrt{x}} & & & \text{Evaluate the limit.} \end{array}

Finding the Derivative of a Quadratic Function

Find the derivative of the function f(x)=x^2-2x.


Follow the same procedure here, but without having to multiply by the conjugate.

\begin{array}{lllll}f^{\prime}(x) & =\underset{h\to 0}{\lim}\frac{((x+h)^2-2(x+h))-(x^2-2x)}{h} & & & \begin{array}{l}\text{Substitute} \, f(x+h)=(x+h)^2-2(x+h) \, \text{and} \\ f(x)=x^2-2x \, \text{into} \\ f^{\prime}(x)=\underset{h\to 0}{\lim}\frac{f(x+h)-f(x)}{h}. \end{array} \\ & =\underset{h\to 0}{\lim}\frac{x^2+2xh+h^2-2x-2h-x^2+2x}{h} & & & \text{Expand} \, (x+h)^2-2(x+h). \\ & =\underset{h\to 0}{\lim}\frac{2xh-2h+h^2}{h} & & & \text{Simplify.} \\ & =\underset{h\to 0}{\lim}\frac{h(2x-2+h)}{h} & & & \text{Factor out} \, h \, \text{from the numerator.} \\ & =\underset{h\to 0}{\lim}(2x-2+h) & & & \text{Cancel the common factor of} \, h. \\ & =2x-2 & & & \text{Evaluate the limit.} \end{array}

Find the derivative of f(x)=x^2.



We use a variety of different notations to express the derivative of a function. In (Figure) we showed that if f(x)=x^2-2x, then f^{\prime}(x)=2x-2. If we had expressed this function in the form y=x^2-2x, we could have expressed the derivative as y^{\prime}=2x-2 or \frac{dy}{dx}=2x-2. We could have conveyed the same information by writing \frac{d}{dx}(x^2-2x)=2x-2. Thus, for the function y=f(x), each of the following notations represents the derivative of f(x):f^{\prime}(x), \, \frac{dy}{dx}, \, y^{\prime}, \, \frac{d}{dx}(f(x)).

In place of f^{\prime}(a) we may also use \frac{dy}{dx}\Big|_{x=a} Use of the \frac{dy}{dx} notation (called Leibniz notation) is quite common in engineering and physics. To understand this notation better, recall that the derivative of a function at a point is the limit of the slopes of secant lines as the secant lines approach the tangent line. The slopes of these secant lines are often expressed in the form \frac{\Delta y}{\Delta x} where \Delta y is the difference in the y values corresponding to the difference in the x values, which are expressed as \Delta x ((Figure)). Thus the derivative, which can be thought of as the instantaneous rate of change of y with respect to x, is expressed as\frac{dy}{dx}=\underset{\Delta x\to 0}{\lim}\frac{\Delta y}{\Delta x}.

The function y = f(x) is graphed and it shows up as a curve in the first quadrant. The x-axis is marked with 0, a, and a + Δx. The y-axis is marked with 0, f(a), and f(a) + Δy. There is a straight line crossing y = f(x) at (a, f(a)) and (a + Δx, f(a) + Δy). From the point (a, f(a)), a horizontal line is drawn; from the point (a + Δx, f(a) + Δy), a vertical line is drawn. The distance from (a, f(a)) to (a + Δx, f(a)) is denoted Δx; the distance from (a + Δx, f(a) + Δy) to (a + Δx, f(a)) is denoted Δy.
Figure 1. The derivative is expressed as \frac{dy}{dx}=\underset{\Delta x\to 0}{\lim}\frac{\Delta y}{\Delta x}.

Graphing a Derivative

We have already discussed how to graph a function, so given the equation of a function or the equation of a derivative function, we could graph it. Given both, we would expect to see a correspondence between the graphs of these two functions, since f^{\prime}(x) gives the rate of change of a function f(x) (or slope of the tangent line to f(x)).

In (Figure) we found that for f(x)=\sqrt{x}, \, f^{\prime}(x)=1/2\sqrt{x}. If we graph these functions on the same axes, as in (Figure), we can use the graphs to understand the relationship between these two functions. First, we notice that f(x) is increasing over its entire domain, which means that the slopes of its tangent lines at all points are positive. Consequently, we expect f^{\prime}(x)>0″ height=”18″ width=”72″> for all values of <img loading= in its domain. Furthermore, as x increases, the slopes of the tangent lines to f(x) are decreasing and we expect to see a corresponding decrease in f^{\prime}(x). We also observe that f(0) is undefined and that \underset{x\to 0^+}{\lim}f^{\prime}(x)=+\infty, corresponding to a vertical tangent to f(x) at 0.

The function f(x) = the square root of x is graphed as is its derivative f’(x) = 1/(2 times the square root of x).
Figure 2. The derivative f^{\prime}(x) is positive everywhere because the function f(x) is increasing.

In (Figure) we found that for f(x)=x^2-2x, \, f^{\prime}(x)=2x-2. The graphs of these functions are shown in (Figure). Observe that f(x) is decreasing for x<1. For these same values of x, \, f^{\prime}(x)<0. For values of x>1, \, f(x)” height=”18″ width=”87″> is increasing and <img src= has a horizontal tangent at x=1 and f^{\prime}(1)=0.

The function f(x) = x squared – 2x is graphed as is its derivative f’(x) = 2x − 2.
Figure 3. The derivative f^{\prime}(x)<0 where the function f(x) is decreasing and f^{\prime}(x)>0″ height=”18″ width=”72″> where <img loading= is increasing. The derivative is zero where the function has a horizontal tangent.

Sketching a Derivative Using a Function

Use the following graph of f(x) to sketch a graph of f^{\prime}(x).

The function f(x) is roughly sinusoidal, starting at (−4, 3), decreasing to a local minimum at (−2, 2), then increasing to a local maximum at (3, 6), and getting cut off at (7, 2).


The solution is shown in the following graph. Observe that f(x) is increasing and f^{\prime}(x)>0″ height=”18″ width=”72″> on <img loading=. Also, f(x) is decreasing and f^{\prime}(x)<0 on (−\infty ,-2) and on (3,+\infty). Also note that f(x) has horizontal tangents at -2 and 3, and f^{\prime}(-2)=0 and f^{\prime}(3)=0.

Two functions are graphed here: f(x) and f’(x). The function f(x) is the same as the above graph, that is, roughly sinusoidal, starting at (−4, 3), decreasing to a local minimum at (−2, 2), then increasing to a local maximum at (3, 6), and getting cut off at (7, 2). The function f’(x) is an downward-facing parabola with vertex near (0.5, 1.75), y-intercept (0, 1.5), and x-intercepts (−1.9, 0) and (3, 0).

Sketch the graph of f(x)=x^2-4. On what interval is the graph of f^{\prime}(x) above the x-axis?




The graph of f^{\prime}(x) is positive where f(x) is increasing.

Derivatives and Continuity

Now that we can graph a derivative, let’s examine the behavior of the graphs. First, we consider the relationship between differentiability and continuity. We will see that if a function is differentiable at a point, it must be continuous there; however, a function that is continuous at a point need not be differentiable at that point. In fact, a function may be continuous at a point and fail to be differentiable at the point for one of several reasons.

Differentiability Implies Continuity

Let f(x) be a function and a be in its domain. If f(x) is differentiable at a, then f is continuous at a.


If f(x) is differentiable at a, then f^{\prime}(a) exists andf^{\prime}(a)=\underset{x\to a}{\lim}\frac{f(x)-f(a)}{x-a}.

We want to show that f(x) is continuous at a by showing that \underset{x\to a}{\lim}f(x)=f(a). Thus,

\begin{array}{lllll} \underset{x\to a}{\lim}f(x) & =\underset{x\to a}{\lim}(f(x)-f(a)+f(a)) & & & \\ & =\underset{x\to a}{\lim}(\frac{f(x)-f(a)}{x-a}\cdot (x-a)+f(a)) & & & \text{Multiply and divide} \, f(x)-f(a) \, \text{by} \, x-a. \\ & =(\underset{x\to a}{\lim}\frac{f(x)-f(a)}{x-a}) \cdot (\underset{x\to a}{\lim}(x-a))+\underset{x\to a}{\lim}f(a) & & & \\ & =f^{\prime}(a) \cdot 0+f(a) & & & \\ & =f(a). & & & \end{array}

Therefore, since f(a) is defined and \underset{x\to a}{\lim}f(x)=f(a), we conclude that f is continuous at a_\blacksquare

We have just proven that differentiability implies continuity, but now we consider whether continuity implies differentiability. To determine an answer to this question, we examine the function f(x)=|x|. This function is continuous everywhere; however, f^{\prime}(0) is undefined. This observation leads us to believe that continuity does not imply differentiability. Let’s explore further. For f(x)=|x|,f^{\prime}(0)=\underset{x\to 0}{\lim}\frac{f(x)-f(0)}{x-0}=\underset{x\to 0}{\lim}\frac{|x|-|0|}{x-0}=\underset{x\to 0}{\lim}\frac{|x|}{x}.

This limit does not exist because\underset{x\to 0^-}{\lim}\frac{|x|}{x}=-1 \, \text{and} \, \underset{x\to 0^+}{\lim}\frac{|x|}{x}=1.

The function f(x) = the absolute value of x is graphed. It consists of two straight line segments: the first follows the equation y = −x and ends at the origin; the second follows the equation y = x and starts at the origin.
Figure 4. The function f(x)=|x| is continuous at 0 but is not differentiable at 0.

Let’s consider some additional situations in which a continuous function fails to be differentiable. Consider the function f(x)=\sqrt[3]{x}:f^{\prime}(0)=\underset{x\to 0}{\lim}\frac{\sqrt[3]{x}-0}{x-0}=\underset{x\to 0}{\lim}\frac{1}{\sqrt[3]{x^2}}=+\infty.

Thus f^{\prime}(0) does not exist. A quick look at the graph of f(x)=\sqrt[3]{x} clarifies the situation. The function has a vertical tangent line at 0 ((Figure)).

The function f(x) = the cube root of x is graphed. It has a vertical tangent at x = 0.
Figure 5. The function f(x)=\sqrt[3]{x} has a vertical tangent at x=0. It is continuous at 0 but is not differentiable at 0.

The function f(x)=\begin{cases} x \sin(\frac{1}{x}) & \text{if} \, x \ne 0 \\ 0 & \text{if} \, x = 0 \end{cases} also has a derivative that exhibits interesting behavior at 0. We see thatf^{\prime}(0)=\underset{x\to 0}{\lim}\frac{x \sin(1/x)-0}{x-0}=\underset{x\to 0}{\lim} \sin(\frac{1}{x}).

This limit does not exist, essentially because the slopes of the secant lines continuously change direction as they approach zero ((Figure)).

The function f(x) = x sin (1/2) if x does not equal 0 and f(x) = 0 if x = 0 is graphed. It looks like a rapidly oscillating sinusoidal function with amplitude decreasing to 0 at the origin.
Figure 6. The function f(x)=\begin{cases} x \sin(\frac{1}{x}) & \text{if} \, x \ne 0 \\ 0 & \text{if} \, x = 0 \end{cases} is not differentiable at 0.

In summary:

  1. We observe that if a function is not continuous, it cannot be differentiable, since every differentiable function must be continuous. However, if a function is continuous, it may still fail to be differentiable.
  2. We saw that f(x)=|x| failed to be differentiable at 0 because the limit of the slopes of the tangent lines on the left and right were not the same. Visually, this resulted in a sharp corner on the graph of the function at 0. From this we conclude that in order to be differentiable at a point, a function must be “smooth” at that point.
  3. As we saw in the example of f(x)=\sqrt[3]{x}, a function fails to be differentiable at a point where there is a vertical tangent line.
  4. As we saw with f(x)=\begin{cases} x \sin(\frac{1}{x}) & \text{if} \, x \ne 0 \\ 0 & \text{if} \, x = 0 \end{cases} a function may fail to be differentiable at a point in more complicated ways as well.

A Piecewise Function that is Continuous and Differentiable

A toy company wants to design a track for a toy car that starts out along a parabolic curve and then converts to a straight line ((Figure)). The function that describes the track is to have the form f(x)=\begin{cases} \frac{1}{10}x^2 + bx + c & \text{if} \, x < -10 \\ -\frac{1}{4}x + \frac{5}{2} & \text{if} \, x \ge -10 \end{cases}, where x and f(x) are in inches. For the car to move smoothly along the track, the function f(x) must be both continuous and differentiable at -10. Find values of b and c that make f(x) both continuous and differentiable.

A cart is drawn on a line that curves through (−10, 5) to (10, 0) with y-intercept roughly (0, 2).
Figure 7. For the car to move smoothly along the track, the function must be both continuous and differentiable.


For the function to be continuous at x=-10, \, \underset{x\to 10^-}{\lim}f(x)=f(-10). Thus, since

\underset{x\to −10^-}{\lim}f(x)=\frac{1}{10}(-10)^2-10b+c=10-10b+c

and f(-10)=5, we must have 10-10b+c=5. Equivalently, we have c=10b-5.

For the function to be differentiable at -10,

f^{\prime}(10)=\underset{x\to −10}{\lim}\frac{f(x)-f(-10)}{x+10}

must exist. Since f(x) is defined using different rules on the right and the left, we must evaluate this limit from the right and the left and then set them equal to each other:

\begin{array}{lllll} \underset{x\to −10^-}{\lim}\frac{f(x)-f(-10)}{x+10} & =\underset{x\to −10^-}{\lim}\frac{\frac{1}{10}x^2+bx+c-5}{x+10} & & & \\ & =\underset{x\to −10^-}{\lim}\frac{\frac{1}{10}x^2+bx+(10b-5)-5}{x+10} & & & \text{Substitute} \, c=10b-5. \\ & =\underset{x\to −10^-}{\lim}\frac{x^2-100+10bx+100b}{10(x+10)} & & & \\ & =\underset{x\to −10^-}{\lim}\frac{(x+10)(x-10+10b)}{10(x+10)} & & & \text{Factor by grouping.} \\ & =b-2 & & & \end{array}

We also have

\begin{array}{ll} \underset{x\to −10^+}{\lim}\frac{f(x)-f(-10)}{x+10} & =\underset{x\to −10^+}{\lim}\frac{-\frac{1}{4}x+\frac{5}{2}-5}{x+10} \\ & =\underset{x\to −10^+}{\lim}\frac{−(x+10)}{4(x+10)} \\ & =-\frac{1}{4} \end{array}

This gives us b-2=-\frac{1}{4}. Thus b=\frac{7}{4} and c=10(\frac{7}{4})-5=\frac{25}{2}.

Find values of a and b that make f(x)=\begin{cases} ax+b & \text{if} \, x < 3 \\ x^2 & \text{if} \, x \ge 3 \end{cases} both continuous and differentiable at 3.


a=6 and b=-9

Higher-Order Derivatives

The derivative of a function is itself a function, so we can find the derivative of a derivative. For example, the derivative of a position function is the rate of change of position, or velocity. The derivative of velocity is the rate of change of velocity, which is acceleration. The new function obtained by differentiating the derivative is called the second derivative. Furthermore, we can continue to take derivatives to obtain the third derivative, fourth derivative, and so on. Collectively, these are referred to as higher-order derivatives. The notation for the higher-order derivatives of y=f(x) can be expressed in any of the following forms:

f''(x), \, f'''(x), \, f^{(4)}(x), \cdots ,f^{(n)}(x)
y'', \, y''', \, y^{(4)}, \cdots ,y^{(n)}

\frac{d^2y}{dx^2}, \, \frac{d^3y}{dx^3}, \, \frac{d^4y}{dx^4}, \cdots,\frac{d^ny}{dx^n}.

It is interesting to note that the notation for \frac{d^2y}{dx^2} may be viewed as an attempt to express \frac{d}{dx}(\frac{dy}{dx}) more compactly. Analogously, \frac{d}{dx}(\frac{d}{dx}(\frac{dy}{dx}))=\frac{d}{dx}(\frac{d^2y}{dx^2})=\frac{d^3y}{dx^3}.

Finding a Second Derivative

For f(x)=2x^2-3x+1, find f''(x).


First find f^{\prime}(x).

\begin{array}{lllll}f^{\prime}(x) & =\underset{h\to 0}{\lim}\frac{(2(x+h)^2-3(x+h)+1)-(2x^2-3x+1)}{h} & & & \begin{array}{l}\text{Substitute} \, f(x)=2x^2-3x+1 \\ \text{and} \\ f(x+h)=2(x+h)^2-3(x+h)+1 \\ \text{into} \, f^{\prime}(x)=\underset{h\to 0}{\lim}\frac{f(x+h)-f(x)}{h}. \end{array} \\ & =\underset{h\to 0}{\lim}\frac{4xh+h^2-3h}{h} & & & \text{Simplify the numerator.} \\ & =\underset{h\to 0}{\lim}(4x+h-3) & & & \begin{array}{l}\text{Factor out the} \, h \, \text{in the numerator} \\ \text{and cancel with the} \, h \, \text{in the} \\ \text{denominator.} \end{array} \\ & =4x-3 & & & \text{Take the limit.} \end{array}

Next, find f''(x) by taking the derivative of f^{\prime}(x)=4x-3.

\begin{array}{lllll} f''(x)& =\underset{h\to 0}{\lim}\frac{f^{\prime}(x+h)-f^{\prime}(x)}{h} & & & \begin{array}{l}\text{Use} \, f^{\prime}(x)=\underset{h\to 0}{\lim}\frac{f(x+h)-f(x)}{h} \, \text{with} \, f^{\prime}(x) \, \text{in} \\ \text{place of} \, f(x). \end{array} \\ & =\underset{h\to 0}{\lim}\frac{(4(x+h)-3)-(4x-3)}{h} & & & \begin{array}{l}\text{Substitute} \, f^{\prime}(x+h)=4(x+h)-3 \, \text{and} \\ f^{\prime}(x)=4x-3. \end{array} \\ & =\underset{h\to 0}{\lim}4 & & & \text{Simplify.} \\ & =4 & & & \text{Take the limit.} \end{array}

Find f''(x) for f(x)=x^2.



Finding Acceleration

The position of a particle along a coordinate axis at time t (in seconds) is given by s(t)=3t^2-4t+1 (in meters). Find the function that describes its acceleration at time t.


Since v(t)=s^{\prime}(t) and a(t)=v^{\prime}(t)=s''(t), we begin by finding the derivative of s(t):

\begin{array}{ll}s^{\prime}(t) & =\underset{h\to 0}{\lim}\frac{s(t+h)-s(t)}{h} \\ & =\underset{h\to 0}{\lim}\frac{3(t+h)^2-4(t+h)+1-(3t^2-4t+1)}{h} \\ & =6t-4 \end{array}


\begin{array}{ll} s''(t) & =\underset{h\to 0}{\lim}\frac{s^{\prime}(t+h)-s^{\prime}(t)}{h} \\ & =\underset{h\to 0}{\lim}\frac{6(t+h)-4-(6t-4)}{h} \\ & =6 \end{array}

Thus, a=6 \, \text{m/s}^2.

For s(t)=t^3, find a(t).



Key Concepts

  • The derivative of a function f(x) is the function whose value at x is f^{\prime}(x).
  • The graph of a derivative of a function f(x) is related to the graph of f(x). Where f(x) has a tangent line with positive slope, f^{\prime}(x)>0″ height=”18″ width=”72″>. Where <img loading= has a tangent line with negative slope, f^{\prime}(x)<0. Where f(x) has a horizontal tangent line, f^{\prime}(x)=0.
  • If a function is differentiable at a point, then it is continuous at that point. A function is not differentiable at a point if it is not continuous at the point, if it has a vertical tangent line at the point, or if the graph has a sharp corner or cusp.
  • Higher-order derivatives are derivatives of derivatives, from the second derivative to the n\text{th} derivative.

Key Equations

  • The derivative function
    f^{\prime}(x)=\underset{h\to 0}{\lim}\frac{f(x+h)-f(x)}{h}