Ma · Mathematics

How to Find a Derivative Using the Difference Quotient

Published By the 9to5Science editorial team

At a glance

  1. 1. Write the definition

    Replace the derivative with the limit of the change in function values divided by the change in input.

  2. 2. Substitute the function

    Find f(x+h), then form [f(x+h) − f(x)]/h.

  3. 3. Simplify first

    Expand and combine terms, then factor and cancel h when possible.

  4. 4. Take the limit

    Let h approach zero in the simplified expression to obtain f'(x).

The difference quotient is the limit definition of a derivative. It measures the average rate of change between two nearby inputs, then lets the distance between them shrink to zero. Since no particular function is specified here, the method below shows how to use the quotient for a general function and works through a complete example.

The difference quotient definition

For a function ff, the derivative at an input xx is defined by

f′(x)=lim⁡h→0f(x+h)−f(x)h,f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h},

provided this limit exists. The number hh is the change in the input. The two function values, f(x+h)f(x+h) and f(x)f(x), give the corresponding change in output. Dividing by hh gives the average rate of change; taking the limit gives the instantaneous rate of change.

The same definition can find the derivative at one specified point aa:

f′(a)=lim⁡h→0f(a+h)−f(a)h.f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}.

Use xx when you want a formula for the derivative function, and use aa when you only need the slope at a particular input.

A step-by-step method

  1. Start with the appropriate definition: use xx for a derivative formula or the given point aa for a derivative value.
  2. Substitute the function into both terms in the numerator. In particular, calculate f(x+h)f(x+h) by replacing every xx in the function with x+hx+h.
  3. Expand brackets and simplify the numerator. Factor out hh if possible, then cancel it with the denominator. This cancellation is valid for h≠0h\ne 0, which is exactly the condition in the difference quotient before the limit is taken.
  4. Take the limit as hh approaches zero. If the simplified expression is defined at h=0h=0, direct substitution usually gives the limit.

Worked example: differentiate f(x)=x2+3xf(x)=x^2+3x

Find the derivative from the definition. First substitute x+hx+h everywhere that xx appears:

f(x+h)=(x+h)2+3(x+h)=x2+2xh+h2+3x+3h.\begin{aligned} f(x+h)&=(x+h)^2+3(x+h)\\ &=x^2+2xh+h^2+3x+3h. \end{aligned}

Now subtract f(x)=x2+3xf(x)=x^2+3x and divide by hh:

f(x+h)−f(x)h=x2+2xh+h2+3x+3h−(x2+3x)h=2xh+h2+3hh=2x+h+3,h≠0.\begin{aligned} \frac{f(x+h)-f(x)}{h} &=\frac{x^2+2xh+h^2+3x+3h-(x^2+3x)}{h}\\ &=\frac{2xh+h^2+3h}{h}\\ &=2x+h+3,\qquad h\ne 0. \end{aligned}

The first line requires parentheses around f(x)f(x) because the entire value is being subtracted. After canceling the common factor of hh, take the limit:

f′(x)=lim⁡h→0(2x+h+3)=2x+3.f'(x)=\lim_{h\to 0}(2x+h+3)=2x+3.

For example, the slope at x=2x=2 is f′(2)=2(2)+3=7f'(2)=2(2)+3=7. The difference quotient can also find that value directly by setting x=2x=2 from the start:

f′(2)=lim⁡h→0f(2+h)−f(2)h=lim⁡h→0(2+h)2+3(2+h)−10h=lim⁡h→0(7+h)=7.\begin{aligned} f'(2)&=\lim_{h\to 0}\frac{f(2+h)-f(2)}{h}\\ &=\lim_{h\to 0}\frac{(2+h)^2+3(2+h)-10}{h}\\ &=\lim_{h\to 0}(7+h)=7. \end{aligned}

Common mistakes

  • Substituting incorrectly into f(x+h)f(x+h). Replace every occurrence of xx, including those inside powers and parentheses. For instance, (x+h)2(x+h)^2 expands to x2+2xh+h2x^2+2xh+h^2, not x2+h2x^2+h^2.
  • Forgetting the subtraction parentheses. The numerator is f(x+h)−f(x)f(x+h)-f(x). Every term in f(x)f(x) changes sign when you subtract it.
  • Putting h=0h=0 too early. The original quotient has denominator zero at h=0h=0, so direct substitution there is not allowed. Simplify the quotient for h≠0h\ne 0 first, then take the limit.
  • Treating the quotient as the derivative. Before taking the limit, it is an average rate of change over an interval of width hh. The derivative is the limit of those values.
  • Stopping at a numerical value when a formula is needed. If the task asks for f′(x)f'(x), keep xx variable. Substitute a number only if the task asks for the derivative at a particular point.

When the limit does not exist

A function does not have a derivative at a point if the difference quotient has no finite limit there. For example, for f(x)=∣x∣f(x)=|x| at x=0x=0, the quotient is

∣0+h∣−∣0∣h=∣h∣h.\frac{|0+h|-|0|}{h}=\frac{|h|}{h}.

This equals 11 when h>0h>0 and −1-1 when h<0h<0. The one-sided limits disagree, so f′(0)f'(0) does not exist. This illustrates why checking the limit—not merely simplifying the quotient—is part of the definition.

References

  1. OpenStax, Calculus Volume 1

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.