Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Calculus

What Is a Derivative? A Clear Introduction

By MathSolver Pro Editorial Team · Published

The derivative of a function measures how fast its output changes as its input changes, at a single instant. Graphically it is the slope of the tangent line; algebraically it is the limit of average rates of change over smaller and smaller intervals.

From average rate to instantaneous rate

If a car travels 120 km in 2 hours, its average speed is 60 km per hour. That number says nothing about the speed shown on the speedometer at a particular moment, which may have been 0 at a traffic light or 100 on the motorway. The derivative is the mathematical version of the speedometer reading: the rate of change at one instant rather than over an interval.

For any function ff, the average rate of change between xx and x+hx + h is the slope of the line through those two points on the graph, called a secant line:

f(x+h)−f(x)h\frac{f(x + h) - f(x)}{h}

To get the instantaneous rate, shrink the interval. As hh approaches 0, the secant line pivots towards the tangent line, the line that just touches the curve at the point. The limit of the secant slopes is the derivative.

The formal definition

The derivative of ff at xx is

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

provided the limit exists. When it does, ff is called differentiable at xx. You cannot simply set h=0h = 0 in the fraction, because that gives 00\frac{0}{0}. Instead you simplify algebraically until the hh in the denominator cancels, then take the limit. If limits are new to you, our guide to limits covers the idea first.

Example 1: derivative of f(x)=x2f(x) = x^2

  1. Difference quotient: (x+h)2−x2h=x2+2xh+h2−x2h\frac{(x + h)^2 - x^2}{h} = \frac{x^2 + 2xh + h^2 - x^2}{h}.
  2. Simplify: 2xh+h2h=2x+h\frac{2xh + h^2}{h} = 2x + h, valid for h≠0h \ne 0.
  3. Take the limit: as h→0h \to 0, 2x+h→2x2x + h \to 2x. So f′(x)=2xf'(x) = 2x.
  4. At x=3x = 3 the slope is 6, and the tangent line through (3,9)(3, 9) is y=6x−9y = 6x - 9.

Example 2: derivative of f(x)=1xf(x) = \frac{1}{x}

  1. 1x+h−1xh=x−(x+h)h x(x+h)=−1x(x+h)\frac{\frac{1}{x + h} - \frac{1}{x}}{h} = \frac{x - (x + h)}{h\,x(x + h)} = \frac{-1}{x(x + h)}.
  2. As h→0h \to 0: f′(x)=−1x2f'(x) = -\frac{1}{x^2}, defined for every x≠0x \ne 0.
  3. The slope is always negative, which matches the graph: 1x\frac{1}{x} decreases on each side of 0.

Example 3: derivative of f(x)=xf(x) = \sqrt{x}

  1. Multiply the difference quotient by the conjugate: x+h−xh⋅x+h+xx+h+x=1x+h+x\frac{\sqrt{x + h} - \sqrt{x}}{h}\cdot\frac{\sqrt{x + h} + \sqrt{x}}{\sqrt{x + h} + \sqrt{x}} = \frac{1}{\sqrt{x + h} + \sqrt{x}}.
  2. As h→0h \to 0: f′(x)=12xf'(x) = \frac{1}{2\sqrt{x}} for x>0x > 0.

Notation

Several notations are in common use, and they all mean the same thing. Lagrange's prime notation writes f′(x)f'(x). Leibniz notation writes dydx\frac{dy}{dx} or ddxf(x)\frac{d}{dx}f(x), which reminds you that a derivative is a ratio of small changes and makes the chain rule look natural. Physicists often write a dot, x˙\dot{x}, for a derivative with respect to time.

Applying the derivative twice gives the second derivative, written f′′(x)f''(x) or d2ydx2\frac{d^2y}{dx^2}. If s(t)s(t) is position, then s′(t)s'(t) is velocity and s′′(t)s''(t) is acceleration.

What the derivative tells you about a graph

  • Where f′(x)>0f'(x) > 0, the function is increasing.
  • Where f′(x)<0f'(x) < 0, it is decreasing.
  • Where f′(x)=0f'(x) = 0, the tangent is horizontal; local maxima and minima occur at such points (or where f′f' does not exist).
  • Where f′′(x)>0f''(x) > 0, the graph is concave up, bending like a cup; where f′′(x)<0f''(x) < 0, it is concave down.

Example 4: turning points of f(x)=x3−3xf(x) = x^3 - 3x

  1. Using the power rule, f′(x)=3x2−3=3(x−1)(x+1)f'(x) = 3x^2 - 3 = 3(x - 1)(x + 1).
  2. f′(x)=0f'(x) = 0 at x=−1x = -1 and x=1x = 1.
  3. The sign of f′f' goes +,−,++, -, + across those points, so x=−1x = -1 is a local maximum with f(−1)=2f(-1) = 2 and x=1x = 1 is a local minimum with f(1)=−2f(1) = -2.
  4. Second derivative check: f′′(x)=6xf''(x) = 6x is negative at −1-1 (concave down, a maximum) and positive at 1 (a minimum).

