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)f(x) changes as the input xx changes. You can think of xx as “time” and f(x)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)f(x) changes per unit of xx across a whole interval.
  • Instantaneous rate of change at a point: how fast f(x)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)f(x) from x=ax=a to x=bx=b is

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

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

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

Common interpretation: if ff is position (in meters) and xx is time (in seconds), then

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

is average velocity on the time interval from aa to bb.

Example 1: Average rate of change

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

Compute the function values:

f(5)=25f(5)=25

f(2)=4f(2)=4

Apply the average rate of change formula:

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

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

Instantaneous rate of change (tangent slope)

The instantaneous rate of change at x=ax=a is the rate at which f(x)f(x) is changing right at x=ax=a. Graphically, this is the slope of the **tangent line** to the curve at the point (a,f(a))\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 aa. 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 aa to a+ha+h:

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

Simplify the denominator:

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

As hh gets closer to 0, the point a+ha+h approaches aa, 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 aa and bb 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 ff is meters and xx 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=ax=a, the derivative of ff is defined by the limit

f(a)=limh0f(a+h)f(a)hf'(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)y=f(x) at x=ax=a.

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

Two equivalent limit definitions

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

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

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

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

So far, f(a)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)f'(x) is defined by

f(x)=limh0f(x+h)f(x)hf'(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 ff at x=ax=af(a)f'(a), dydxx=a\left.\frac{dy}{dx}\right|_{x=a} (if y=f(x)y=f(x)), Df(a)Df(a)
Derivative functionf(x)f'(x), dydx\frac{dy}{dx}, ddx(f(x))\frac{d}{dx}\left(f(x)\right)

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

Example 2: Derivative from the definition

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

Start with the definition:

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

Substitute f(x)=x2f(x)=x^2:

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

Expand and simplify the numerator:

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

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

Factor out hh:

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

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

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

Now take the limit:

f(x)=2xf'(x)=2x

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

Example 3: Derivative at a specific point

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

Evaluate the derivative function at x=3x=3:

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

So the tangent slope at x=3x=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)f'(x) for a simple function (often polynomial, root, or rational where algebraic simplification is needed).
    • Write the correct limit expression for f(a)f'(a) or f(x)f'(x) from scratch.
    • Interpret f(a)f'(a) as a slope (tangent line) or as an instantaneous rate (velocity, marginal change).
  • Common mistakes:
    • Plugging in h=0h=0 immediately (division by zero) instead of simplifying first and then taking the limit.
    • Algebra errors when expanding f(x+h)f(x+h), especially squares like (x+h)2(x+h)^2.
    • Confusing f(a)f'(a) with f(a)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)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)f'(a) and you have values near aa.

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

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

where hh is small.

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

f(a)f(a)f(ah)hf'(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)f(a+h)f(ah)2hf'(a)\approx\frac{f(a+h)-f(a-h)}{2h}

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

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

A table gives:

xx1.92.02.1
f(x)f(x)3.614.004.41

Estimate f(2)f'(2).

Right-hand estimate using h=0.1h=0.1:

f(2)f(2.1)f(2.0)0.1=4.414.000.1=4.1f'(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.1h=0.1:

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

Symmetric estimate:

f(2)f(2.1)f(1.9)0.2=4.413.610.2=4.0f'(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)4f'(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)f'(a) by estimating the slope of the tangent line at x=ax=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:

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

What can go wrong: students sometimes pick two points on the curve near aa (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)=limh0f(a+h)f(a)hf'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}

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

Example 5: Estimating and interpreting in context

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

Use a small forward interval:

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

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

Exam Focus
  • Typical question patterns:
    • Approximate f(a)f'(a) using values from a table near aa (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 aa, 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(ah)f(a+h)-f(a-h), the denominator must be 2h2h.
    • 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 ff is **differentiable** at x=ax=a if the derivative f(a)f'(a) exists—that is, if the limit

limh0f(a+h)f(a)h\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=ax=a. When you zoom in near aa, 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 ff is **continuous** at x=ax=a if:

  1. f(a)f(a) is defined,
  2. limxaf(x)\lim_{x\to a}f(x) exists,
  3. limxaf(x)=f(a)\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 ff is differentiable at x=ax=a, then ff is continuous at x=ax=a.

In other words, differentiability implies continuity.

But the converse is false:

  • A function can be continuous at x=ax=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)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:

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

Right-hand derivative:

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

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

Example 6: Continuous but not differentiable

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

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

Now check differentiability using one-sided slopes.

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

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

You can also see this via the limit definition quickly:

Right-hand derivative at 0:

limh0+h0h=limh0+hh=1\lim_{h\to 0^+}\frac{|h|-|0|}{h}=\lim_{h\to 0^+}\frac{h}{h}=1

Left-hand derivative at 0:

limh0h0h=limh0hh=1\lim_{h\to 0^-}\frac{|h|-|0|}{h}=\lim_{h\to 0^-}\frac{-h}{h}=-1

Since the one-sided derivatives are not equal, f(0)f'(0) does not exist. So ff is continuous at 0 but not differentiable at 0.

Example 7: Discontinuous implies not differentiable

Define a function g(x)g(x) by

g(x)=x21x1g(x)=\frac{x^2-1}{x-1}

for x1x\ne 1, and suppose g(1)g(1) is not defined.

You can simplify for x1x\ne 1:

g(x)=(x1)(x+1)x1=x+1g(x)=\frac{(x-1)(x+1)}{x-1}=x+1

So the graph is the line y=x+1y=x+1 with a hole at x=1x=1. Because g(1)g(1) is not defined, gg is not continuous at x=1x=1, so it cannot be differentiable there.

This example highlights a common misconception: simplifying an expression may hide a discontinuity at a point where cancellation occurred. Differentiability depends on the original function’s definition at the point.

Tangent lines and differentiability (geometric view)

If f(a)f'(a) exists, you can write the equation of the tangent line at x=ax=a.

Slope is m=f(a)m=f'(a), and the line passes through (a,f(a))\left(a,f(a)\right):

yf(a)=f(a)(xa)y-f(a)=f'(a)(x-a)

This equation shows why differentiability is so useful: it gives you a local linear model for the function near aa.

Exam Focus
  • Typical question patterns:
    • Determine whether a function is differentiable at a point from a graph (look for corners, cusps, vertical tangents, or discontinuities).
    • Explain the relationship between continuity and differentiability (often as a justification statement).
    • Use one-sided derivative ideas to argue whether f(a)f'(a) exists for a piecewise or absolute value function.
  • Common mistakes:
    • Claiming that “continuous means differentiable.” The correct statement is: differentiable implies continuous.
    • Missing a discontinuity caused by a removable hole after algebraic simplification; always check whether the function is actually defined at the point.
    • Confusing a vertical tangent with a corner: at a corner, slopes are finite but different; with a vertical tangent, slopes blow up (become unbounded).