practicecalculus
Derivatives

The Limit Definition of the Derivative, Step by Step

Learn the limit definition of the derivative: the difference quotient, secant lines becoming tangent lines, and worked examples for x², 1/x and √x.

By the PracticeCalculus team Published 7 min read

On this page
  1. What is the derivative? The plain-language definition
  2. From secant lines to the tangent line
  3. How to use the limit definition: the general method
  4. Worked example 1: the derivative of x²
  5. Worked example 2: the derivative of 1/x
  6. Worked example 3: the derivative of √x
  7. Worked example 4: the alternate form at a point
  8. What the derivative tells you
  9. When the derivative does not exist
  10. Common mistakes with the limit definition
  11. Quick reference
  12. Practice builds the algebra

Slope is easy for a straight line: rise over run. But a curve like y = x^2 gets steeper as you move right, so what does "the slope at x = 1" even mean? The limit definition of the derivative answers that precisely, and it is the foundation every derivative rule is built on.

What is the derivative? The plain-language definition

The derivative of a function at a point is the slope of the tangent line there: the instantaneous rate of change. We find it by taking the slope between two points on the curve and letting the second point slide toward the first.

Formally, the derivative of f is

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

whenever this limit exists. The fraction inside the limit is called the difference quotient.

At a specific point x = a, the same definition is often written in an equivalent alternate form:

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

From secant lines to the tangent line

A secant line passes through two points on a curve. Take the points (x, f(x)) and (x + h, f(x + h)). The rise is f(x+h) - f(x) and the run is h, so the slope of the secant line is exactly the difference quotient:

\text{secant slope} = \frac{f(x+h) - f(x)}{h}

Now shrink h. The second point slides along the curve toward the first, and the secant line pivots. In the limit, the two points merge and the secant line becomes the tangent line. Its slope is the derivative.

Here is f(x) = x^2 at x = 1:

h Second point Secant slope \frac{(1+h)^2 - 1}{h}
1 (2, 4) 3
0.5 (1.5, 2.25) 2.5
0.1 (1.1, 1.21) 2.1
0.01 (1.01, 1.0201) 2.01

The slopes close in on 2. So the slope of the tangent line to y = x^2 at x = 1 is 2.

Secant lines of y = x² through (1, 1) approaching the tangent line y = 2x − 1
The secant lines with h = 1 (slope 3) and h = 0.5 (slope 2.5) pivot toward the tangent line at x = 1, which has slope 2.

How to use the limit definition: the general method

Every limit-definition problem follows the same four steps.

  1. Write f(x + h) by replacing every x in the formula with (x + h).
  2. Form the difference quotient \frac{f(x+h) - f(x)}{h}.
  3. Simplify until the h in the denominator cancels. (Substituting h = 0 right away always gives \frac{0}{0}.)
  4. Let h \to 0 by substituting h = 0 into what remains.

The algebra in step 3 depends on the function. These are the same techniques used in evaluating limits:

Function type Simplifying technique
Polynomial Expand and cancel
Fraction (like \frac{1}{x}) Combine over a common denominator
Square root Multiply by the conjugate

Worked example 1: the derivative of x²

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

Step 1. Write f(x + h).

f(x + h) = (x + h)^2 = x^2 + 2xh + h^2

Step 2. Form the difference quotient.

\frac{f(x+h) - f(x)}{h} = \frac{x^2 + 2xh + h^2 - x^2}{h} = \frac{2xh + h^2}{h}

Step 3. Factor out h and cancel.

\frac{h(2x + h)}{h} = 2x + h \quad (h \neq 0)

Step 4. Let h \to 0.

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

At x = 1 this gives f'(1) = 2, matching the table. The tangent line there is y - 1 = 2(x - 1), or y = 2x - 1.

Worked example 2: the derivative of 1/x

Find f'(x) for f(x) = \frac{1}{x}.

Step 1. Write f(x + h). f(x + h) = \frac{1}{x + h}.

Step 2. Form the difference quotient.

\frac{\frac{1}{x+h} - \frac{1}{x}}{h}

Step 3. Combine the top over a common denominator.

\frac{1}{x+h} - \frac{1}{x} = \frac{x - (x + h)}{x(x + h)} = \frac{-h}{x(x + h)}

Dividing by h cancels it:

\frac{-h}{x(x+h)} \cdot \frac{1}{h} = \frac{-1}{x(x + h)}

Step 4. Let h \to 0.

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

The derivative is negative for every x \neq 0, which matches the graph of \frac{1}{x}: it falls on both branches. At x = 1 the slope is -1, so the tangent line is y = -x + 2.

Graph of y = 1/x with its tangent line y = −x + 2 at the point (1, 1)
From the limit definition, the derivative of \frac{1}{x} is -\frac{1}{x^2}, so the slope at x = 1 is -1.

Worked example 3: the derivative of √x

Find f'(x) for f(x) = \sqrt{x}.

Step 1. Write the difference quotient.

\frac{\sqrt{x + h} - \sqrt{x}}{h}

Substituting h = 0 gives \frac{0}{0}, and there is nothing to expand. A difference of square roots calls for the conjugate.

Step 2. Multiply by the conjugate over itself.