The rules that make this quick, such as the power rule used here, are explained in derivative rules explained.

A physical example: a falling stone

A stone dropped from rest falls a distance s(t)=4.9t2s(t) = 4.9t^2 metres after tt seconds, ignoring air resistance. Between t=1t = 1 and t=3t = 3 it falls from 4.9 m to 44.1 m, so its average velocity is 44.1−4.92=19.6\frac{44.1 - 4.9}{2} = 19.6 m/s.

Its instantaneous velocity is the derivative, s′(t)=9.8ts'(t) = 9.8t m/s. At t=2t = 2 that is 19.6 m/s, exactly the average over the interval from 1 to 3 seconds; for a quadratic, the average rate over an interval always equals the instantaneous rate at its midpoint. The second derivative, s′′(t)=9.8s''(t) = 9.8 m/s², is the constant acceleration due to gravity.

Units are a good check on any derivative. The derivative of a quantity measured in metres with respect to time in seconds is measured in metres per second. In economics, the derivative of total cost in dollars with respect to quantity produced is the marginal cost, in dollars per unit.

When a derivative does not exist

A function is not differentiable at a point if the limit of the difference quotient fails to exist there. On a graph this shows up in four ways:

  • A corner, such as ∣x∣|x| at 0, where the slope is −1-1 from the left and +1+1 from the right.
  • A cusp, such as x2/3x^{2/3} at 0, where the slopes become infinitely steep in opposite directions.
  • A vertical tangent, such as x3\sqrt[3]{x} at 0, where the slope is infinite.
  • A discontinuity, such as a jump or a hole.

Differentiability implies continuity: if f′(a)f'(a) exists, ff is continuous at aa. The converse is false, as ∣x∣|x| shows, since it is continuous everywhere but has a corner at 0.

Estimating a derivative numerically

When a formula is unavailable, for example with measured data, a derivative can be estimated with a small step. The symmetric difference quotient is usually more accurate than the one sided version:

f′(x)≈f(x+h)−f(x−h)2hf'(x) \approx \frac{f(x + h) - f(x - h)}{2h}

For f(x)=sin⁡xf(x) = \sin x at x=0x = 0 with h=0.01h = 0.01, this gives sin⁡0.01−sin⁡(−0.01)0.02≈0.99998\frac{\sin 0.01 - \sin(-0.01)}{0.02} \approx 0.99998, very close to the exact value cos⁡0=1\cos 0 = 1. Graphing calculators and spreadsheets use this kind of estimate. The derivative calculator instead differentiates symbolically and shows each rule it applies, and the limit calculator evaluates the limit definition directly.

Where derivatives are used

Any question of the form how fast, or which value is best, is a derivative question. Engineers find the dimensions of a container that use the least material by setting the derivative of the surface area to zero. Economists find the production level that maximises profit, which is where marginal revenue equals marginal cost. Doctors model how the concentration of a drug in the blood changes over time, and the derivative tells them when it peaks.

Machine learning relies on derivatives at enormous scale. Training a model means adjusting millions of parameters to reduce an error measure, and the direction to move each parameter is given by a derivative, a method called gradient descent. Physics is written almost entirely in derivatives: Newton's second law says force equals mass times the second derivative of position.

A short history

Isaac Newton and Gottfried Wilhelm Leibniz developed calculus independently in the second half of the seventeenth century. Newton thought in terms of quantities flowing in time, while Leibniz worked with infinitely small differences, and his dydx\frac{dy}{dx} notation is the one most textbooks use today. Their methods worked brilliantly but rested on vague ideas about infinitely small numbers. The precise limit definition used in this article was developed in the nineteenth century, mainly by Augustin-Louis Cauchy and Karl Weierstrass, which finally put the subject on a rigorous footing.

Frequently asked questions

Is the derivative the same as the slope?

The derivative at a point is the slope of the tangent line at that point. For a straight line the derivative is constant and equals the line's slope; for a curve it changes from point to point.

Why can't I just substitute h = 0 in the definition?

Substituting directly gives 00\frac{0}{0}, which has no value. The limit asks what the quotient approaches as hh gets close to 0, which is found by simplifying first so the hh in the denominator cancels.

Can a continuous function fail to have a derivative?

Yes. The absolute value function is continuous at 0 but has a corner there, so its left and right slopes disagree and the derivative does not exist. There are even continuous functions with no derivative anywhere.

What units does a derivative have?

The units of the output divided by the units of the input. If VV is volume in litres and tt is time in minutes, then dVdt\frac{dV}{dt} is in litres per minute.

MathSolver Pro Editorial Team

Math content and review

Our editorial team writes every guide to explain the reasoning behind each method, not just the answer. Each worked example is checked against the site's own solver engines and automated tests before it is published, and articles are revised whenever a method or an exam format changes.