Understanding the Derivative from First Principles (AP Calculus AB Unit 2)

Average and Instantaneous Rates of Change

What “rate of change” means

A rate of change tells you how one quantity changes in response to another. In calculus, you usually study how an output f(x) changes as the input x changes. You can think of x as “time” and f(x) as “position,” but the same idea applies to cost vs. number of items, temperature vs. time, population vs. time, and so on.

There are two closely related rates of change:

  • Average rate of change over an interval: how much f(x) changes per unit of x across a whole interval.
  • Instantaneous rate of change at a point: how fast f(x) is changing at a specific input value.

Why this matters: almost everything you do with derivatives starts from this idea. The derivative is the tool that converts “change over an interval” into “change at an instant,” which is what you need for velocity at an exact time, slope of a curve at a point, optimization, and modeling.

Average rate of change (secant slope)

The average rate of change of f(x) from x=a to x=b is

\frac{f(b)-f(a)}{b-a}

This is also the slope of the secant line through the two points \left(a,f(a)\right) and \left(b,f(b)\right) on the graph.

How it works: the numerator f(b)-f(a) is the “rise” (change in output), and the denominator b-a is the “run” (change in input). The ratio is the slope of the line connecting those points.

Common interpretation: if f is position (in meters) and x is time (in seconds), then

\frac{f(b)-f(a)}{b-a}

is average velocity on the time interval from a to b.

Example 1: Average rate of change

Let f(x)=x^2. Find the average rate of change from x=2 to x=5.

Compute the function values:

f(5)=25

f(2)=4

Apply the average rate of change formula:

\frac{f(5)-f(2)}{5-2}=\frac{25-4}{3}=7

So, on average, f(x) increases by 7 units of output for each 1 unit of input across [2,5].

Instantaneous rate of change (tangent slope)

The instantaneous rate of change at x=a is the rate at which f(x) is changing right at x=a. Graphically, this is the slope of the **tangent line** to the curve at the point \left(a,f(a)\right).

Why you can’t just “plug into a formula” yet: a single point doesn’t form an interval, so you can’t compute a slope using two different points unless you create a second point extremely close to a. Calculus formalizes this by taking a limit—letting the second point approach the first.

A helpful mental image: imagine driving and looking at your speedometer at exactly 3:00 PM. That’s not an average over a minute; it’s an instantaneous reading. Mathematically, you approximate it using averages over smaller and smaller time intervals.

Moving from average to instantaneous

Start with the average rate of change from a to a+h:

\frac{f(a+h)-f(a)}{(a+h)-a}

Simplify the denominator:

\frac{f(a+h)-f(a)}{h}

As h gets closer to 0, the point a+h approaches a, the secant line approaches the tangent line, and this difference quotient approaches the instantaneous rate of change—if the limit exists.

Exam Focus
  • Typical question patterns:
    • Compute an average rate of change on a given interval and interpret its meaning (often with units).
    • Given a context (position, cost, temperature), explain what average vs. instantaneous rate of change represents.
    • Set up (not necessarily evaluate) a difference quotient that would approximate instantaneous rate of change near a point.
  • Common mistakes:
    • Swapping a and b in the denominator and getting the sign wrong—keep the same order in numerator and denominator.
    • Treating “instantaneous” as “average over a small interval” without the limit idea; on the AP exam you often must show the limit setup.
    • Forgetting units: if f is meters and x is seconds, the rate is meters per second.

Defining the Derivative of a Function

The derivative as a limit

The derivative is the formal name for the instantaneous rate of change. At an input x=a, the derivative of f is defined by the limit

f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}

This limit (when it exists) is the slope of the tangent line to y=f(x) at x=a.

Why the limit is essential: if you tried to use h=0 directly, you would divide by zero. The limit does not substitute h=0; it describes what the quotient approaches as h gets arbitrarily small.

Two equivalent limit definitions

You may also see the derivative written using a second point x approaching a:

f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}

These are equivalent because x=a+h. The choice is often about convenience:

  • The h\to 0 form emphasizes “a small change” and is common when deriving formulas.
  • The x\to a form matches the slope formula between two points and is common in conceptual explanations.

Defining the derivative function

So far, f'(a) is “the derivative at a point.” But you usually want a new function that gives the derivative at every input where it exists. The **derivative function** f'(x) is defined by

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

This definition is powerful: it lets you compute derivatives from first principles (without rules) and explains what derivative rules are actually shortcuts for.

