# What is the difference quotient of f?

Finds and simplifies the difference quotient (f(x + h) − f(x))/h of a function, and its limit f′(x) as h → 0.

- Page: https://www.acalculator.org/math/difference-quotient-calculator
- JSON spec: https://www.acalculator.org/math/difference-quotient-calculator.json
- Version: 63dfcfe2f893

## Default answer

Example with the default inputs (Function f(x) x^2 + 3x - 4): The difference quotient of x^2 + 3x - 4 is h + 2x + 3.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Function f(x) | The function of x. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| quotient | (f(x + h) − f(x))/h = | The difference quotient, simplified where the h in the bottom cancels. |
| expanded | f(x + h) = | f with x replaced by x + h. |
| derivative | f′(x) = | The limit of the quotient as h → 0. |

## Method

(f(x + h) − f(x))/h, with f(x + h) − f(x) written as one fraction and its top expanded so the h cancels.

## Assumptions

- h ≠ 0. The variable is x; angles in radians.
- An answer that fails its check is not shown.

## Worked examples

1. f = x^2 + 3x - 4 gives quotient = h + 2x + 3, derivative = 2x + 3. Source: https://openstax.org/books/college-algebra-2e/pages/3-1-functions-and-function-notation.
2. f = 1/x gives quotient = -1/(x (h + x)), derivative = -1/x^2.
3. f = 3x^2 - 4x + 1 gives quotient = 3h + 6x - 4, derivative = 6x - 4.

## FAQ

### What is the difference quotient?

For a function f and a step h ≠ 0, the difference quotient is (f(x + h) − f(x))/h. It is the slope of the secant line through (x, f(x)) and (x + h, f(x + h)), the average rate of change of f over that step.

### How do I simplify a difference quotient?

Write f(x + h), subtract f(x), combine everything over one denominator, expand the top, and cancel the factor h. For f(x) = x² + 3x − 4: f(x + h) − f(x) = 2xh + h² + 3h = h(2x + h + 3), so the quotient is 2x + h + 3.

### How is the difference quotient related to the derivative?

The derivative is its limit: f′(x) = lim_{h→0} (f(x + h) − f(x))/h. Once the h has cancelled, put h = 0: 2x + h + 3 gives f′(x) = 2x + 3.

### How do I handle a fraction such as 1/x?

Put the two fractions 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)), whose limit as h → 0 is −1/x².

### Why does the page not simplify the quotient of sqrt(x)?

The top √(x + h) − √x has no factor h after expanding; a textbook multiplies by the conjugate √(x + h) + √x to get 1/(√(x + h) + √x). The page shows the quotient as written in such cases, and still gives f′(x) from the algebra.

### What is the difference quotient with a in place of x?

It is the same expression at a fixed point a: (f(a + h) − f(a))/h. Put a in place of x in the answer: for x² + 3x − 4 it is 2a + h + 3.

## Sources

- OpenStax, College Algebra 2e, section 3.1 Functions and Function Notation (retrieved 2026-10-03): https://openstax.org/books/college-algebra-2e/pages/3-1-functions-and-function-notation
- OpenStax, Calculus Volume 1, section 3.1 Defining the Derivative (retrieved 2026-10-03): https://openstax.org/books/calculus-volume-1/pages/3-1-defining-the-derivative
