Lecture 9: Section 2.8 The Derivative as a Function

In our last lecture, we defined the derivative at a single point, $f'(a)$, which gives us a number representing the slope of the tangent line or an instantaneous velocity. This is powerful, but it's also inefficient. If we want to know the slope at many different points, do we really need to calculate a new limit every single time?

Today, we make a crucial conceptual leap. By replacing the constant number $a$ with the variable $x$, we will define a new function, the derivative function $f'(x)$. This function will take any value of $x$ as input and give us the slope of the original function at that point as the output. This is the true power of differential calculus.


Topic 1: The Derivative as a Function

In the last section, we found the derivative at a specific number, $x=a$. Now, we want to make a powerful generalization. Instead of choosing a specific number like $a=3$, let's perform the same calculation using the variable $x$. This will give us a new function, called the derivative function, that can tell us the slope at any point on the curve.

Let's compare the two processes side-by-side using the simple function $f(x) = x^2$.

Process A: Derivative at a Point (a=3) Process B: Derivative as a Function (for any x)
Goal: Find $f'(3)$, which is a number representing the slope at $x=3$.

Formula: $$f'(3) = \lim_{h \to 0} \frac{f(3+h) - f(3)}{h}$$ Calculation: $$ \begin{align*} f'(3) &= \lim_{h \to 0} \frac{(3+h)^2 - 3^2}{h} \\ &= \lim_{h \to 0} \frac{9+6h+h^2 - 9}{h} \\ &= \lim_{h \to 0} \frac{h(6+h)}{h} \\ &= 6 \end{align*} $$ Result: The slope at the single point $x=3$ is exactly 6.
Goal: Find $f'(x)$, which is a function that gives the slope at any value of $x$.

Formula: $$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$ Calculation: $$ \begin{align*} f'(x) &= \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h} \\ &= \lim_{h \to 0} \frac{x^2+2xh+h^2 - x^2}{h} \\ &= \lim_{h \to 0} \frac{h(2x+h)}{h} \\ &= 2x \end{align*} $$ Result: We get a new function, $f'(x)=2x$. Now we can find the slope anywhere just by plugging in $x$. For $x=3$, the slope is $2(3)=6$.

The Main Takeaway

The algebra in both processes is nearly identical! The only difference is that by using the variable $x$ instead of a specific number, Process B gives us a powerful new function, $f'(x)$, that serves as a "slope-finding machine" for our original function $f(x)$. This means we have created a new function $f'(x)$, and if we input a value, $a$, then $f'(a)$ is the slope of the tangent line to the original function $f$ at the point $(a, f(a))$. So, the equation of the tangent line becomes $y - f(a) = f'(a)(x - a)$ using our point-slope form.

Check Your Understanding

Problem: Find the derivative function, $f'(x)$, for $f(x)=x^3$.


Topic 2: The Graph of the Derivative

Since $f'(x)$ is a function, it has its own graph. There is a deep and beautiful connection between the graph of a function and the graph of its derivative.

The key relationship is: The y-value of $f'(x)$ is the slope of $f(x)$.

Example: Sketching a Derivative

Consider the graph of $f(x)$ (shown in red) and the graph of its derivative, $f'(x)$ (shown in blue). Move the slider, s, to see the relation between f and f'.

Let's analyze the connection:

  • When $f(x)$ is increasing (slopes are positive), the graph of $f'(x)$ is above the x-axis (its y-values are positive).
  • When $f(x)$ is decreasing (slopes are negative), the graph of $f'(x)$ is below the x-axis (its y-values are negative).
  • When $f(x)$ has a horizontal tangent (a peak or valley, where slope is zero), the graph of $f'(x)$ is equal to zero (it crosses the x-axis).

Check Your Understanding

Problem: Given the graph of $f(x)$ below, sketch a rough graph of its derivative, $f'(x)$.


Topic 3: Differentiability and Other Notations

There are several common notations for the derivative of $y=f(x)$, including Lagrange's prime notation, $f'(x)$, and Leibniz's notation, $\frac{dy}{dx}$.

A function is differentiable at a point $a$ if $f'(a)$ exists. An important theorem connects this to continuity:

Theorem: Differentiability Implies Continuity

If $f$ is differentiable at $a$, then $f$ is continuous at $a$.

Warning: The reverse is not true! A function can be continuous but not differentiable.

How Can a Function Fail to Be Differentiable?

A function is not differentiable at a point $a$ if its graph does not have a well-defined, non-vertical tangent line there. This happens in three common ways:

  1. A corner or kink, where the left-hand and right-hand slopes are different (e.g., $y=|x|$ at $x=0$).
  2. A discontinuity, such as a jump or hole. If you have to lift your pencil, there's no tangent line.
  3. A vertical tangent line, where the slope would be infinite (e.g., $y = \sqrt[3]{x}$ at $x=0$).