\frac{\sqrt{x + h} - \sqrt{x}}{h} \cdot \frac{\sqrt{x + h} + \sqrt{x}}{\sqrt{x + h} + \sqrt{x}} = \frac{(x + h) - x}{h\left(\sqrt{x + h} + \sqrt{x}\right)}

Step 3. Simplify and cancel. The top is just h:

\frac{h}{h\left(\sqrt{x + h} + \sqrt{x}\right)} = \frac{1}{\sqrt{x + h} + \sqrt{x}}

Step 4. Let h \to 0.

f'(x) = \frac{1}{\sqrt{x} + \sqrt{x}} = \frac{1}{2\sqrt{x}}

This works for x > 0. At x = 0 the slope blows up: the graph of \sqrt{x} starts with a vertical tangent. At x = 4, f'(4) = \frac{1}{2 \cdot 2} = \frac{1}{4}, so the tangent line there is y = \frac{1}{4}x + 1.

Worked example 4: the alternate form at a point

Find f'(3) for f(x) = x^2 - 4x using f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a}.

Step 1. Compute f(3). f(3) = 9 - 12 = -3.

Step 2. Set up the limit.

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

Step 3. Factor and cancel. x^2 - 4x + 3 = (x - 3)(x - 1), so the limit becomes \lim_{x \to 3} (x - 1).

Step 4. Substitute. f'(3) = 3 - 1 = 2.

Check with the power rule: f'(x) = 2x - 4, and f'(3) = 2.

What the derivative tells you

Once you have f'(x), it does more than give the slope at one point. It is a new function that reports the slope at every point, and that slope has a meaning in context.

  • Slope of the tangent line. f'(a) is the slope of the line that just touches the graph at x = a. The tangent line is y = f(a) + f'(a)(x - a).
  • Instantaneous rate of change. If s(t) is position at time t, the difference quotient is an average velocity over a time interval of length h. Its limit, s'(t), is the velocity at the instant t.
  • Increasing or decreasing. Where f'(x) > 0 the graph rises; where f'(x) < 0 it falls. For f(x) = x^2, f'(x) = 2x is negative for x < 0 and positive for x > 0, which is exactly the shape of the parabola.

Notation varies by textbook, but all of these mean the same thing:

f'(x) \qquad \frac{dy}{dx} \qquad \frac{d}{dx} f(x) \qquad y'

The Leibniz form \frac{dy}{dx} is a reminder of where the derivative comes from: a small change in y divided by a small change in x, in the limit.

When the derivative does not exist

The limit in the definition can fail. For f(x) = |x| at x = 0, the difference quotient is \frac{|h|}{h}, which equals 1 for h > 0 and -1 for h < 0. The one-sided limits disagree, so f'(0) does not exist. Graphically, the corner at the origin has no single tangent line. Functions also fail to be differentiable at jumps, holes and vertical tangents, so a function must be continuous to have a derivative.

Common mistakes with the limit definition

  1. Writing f(x) + h instead of f(x + h). For f(x) = x^2, f(x + h) is (x + h)^2, not x^2 + h.
  2. Expanding (x + h)^2 as x^2 + h^2. The middle term 2xh is the whole derivative. Never drop it.
  3. Substituting h = 0 too early. If any h is still in a denominator by itself, keep simplifying.
  4. Losing the minus sign in f(x+h) - f(x). Put f(x) in parentheses: -(x^2 - 4x) distributes to both terms.
  5. Dropping the \lim. Write \lim_{h \to 0} on every line until you actually let h \to 0.

Quick reference

f(x) Key algebra step f'(x)
x^2 Expand (x+h)^2 2x
x^3 Expand (x+h)^3 3x^2
\frac{1}{x} Common denominator -\frac{1}{x^2}
\sqrt{x} Conjugate \frac{1}{2\sqrt{x}}
mx + b Cancel directly m

Practice builds the algebra

The limit definition is mostly careful algebra: expanding, combining fractions and multiplying by conjugates without dropping a term. The interactive lesson below walks you through difference quotients one step at a time, checks each line instantly, and shows exactly where a sign or a 2xh went missing. Once it clicks, the shortcut rules will make complete sense.

Practice it now

The limit definition

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the limit definition of the derivative?

The derivative of f at x is f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}. It is the limit of the slopes of secant lines through (x, f(x)) and a nearby point, which gives the slope of the tangent line.

What is the difference quotient?

The difference quotient is \frac{f(x+h) - f(x)}{h}. It is the slope of the line through two points on the graph that are a horizontal distance h apart, so it measures the average rate of change over that interval.

Why do we need the limit definition if there are derivative rules?

The rules, like the power rule, are proved from the limit definition. Learning it shows why the rules are true, and some courses and exams ask you to compute a derivative "from first principles" to show you understand what a derivative is.

What is the alternate form of the definition of the derivative?

At a specific point a, you can write f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a}. It is the same idea with the second point written as x instead of a + h.

Why does plugging in h = 0 not work?

Because both the numerator and the denominator become 0, giving the indeterminate form \frac{0}{0}. The limit asks what happens as h approaches 0, so you simplify algebraically until the factor of h cancels, then let h \to 0.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.