Notation you must recognize

AP Calculus expects you to be fluent in multiple notations that mean the same idea.

MeaningCommon notations
Derivative of f at x=af'(a), \left.\frac{dy}{dx}\right|_{x=a} (if y=f(x)), Df(a)
Derivative functionf'(x), \frac{dy}{dx}, \frac{d}{dx}\left(f(x)\right)

Interpretation tip: \frac{dy}{dx} is read “dee y dee x” and represents the instantaneous rate of change of y with respect to x.

Example 2: Derivative from the definition

Let f(x)=x^2. Find f'(x) using the limit definition.

Start with the definition:

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

Substitute f(x)=x^2:

f'(x)=\lim_{h\to 0}\frac{(x+h)^2-x^2}{h}

Expand and simplify the numerator:

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

f'(x)=\lim_{h\to 0}\frac{2xh+h^2}{h}

Factor out h:

f'(x)=\lim_{h\to 0}\frac{h(2x+h)}{h}

Cancel h (this is safe for the limit process because the expression is simplified before taking the limit):

f'(x)=\lim_{h\to 0}(2x+h)

Now take the limit:

f'(x)=2x

So the derivative function is f'(x)=2x. This result means: at any input x, the slope of the tangent line to y=x^2 is 2x.

Example 3: Derivative at a specific point

Using f(x)=x^2, find the slope of the tangent line at x=3.

Evaluate the derivative function at x=3:

f'(3)=2(3)=6

So the tangent slope at x=3 is 6.

What goes wrong: limits that don’t exist

The derivative definition requires the limit to exist. The limit can fail to exist if:

  • the left-hand and right-hand limits differ (a “corner” or cusp often causes this),
  • the function is not continuous at the point (a hole or jump),
  • the slopes become unbounded (vertical tangent),
  • the function oscillates too wildly as you zoom in.

You’ll explore these more in the differentiability section, but the big idea is: being able to draw a tangent line depends on how the graph behaves when you zoom in.

Exam Focus
  • Typical question patterns:
    • Use the limit definition to compute f'(x) for a simple function (often polynomial, root, or rational where algebraic simplification is needed).
    • Write the correct limit expression for f'(a) or f'(x) from scratch.
    • Interpret f'(a) as a slope (tangent line) or as an instantaneous rate (velocity, marginal change).
  • Common mistakes:
    • Plugging in h=0 immediately (division by zero) instead of simplifying first and then taking the limit.
    • Algebra errors when expanding f(x+h), especially squares like (x+h)^2 .
    • Confusing f'(a) with f(a): one is a slope/rate, the other is a function value.

Estimating Derivatives at a Point

Why estimation matters

In many AP problems, you are not given a formula for f(x). Instead, you might get a table of values, a graph, or a description from an experiment. In those cases you can’t take a symbolic limit—but you can still estimate the derivative by approximating the tangent slope.

The core strategy is always the same: use a secant slope over a small interval near the point of interest. Smaller intervals usually give better approximations (as long as the function behaves nicely).

Estimating from a table (difference quotients)

Suppose you want to estimate f'(a) and you have values near a.

A common one-sided estimate (using a point to the right) is

f'(a)\approx\frac{f(a+h)-f(a)}{h}

where h is small.

A one-sided estimate (using a point to the left) is

f'(a)\approx\frac{f(a)-f(a-h)}{h}

A particularly accurate method (when the table provides symmetric values) is the symmetric difference quotient:

f'(a)\approx\frac{f(a+h)-f(a-h)}{2h}

Why the symmetric version helps: it balances the behavior on both sides of a, which often reduces error when the function is reasonably smooth.

Example 4: Estimating f'(a) from a table

A table gives:

x1.92.02.1
f(x)3.614.004.41

Estimate f'(2).

Right-hand estimate using h=0.1:

f'(2)\approx\frac{f(2.1)-f(2.0)}{0.1}=\frac{4.41-4.00}{0.1}=4.1

Left-hand estimate using h=0.1:

f'(2)\approx\frac{f(2.0)-f(1.9)}{0.1}=\frac{4.00-3.61}{0.1}=3.9

Symmetric estimate:

f'(2)\approx\frac{f(2.1)-f(1.9)}{0.2}=\frac{4.41-3.61}{0.2}=4.0

So a strong estimate is f'(2)\approx 4.

(Notice how the symmetric estimate sits between the left and right estimates—this is typical when the function is smooth.)

