What is a derivative?
What does a derivative tell you?
Think about a car journey. Your average speed is how far you went over how long it took. But the speedometer shows something else: how fast you are going right now. That reading is a derivative. It is the rate at which your distance is changing at one instant, called the instantaneous rate of change.
On a graph, a straight line has the same slope everywhere. A curve doesn't: it gets steeper and shallower as you move along. The derivative gives the slope at each point. A positive derivative means the graph is going up there, a negative one means it is going down, and a derivative of zero means it is flat for an instant, as at the top of a hill or the bottom of a valley.
Derivative notation
| Notation | Read as | Where you see it |
|---|---|---|
| f′(x) | f prime of x | When the function is named f |
| dy/dx | d y by d x, or dee y dee x | When y is written in terms of x |
| d/dx (x²) | the derivative of x squared | Applying the derivative to an expression |
| ẏ or ẋ (a dot over the letter) | y dot | Physics, for a rate of change over time |
dy/dx is not a fraction you can cancel, but it reminds you what it means: a tiny change in y divided by a tiny change in x. Finding a derivative is called differentiation, and you differentiate a function to get it.
From a secant to a tangent
You can find the slope between two points on a curve easily: rise over run. That line through two points is called a secant. The trick of calculus is to slide the second point closer and closer to the first. The secant turns into the tangent, the line that just touches the curve at one point, and its slope settles on a single value.
Take f(x) = x² + 3x at x = 1, where f(1) = 4. Here is the slope from x = 1 to x = 1 + h for smaller and smaller gaps h:
| Gap h | Second point | Slope of the secant |
|---|---|---|
| 1 | x = 2 | 6 |
| 0.1 | x = 1.1 | 5.1 |
| 0.01 | x = 1.01 | 5.01 |
| 0.001 | x = 1.001 | 5.001 |
The slopes close in on 5. You can't put h = 0 straight in, because that would mean dividing by zero, but you can see where the values are heading. That value is the derivative of f at x = 1. See it happen in the course's secant and tangent demo in the Calculus course.
The limit definition of a derivative
Written as a formula, the slope of the secant is (f(x + h) − f(x)) ÷ h, and the derivative is what that becomes as h shrinks to zero. This is the formal definition, as given in OpenStax Calculus:
Using it is called differentiating from first principles. Here it is for f(x) = x² + 3x. First, expand f(x + h):
Subtract f(x) = x² + 3x, and only the terms with h are left. Divide by h:
Now let h shrink to zero, and the h term disappears. So f′(x) = 2x + 3. At x = 1 that gives 2 + 3 = 5, matching the table.
The power rule: the quick way
Working from first principles every time would be slow, so mathematicians found rules. The most used is the power rule: multiply by the power, then take one off the power.
Two more facts make it work on whole expressions: a number in front stays in front, and you differentiate each term separately. The derivative of a constant on its own is 0, because a flat line has no slope. So for y = 4x³ − 5x² + 7x − 2:
At x = 2, the slope is 12(4) − 10(2) + 7 = 48 − 20 + 7 = 35. Check any of these in our Derivative Calculator, which names each rule as it uses it.
Try one: this question asks you to differentiate a polynomial with the power rule.
Differentiate a random polynomial and type the derivative.
Press Mark to have your answer marked in the Calculus course.
Common derivatives to know
| Function | Derivative |
|---|---|
| a number, c | 0 |
| xⁿ | nxⁿ⁻¹ |
| sin x | cos x |
| cos x | −sin x |
| eˣ | eˣ |
| ln x | 1/x |
| aˣ | aˣ ln a |
The trig results only hold when x is in radians. For functions built from others, you need the chain rule (a function inside a function), the product rule (two functions multiplied) or the quotient rule (one divided by another).
What are derivatives used for?
Speed and acceleration
If h = 20t − 4.9t² gives a ball's height in metres t seconds after it is thrown upwards, the derivative is its velocity: dh/dt = 20 − 9.8t. After 1 second the ball is rising at 20 − 9.8 = 10.2 m/s. Differentiate again and you get the acceleration, −9.8 m/s², which is gravity. The ball stops rising when its velocity is zero: 20 − 9.8t = 0 gives t ≈ 2.04 s.
Finding maximums and minimums
At the top of a hill or the bottom of a valley on a graph, the slope is zero. So to find the highest or lowest points, set the derivative equal to zero and solve. Take f(x) = x³ − 12x. Its derivative is f′(x) = 3x² − 12, which is zero when x² = 4, so at x = 2 and x = −2.
Here x is the input and y = f(x). The curve is flat for an instant at x = −2, where y = 16, and at x = 2, where y = −16. Between them the derivative is negative and the curve slopes down; outside them it is positive and the curve rises.
This graph shows the slope of the first one at every x. It crosses zero exactly where the first graph has its turning points, and it is below the axis where the first graph goes downhill.
The second derivative
Differentiating twice gives the second derivative, written f″(x) or d²y/dx². It tells you how the slope is changing. For f(x) = x³ − 12x, f″(x) = 6x. At x = 2 it is 12, which is positive, so the slope is increasing and the point is a minimum. At x = −2 it is −12, so that point is a maximum.
Beyond maths class, derivatives describe how fast a population grows, how a company's cost changes with each extra item made (marginal cost), how quickly a medicine leaves the blood, and how machine learning models adjust themselves step by step, a method called gradient descent.
Common mistakes
- Forgetting the constant goes to zero. The derivative of x² + 5 is 2x, not 2x + 5.
- Taking one off the power before multiplying. For x³, multiply by 3 first, then the power becomes 2: 3x².
- Differentiating x as 0. x is x¹, so its derivative is 1x⁰ = 1.
- Mixing up the derivative and the original function. f′(2) is a slope; f(2) is a height on the graph.
- Using degrees with trig derivatives. d/dx (sin x) = cos x only in radians.
- Treating dy/dx as y divided by x. It is one symbol for the rate of change.
Common questions
What is a derivative in simple terms?
What is the derivative of x?
What is the difference between a derivative and an integral?
What does it mean if the derivative is zero?
Is the derivative the same as the gradient?
Who invented derivatives?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Derivative Calculator
Differentiate any function and see each rule applied
Open the tool - Learn it
Calculus
Differentiation, integration and the mathematics that drives physics and engineering
Start the course - Test it
AP Calculus AB
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper