Difference Quotient Calculator (Free)

CalculusFreeNo sign-up

The difference quotient is [f(x + h) − f(x)] / h. For f(x) = 2x² + 3x − 5, f(x + h) − f(x) = 4xh + 2h² + 3h, and dividing by h gives 4x + 2h + 3. As h → 0 it becomes 4x + 3, the derivative. The difference quotient calculator below expands, cancels and simplifies any polynomial, fraction or square root this way.

Difference quotient: which form?
Reads asReads asf(x) = 2x2 + 3x − 5
The symbolic answer works for polynomials, fractions such as 1/x or (x+1)/(x−2), and square roots such as sqrt(x+1). The two numbers are optional: they give a numeric value, a table and the secant line.
Try:
Difference quotient
f(x + h) − f(x)h =4x + 2h + 3

[f(x + h) − f(x)]/h for f(x) = 2x² + 3x − 5 simplifies to 4x + 2h + 3. Its limit as h → 0 is f′(x) = 4x + 3.

Limit as h → 0: f′(x)4x + 3
Value at x = 1, h = 0.17.2
Exact slope f′(1)7

As h shrinks, the quotient approaches f′(1)

h [f(x + h) − f(x)]/h Distance from f′(1)
1 9 2
0.1 7.2 0.2
0.01 7.02 0.02
0.001 7.002 0.002
0.0001 7.0002 0.0002
−0.001 6.998 0.002
1231020(x, f(x))
f(x) = 2x² + 3x − 5secant line, slope = quotienttangent line, slope = f′
Show steps
  1. Formulaf(x + h) − f(x)h, h ≠ 0
  2. Substitute x + h for xf(x + h) = 2(x + h)2 + 3(x + h) − 5f(x) = 2x2 + 3x − 5
  3. Expand the powers of (x + h)(x + h)2 = x2 + 2xh + h2
  4. So f(x + h) in expanded form is2x2 + 4xh + 3x + 2h2 + 3h − 5
  5. Subtractf(x + h) − f(x) = (2x2 + 4xh + 3x + 2h2 + 3h − 5) − (2x2 + 3x − 5) = 4xh + 2h2 + 3hEvery term without h cancels, so each remaining term has a factor h.
  6. Divide by h4xh + 2h2 + 3hh = h(4x + 2h + 3)h = 4x + 2h + 3
  7. Take the limit as h → 0Set h = 0 in 4x + 2h + 3: 4x + 3This is the derivative f′(x).
  8. EvaluateAt x = 1, h = 0.1: 7.2. The quotient is the slope of the secant line through the two points; the limit is the slope of the tangent line.

Check the limit: derivative calculator with steps · average rate of change · limit calculator