Topic 4: Higher-Order Derivatives

Since the derivative $f'(x)$ is itself a function, we can take its derivative. The result is called the second derivative of $f$, which we denote by $f''(x)$.

This has a powerful physical meaning. If $s(t)$ is the position of an object, then $s'(t)$ is its velocity, and the rate of change of velocity is acceleration. So, $s''(t) = v'(t) = a(t)$.

Notations for Higher-Order Derivatives

Prime Notation: $y', y'', y''', y^{(4)}, \dots, y^{(n)}$

Leibniz Notation: $\frac{dy}{dx}, \frac{d^2y}{dx^2}, \frac{d^3y}{dx^3}, \dots, \frac{d^ny}{dx^n}$

Example: Finding the Second Derivative

Find the first and second derivatives of $f(x) = x^3 - 5x^2 + 2x$ using the limit definition.

Solution:

Step 1: Find the first derivative, $f'(x)$.

We start by setting up the limit for $f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$:

$$ f'(x) = \lim_{h \to 0} \frac{[(x+h)^3 - 5(x+h)^2 + 2(x+h)] - [x^3 - 5x^2 + 2x]}{h} $$

Expand the terms in the numerator:

$$ (x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3 $$

$$ -5(x+h)^2 = -5(x^2 + 2xh + h^2) = -5x^2 - 10xh - 5h^2 $$

$$ 2(x+h) = 2x + 2h $$

Substitute these back in and simplify by canceling terms:

$$ f'(x) = \lim_{h \to 0} \frac{(x^3 + 3x^2h + 3xh^2 + h^3 - 5x^2 - 10xh - 5h^2 + 2x + 2h) - (x^3 - 5x^2 + 2x)}{h} $$

$$ f'(x) = \lim_{h \to 0} \frac{3x^2h + 3xh^2 + h^3 - 10xh - 5h^2 + 2h}{h} $$

Factor out $h$ from the numerator and cancel:

$$ f'(x) = \lim_{h \to 0} \frac{h(3x^2 + 3xh + h^2 - 10x - 5h + 2)}{h} = \lim_{h \to 0} (3x^2 + 3xh + h^2 - 10x - 5h + 2) $$

Now, evaluate the limit by setting $h=0$:

$$ f'(x) = 3x^2 - 10x + 2 $$

Step 2: Find the second derivative, $f''(x)$.

The second derivative is the derivative of $f'(x)$. We apply the limit definition again, this time to the function $f'(x) = 3x^2 - 10x + 2$.

$$ f''(x) = \lim_{h \to 0} \frac{f'(x+h) - f'(x)}{h} = \lim_{h \to 0} \frac{[3(x+h)^2 - 10(x+h) + 2] - [3x^2 - 10x + 2]}{h} $$

Expand the terms:

$$ f''(x) = \lim_{h \to 0} \frac{[3(x^2+2xh+h^2) - 10x - 10h + 2] - [3x^2 - 10x + 2]}{h} $$

$$ f''(x) = \lim_{h \to 0} \frac{(3x^2 + 6xh + 3h^2 - 10x - 10h + 2) - (3x^2 - 10x + 2)}{h} $$

Simplify by canceling terms:

$$ f''(x) = \lim_{h \to 0} \frac{6xh + 3h^2 - 10h}{h} $$

Factor out $h$ and cancel:

$$ f''(x) = \lim_{h \to 0} \frac{h(6x + 3h - 10)}{h} = \lim_{h \to 0} (6x + 3h - 10) $$

Finally, evaluate the limit by setting $h=0$:

$$ f''(x) = 6x - 10 $$

Check Your Understanding

Find the second derivative of $y = x^2 + 7x - 4$ using the limit definition.


Final Practice: Calculating the Derivative at a Point

Practice Problem #1

Find the derivative function $f'(x)$ of $f(x) = \sqrt{x+2}$ using the limit definition.

Practice Problem #2

Find the derivative function $f'(x)$ of $f(x) = \frac{1}{x^2}$ using the limit definition.

Practice Problem #3

The graph of a derivative function, $f'(x)$, is shown. On what intervals is the original function $f(x)$ increasing? On what intervals is it decreasing?


Conclusion

Today, we generalized the derivative from a number at a point, $f'(a)$, to a powerful new function, $f'(x)$, which describes the slope of $f(x)$ everywhere. We've seen how the graph of $f'$ relates to the behavior of $f$, and we've introduced higher-order derivatives like acceleration. Using the limit definition every time is powerful, but slow. In the next chapter, we will finally develop the "shortcut" rules that will allow us to find derivatives in seconds!