# What is the derivative of a function?

Finds the derivative of a function and its value at a point, checked numerically.

- Page: https://www.acalculator.org/math/derivative-calculator
- JSON spec: https://www.acalculator.org/math/derivative-calculator.json
- Version: e95787b970d9

## Default answer

Example with the default inputs (Function f(x) (x^2 + 2)(3x^3 - 5x)): The derivative of (x^2 + 2)(3x^3 - 5x) is 15x^4 + 3x^2 - 10.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Function f(x) | The function, in one letter. |
| at | Slope at (optional) | A point a for the slope of the tangent line. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| derivative | Derivative | The derivative with respect to the letter. |
| slope | Value at a | The derivative at a. |

## Method

A computer algebra system differentiates f; the answer shows only when it matches a numeric difference quotient at 20 points.

## Assumptions

- One variable letter (x if none); radians; ln is the natural logarithm.
- An answer that fails its check is not shown.

## Worked examples

1. f = (x^2 + 2)(3x^3 - 5x) gives derivative = 15x^4 + 3x^2 - 10. Source: OpenStax Calculus Vol. 1, 3.3, Ex. 3.24. https://openstax.org/books/calculus-volume-1/pages/3-3-differentiation-rules.
2. f = x^2 - 4x + 6, at = 1 gives derivative = 2x - 4, slope = -2.
3. f = 6/x^2 gives derivative = -12/x^3.

## FAQ

### What is a derivative?

The derivative f′(x) of a function is its rate of change: the slope of the tangent line to the graph at x. It is the limit of the difference quotient (f(x + h) − f(x))/h as h goes to 0. For f(x) = x², the derivative is 2x, so the slope of the parabola is 2 at x = 1 and −4 at x = −2.

### Which rules does the calculator use?

The same rules as a calculus course: the power rule (xⁿ has derivative nxⁿ⁻¹), the sum and constant multiple rules, the product rule (fg)′ = f′g + fg′, the quotient rule (f/g)′ = (f′g − fg′)/g², the chain rule, and the derivatives of eˣ, ln x, and the trigonometric functions. The answer is then checked with numbers, not by the same rules.

### How is the answer checked?

At 20 points, the page computes the slope of your function numerically, from values of f just left and right of each point, and compares it with the derivative formula. They must agree to 1 part in a million. If they do not, the page says "No verified answer" instead of showing the formula.

### Why does my answer look different from the book’s?

The same derivative can be written in many ways. (20x² + 30x)/(4x + 3)² and 10x(2x + 3)/(4x + 3)² are equal for every x. The page expands a polynomial answer and writes a rational one as a single fraction, but a textbook may factor it differently.

### What is the value at a point?

Type a number in "Slope at" to get f′(a), the slope of the tangent line at x = a. For f(x) = x² − 4x + 6 at a = 1 the slope is −2, so the tangent line is y = f(1) − 2(x − 1) = −2x + 5. If f has a corner or is not defined at a, such as |x| at 0, no value is shown.

### How do I find a second derivative?

Differentiate the answer again: copy the derivative into the box. The second derivative of x³ is the derivative of 3x², which is 6x.

## Sources

- OpenStax, Calculus Volume 1, section 3.3 Differentiation Rules: https://openstax.org/books/calculus-volume-1/pages/3-3-differentiation-rules
- OpenStax, Calculus Volume 1, section 3.2 The Derivative as a Function: https://openstax.org/books/calculus-volume-1/pages/3-2-the-derivative-as-a-function