Difference Quotient Calculator (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the difference quotient calculator

  1. Pick the form your class uses: [f(x + h) − f(x)] / h, or [f(x) − f(a)] / (x − a) for the slope at a point a.
  2. Type the function, for example x^2 + 2x, 1/x, (x+1)/(x-2) or sqrt(x). The “Reads as” line shows how it was understood.
  3. Read the simplified quotient and its limit as h → 0 (or x → a), which is the derivative.
  4. Optionally enter numbers for x and h (or a and x). You get the value of the quotient, a table that shrinks h toward 0, and a graph of the secant line next to the tangent line.
  5. Open Show steps to see the substitution, the expansion, the cancellation and the division by h, one line at a time.

The difference quotient formula

Difference quotient = [f(x + h) − f(x)] / h, with h ≠ 0. The numerator is the change in output between x and x + h; the denominator is the change in input, h. So the quotient is the slope of the secant line through (x, f(x)) and (x + h, f(x + h)), the same idea as the average rate of change on [x, x + h].

The second form, [f(x) − f(a)] / (x − a), measures the slope between a fixed point a and a moving point x. Writing x = a + h turns one form into the other.

When h shrinks to 0 the secant line turns into the tangent line, and the limit of the quotient is the derivative: f′(x) = limh→0 [f(x + h) − f(x)] / h. You cannot set h = 0 before simplifying, because that gives 0/0. You first cancel the factor h, then let h → 0.

How to simplify a difference quotient

  1. Replace every x in f with (x + h) to get f(x + h). Keep the brackets.
  2. Expand, for example (x + h)² = x² + 2xh + h² and (x + h)³ = x³ + 3x²h + 3xh² + h³.
  3. Subtract f(x). Every term without h cancels.
  4. Factor h out of what is left and cancel it with the h in the denominator.
  5. For a fraction, combine f(x + h) − f(x) over a common denominator first. For a square root, multiply top and bottom by the conjugate √(x + h) + √x.

Worked examples

Example 1: a quadratic

f(x) = x² + 2x. Then f(x + h) = (x + h)² + 2(x + h) = x² + 2xh + h² + 2x + 2h. Subtracting f(x) leaves 2xh + h² + 2h = h(2x + h + 2). Dividing by h gives 2x + h + 2, and the limit as h → 0 is 2x + 2.

Example 2: a reciprocal function

f(x) = 1/x. Over a common denominator, 1/(x + h) − 1/x = [x − (x + h)] / [x(x + h)] = −h / [x(x + h)]. Dividing by h gives −1 / [x(x + h)], which tends to −1/x².

Example 3: a square root

f(x) = √x. Multiply by the conjugate: [√(x + h) − √x]/h · [√(x + h) + √x]/[√(x + h) + √x] = h / (h[√(x + h) + √x]). Cancel h to get 1 / (√(x + h) + √x). As h → 0 this becomes 1/(2√x).

Example 4: at a point with numbers

f(x) = x² at x = 3. With h = 1 the quotient is (16 − 9)/1 = 7; with h = 0.1 it is 6.1; with h = 0.01 it is 6.01. The values approach 6 = f′(3), because the simplified quotient is 6 + h.

Difference quotients of common functions

f(x) [f(x + h) − f(x)] / h Limit as h → 0
mx + b m m
x² 2x + h 2x
x³ 3x² + 3xh + h² 3x²
ax² + bx + c 2ax + ah + b 2ax + b
1/x −1/[x(x + h)] −1/x²
√x 1/(√(x + h) + √x) 1/(2√x)

Common mistakes

  • Writing f(x + h) as f(x) + h. For f(x) = x², f(x + h) = x² + 2xh + h², not x² + h.
  • Expanding (x + h)² as x² + h². The middle term 2xh is what survives the subtraction.
  • Dropping the brackets around f(x) when subtracting, so only the first term changes sign.
  • Setting h = 0 before cancelling, which gives 0/0.
  • Forgetting that the answer still contains h. The difference quotient is 2x + h for x²; only the limit is 2x.

Using the calculator for homework

Do the substitution and expansion by hand, then compare each line with Show steps: most errors appear at the expansion or the subtraction. The h-table is a quick sanity check: if your simplified quotient is right, plugging in the same x and h gives the same numbers. For functions such as sin x or eˣ the algebra does not cancel h, so the calculator gives the numbers and the limit from the derivative calculator instead.

Difference quotient practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is the difference quotient [f(x + h) − f(x)]/h for f(x) = x² + 5x?

Found a mistake? Let us know!

2. What is the difference quotient of f(x) = 7x − 2?

Found a mistake? Let us know!

3. What is (x + h)² expanded?

Found a mistake? Let us know!

4. What is the difference quotient of f(x) = 3x²?

Found a mistake? Let us know!

5. For f(x) = x² at x = 2 with h = 0.5, what is the difference quotient?

Found a mistake? Let us know!

6. What is the difference quotient of f(x) = 1/x?

Found a mistake? Let us know!

7. To simplify [√(x + h) − √x]/h, what should you multiply by?

Found a mistake? Let us know!

8. What is the limit of the difference quotient of f(x) = x³ as h → 0?

Found a mistake? Let us know!

9. Why can you not set h = 0 in [f(x + h) − f(x)]/h right away?

Found a mistake? Let us know!

10. For f(x) = x², what is [f(x) − f(a)]/(x − a)?

Found a mistake? Let us know!

Frequently asked questions

What is a difference quotient?

It is [f(x + h) − f(x)]/h, the slope of the secant line between x and x + h. For f(x) = x², it is (2xh + h²)/h = 2x + h.

How do you do the difference quotient?

Substitute x + h into f, subtract f(x), and divide by h. For f(x) = 3x + 1, f(x + h) = 3x + 3h + 1, so the quotient is 3h/h = 3: a line has the same slope everywhere.

How do you find the difference quotient with a calculator?

Enter f, a value of x and a value of h, then make h smaller. For f(x) = x² at x = 3, h = 1, 0.1 and 0.01 give 7, 6.1 and 6.01, approaching 6.

Can you find the difference quotient at a point?

Yes. A specific x gives a number. For f(x) = x³ at x = 1 with h = 0.1, the quotient is (1.331 − 1)/0.1 = 3.31, close to f′(1) = 3. The second tab uses the form [f(x) − f(a)]/(x − a).

How do you simplify the difference quotient?

Expand f(x + h), cancel every term without h, factor h out and cancel it. For f(x) = x² + 2x this gives 2x + h + 2, and the limit as h → 0 is 2x + 2.

Related calculators

More calculus calculators

Browse all 541 calculators

Related to This Article

What people say about "Difference Quotient Calculator: f(x+h) − f(x) / h Steps"?

No one replied yet.

Leave a Reply