Estimating from a graph (tangent line or secant line)

If you are given a graph, you estimate f'(a) by estimating the slope of the tangent line at x=a. Since you can’t draw a perfect tangent, you approximate it by drawing a line that just “kisses” the curve at the point and matches its local direction.

Practical method:

  1. Sketch a tangent line at the point.
  2. Choose two clear points on that tangent line (not necessarily on the curve) where coordinates are easy to read.
  3. Compute the slope:

\text{slope}\approx\frac{\Delta y}{\Delta x}

What can go wrong: students sometimes pick two points on the curve near a (a secant slope) and think they computed the tangent slope. That can be okay as an approximation, but AP graph questions often intend you to use the tangent line itself.

Connecting estimation to the limit definition

All these approximations are numerical versions of

f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}

You can’t literally take h\to 0 from a finite table or an imprecise graph, so you take a small h and accept an approximation.

Example 5: Estimating and interpreting in context

Suppose s(t) is the distance (meters) traveled after t seconds. A data set gives s(5)=42 and s(5.2)=45. Estimate the instantaneous velocity at t=5.

Use a small forward interval:

s'(5)\approx\frac{s(5.2)-s(5)}{0.2}=\frac{45-42}{0.2}=15

Interpretation: the velocity at about t=5 seconds is approximately 15 meters per second.

Exam Focus
  • Typical question patterns:
    • Approximate f'(a) using values from a table near a (often asking for a symmetric difference quotient if possible).
    • Estimate a derivative from a graph by drawing/using a tangent line and computing its slope.
    • Interpret the meaning of a derivative estimate in context (including correct units).
  • Common mistakes:
    • Using points too far from a, leading to an average rate of change that doesn’t represent the instantaneous behavior.
    • Mixing up the denominator: if you use f(a+h)-f(a-h), the denominator must be 2h.
    • Reading the slope from two points on the curve when the question expects slope of the tangent line (or vice versa). Always match the method to the prompt.

Differentiability and Continuity

Differentiability: what it means

A function f is **differentiable** at x=a if the derivative f'(a) exists—that is, if the limit

\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}

exists as a finite real number.

Conceptually, differentiability means the graph has a well-defined “local direction” at x=a. When you zoom in near a, the curve should look more and more like a straight line (this idea is sometimes called local linearity).

Why it matters: derivative rules you learn later (power rule, product rule, etc.) assume differentiability. Also, many theorems and applications (like motion, optimization, and related rates) rely on functions being differentiable so that instantaneous rates make sense.

Continuity: a related but different idea

A function f is **continuous** at x=a if:

  1. f(a) is defined,
  2. \lim_{x\to a}f(x) exists,
  3. \lim_{x\to a}f(x)=f(a).

Continuity is about whether the graph has breaks (holes, jumps, asymptotes) at the point. Differentiability is stricter—it asks whether the graph has a well-defined tangent slope.

The key relationship

A crucial fact in AP Calculus AB:

  • If f is differentiable at x=a, then f is continuous at x=a.

In other words, differentiability implies continuity.

But the converse is false:

  • A function can be continuous at x=a and still not be differentiable there.

This happens at sharp points where the graph does not have a single tangent slope.

How differentiability can fail

Even if a function is continuous, the derivative might not exist. The most common “non-differentiable” behaviors tested in AP Calculus are:

  1. Corner: left-hand slope and right-hand slope are finite but not equal.
  2. Cusp: slopes become very steep in opposite directions (left-hand and right-hand slopes go to different infinities).
  3. Vertical tangent: slope becomes infinite (or undefined) in the same direction.
  4. Discontinuity: derivative cannot exist because differentiability requires continuity.

The unifying idea is that the limit defining f'(a) fails to exist (either because one-sided limits disagree or because the quotient grows without bound).

Using one-sided derivatives

You can analyze differentiability by comparing one-sided limits:

Left-hand derivative:

\lim_{h\to 0^-}\frac{f(a+h)-f(a)}{h}

Right-hand derivative:

\lim_{h\to 0^+}\frac{f(a+h)-f(a)}{h}

For f'(a) to exist, both must exist and be equal.

Example 6: Continuous but not differentiable

Consider f(x)=|x| at x=0.

First, continuity: |x| has no breaks, so it is continuous at x=0.

Now check differentiability using one-sided slopes.

For x>0, |x|=x, so the slope is 1.

For x