Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 39 · Derivatives

The Definition of the Derivative

Define the derivative as the limit of the difference quotient, compute it from first principles for x² and 1/x, and verify the results numerically.

You have seen that the slope of the tangent line comes from shrinking secant slopes. Now we name it. The derivative of f at x = a is

f'(a) = lim(h→0) (f(a + h) - f(a)) / h

provided the limit exists. The fraction is called the difference quotient. The symbol f' is read "f prime".

If the limit exists we say f is differentiable at a. The number f'(a) is the slope of the tangent line at a, and the instantaneous rate of change of f there.

Computing from first principles

The method has four steps: write the difference quotient, expand, simplify so that h cancels, then let h → 0.

Example 1: f(x) = x².

((x + h)² - x²) / h = (2xh + h²) / h = 2x + h → 2x

So f'(x) = 2x. At x = 3 the slope is 6, matching what we found in chapter 1.

Example 2: f(x) = 3x + 5.

(3(x + h) + 5 - 3x - 5) / h = 3h / h = 3

The derivative of a line is its slope, 3, everywhere.

Example 3: f(x) = 1/x.

(1/(x + h) - 1/x) / h = ((x - (x + h)) / (x(x + h))) / h = -h / (h x (x + h)) = -1 / (x (x + h)) → -1/x²

So f'(x) = -1/x².

Python Difference quotient with shrinking h

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Checking with SymPy

SymPy can take the limit of the difference quotient directly, which mirrors the definition.

Python The definition as a SymPy limit

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The output shows 2*x, -1/x**2, 3*x**2 and 1/(2*sqrt(x)).

An alternative form

Sometimes it is easier to write f'(a) = lim(x→a) (f(x) - f(a)) / (x - a). Both forms say the same thing: change in f over change in x, as the change shrinks.

A rule like "the derivative of x² is 2x" is a function that gives the slope at every x. That is why f' is itself a function, and the next lesson looks at that idea.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The derivative of f at a is defined as

    It is the limit of the difference quotient.
  2. 2. From first principles, the derivative of f(x) = x² is

    (2xh + h²)/h = 2x + h, which approaches 2x.
  3. 3. The derivative of a straight line y = 3x + 5 is

    A line has constant slope 3.
  4. 4. In the first-principles calculation, we can cancel h because

    The limit looks at h approaching 0 without equal to 0, so dividing by h is allowed.

Summary

  • f'(a) = lim(h→0) (f(a+h) - f(a)) / h is the slope of the tangent at a.
  • First-principles method: form the quotient, simplify, cancel h, take the limit.
  • Results: (x²)' = 2x, (1/x)' = -1/x², derivative of a line = its slope.

Next: The Derivative as a Function