Introduction

A car's speedometer reads 80 km/h. What does that number actually mean? You haven't driven for an hour, so it can't be "distance divided by an hour". It describes how fast your position is changing right now, at a single instant. Making that idea precise is exactly what a derivative does.

Derivatives are the heart of Grade 12 Calculus and Vectors (MCV4U in Ontario) and of every first-year calculus course. In this guide you will see where the derivative comes from, compute one from first principles, and then learn the shortcut rules that make differentiation fast — with every step shown.

Definition — Derivative

The derivative of a function $f$ at a point $x$ is the instantaneous rate of change of $f$ at $x$. Geometrically, it is the slope of the tangent line to the graph of $f$ at that point. It is written $f'(x)$ (read "f prime of x") or $\dfrac{dy}{dx}$.

From Secant to Tangent

You already know how to find an average rate of change: pick two points on a graph and compute the slope between them. The line through two points on a curve is called a secant line.

$$\text{average rate of change} = \frac{f(b) - f(a)}{b - a}$$

For $f(x) = x^2$ between $x = 1$ and $x = 2$, that slope is $\dfrac{4 - 1}{2 - 1} = 3$. Now slide the second point closer and closer to the first. The secant line swings round and settles on the tangent line, the line that just touches the curve at $x = 1$. Its slope is the instantaneous rate of change.

Graph of y equals x squared with a secant line through (1,1) and (2,4) of slope 3 and a tangent line at (1,1) of slope 2
Figure 1. On $y = x^2$, the secant through $(1,\,1)$ and $(2,\,4)$ has slope 3 (the average rate). The tangent at $(1,\,1)$ has slope 2 — that is the derivative $f'(1)$.
Second pointSecant slope $\frac{f(1+h) - f(1)}{h}$
$h = 1$$(4 - 1)/1 = 3$
$h = 0.1$$(1.21 - 1)/0.1 = 2.1$
$h = 0.01$$(1.0201 - 1)/0.01 = 2.01$
$h = 0.001$$(1.002001 - 1)/0.001 = 2.001$

The slopes are closing in on 2. The derivative makes "closing in on" exact using a limit.

The Limit Definition (First Principles)

$$f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}$$
SymbolMeaning
$h$The small horizontal gap between the two points of the secant line
$f(x+h) - f(x)$The rise: how much $f$ changes across that gap
$\frac{f(x+h)-f(x)}{h}$Rise over run: the slope of the secant line
$\lim_{h \to 0}$"What value does this approach as $h$ shrinks towards 0?" — turns the secant into the tangent
1
Find the derivative of $f(x) = x^2$ from first principles
1

Substitute into the definition.

$$f'(x) = \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h}$$
2

Expand and simplify the numerator.

$$\frac{x^2 + 2xh + h^2 - x^2}{h} = \frac{2xh + h^2}{h} = 2x + h \quad (h \neq 0)$$
3

Now let $h \to 0$.

$$f'(x) = \lim_{h \to 0} (2x + h) = 2x$$
Answer

$f'(x) = 2x$. At $x = 1$ the slope of the tangent is $2(1) = 2$, matching Figure 1 and the table above. ✓

Intuition — Why can't we just put h = 0?

Putting $h = 0$ straight into $\frac{f(x+h)-f(x)}{h}$ gives $\frac{0}{0}$, which is undefined: two points that are the same point don't determine a line. The limit sidesteps this by asking what the slope approaches, after the algebra has cancelled the $h$ in the denominator.

The Power Rule and Basic Rules

Doing a limit every time would be slow. Repeating the first-principles calculation for $x^3$, $x^4$ and so on reveals a pattern, called the power rule:

$$\frac{d}{dx}\left(x^n\right) = n\,x^{n-1}$$

Bring the exponent down in front, then reduce the exponent by one. It works for any real exponent $n$, including negatives and fractions: $\frac{d}{dx}\sqrt{x} = \frac{d}{dx}x^{1/2} = \tfrac{1}{2}x^{-1/2}$.

RuleStatementExample
Constant$\frac{d}{dx}(c) = 0$$\frac{d}{dx}(7) = 0$ — a flat line has slope 0
Power$\frac{d}{dx}(x^n) = nx^{n-1}$$\frac{d}{dx}(x^5) = 5x^4$
Constant multiple$\frac{d}{dx}(c\,f) = c\,f'$$\frac{d}{dx}(4x^3) = 12x^2$
Sum / difference$\frac{d}{dx}(f \pm g) = f' \pm g'$$\frac{d}{dx}(x^2 + 3x) = 2x + 3$

The Product and Chain Rules

Product rule

When two functions are multiplied, the derivative is not the product of the derivatives. Instead:

$$\frac{d}{dx}\big(f(x)\,g(x)\big) = f'(x)\,g(x) + f(x)\,g'(x)$$

"Derivative of the first times the second, plus the first times the derivative of the second." For example, $\frac{d}{dx}\big(x^2(3x+1)\big) = 2x(3x+1) + x^2(3) = 9x^2 + 2x$. Check by expanding first: $x^2(3x+1) = 3x^3 + x^2$, whose derivative is $9x^2 + 2x$. ✓

Chain rule

When one function sits inside another, such as $(2x+1)^5$, differentiate the outside function (leaving the inside alone), then multiply by the derivative of the inside:

$$\frac{d}{dx}\,f\big(g(x)\big) = f'\big(g(x)\big)\cdot g'(x)$$

For $(2x+1)^5$: the outside is "something to the 5th", with derivative $5(\text{something})^4$; the inside $2x+1$ has derivative 2. So $\frac{d}{dx}(2x+1)^5 = 5(2x+1)^4 \cdot 2 = 10(2x+1)^4$.

Worked Example — Motion of a Ball

A ball is thrown straight up from a height of 2 m. Its height in metres after $t$ seconds is $s(t) = -4.9t^2 + 20t + 2$. The derivative of position is velocity.

2
When does the ball reach its highest point, and how high is it?
1

Differentiate to get velocity, term by term with the power rule.

$$v(t) = s'(t) = -9.8t + 20$$
2

At the top, the ball stops rising for an instant, so $v(t) = 0$.

$$-9.8t + 20 = 0 \;\Rightarrow\; t = \frac{20}{9.8} \approx 2.04 \text{ s}$$
3

Substitute back into $s(t)$ for the height.

$$s(2.04) \approx -4.9(2.04)^2 + 20(2.04) + 2 \approx 22.4 \text{ m}$$
Answer

The ball reaches its maximum height of about 22.4 m after about 2.04 s. Before then $v(t) > 0$ (rising); afterwards $v(t) < 0$ (falling). Differentiating once more gives $v'(t) = -9.8$ m/s², the acceleration due to gravity.

Common Mistakes

Mistake 1 — Multiplying derivatives for a product

$\frac{d}{dx}(fg) \neq f'g'$. For $x^2 \cdot x^3 = x^5$, the correct derivative is $5x^4$, but $f'g'$ would give $2x \cdot 3x^2 = 6x^3$. Use the product rule, or simplify first.

Mistake 2 — Forgetting the inside derivative

$\frac{d}{dx}(2x+1)^5$ is $10(2x+1)^4$, not $5(2x+1)^4$. Whenever the inside is anything other than plain $x$, the chain rule's extra factor is needed.

Mistake 3 — Power rule on a constant base

The power rule is for $x^n$ (variable base, constant exponent). It does not apply to $2^x$ (constant base, variable exponent), which is an exponential function with its own rule.

Practice Problems

Work each problem on paper first, then use the hint button to check.

1

Differentiate $f(x) = 3x^4 - 5x^2 + 7$.

Apply the power rule to each term: $3 \cdot 4x^3 - 5 \cdot 2x + 0 = 12x^3 - 10x$.
2

Find the equation of the tangent line to $y = x^2$ at $x = 3$.

The point is $(3,\,9)$. The slope is $f'(3) = 2(3) = 6$. Using $y - 9 = 6(x - 3)$ gives $y = 6x - 9$.
3

Differentiate $g(x) = (x^2 + 1)^3$ using the chain rule, then check by expanding.

Chain rule: $3(x^2+1)^2 \cdot 2x = 6x(x^2+1)^2$. Check: $(x^2+1)^3 = x^6 + 3x^4 + 3x^2 + 1$, whose derivative is $6x^5 + 12x^3 + 6x = 6x(x^4 + 2x^2 + 1) = 6x(x^2+1)^2$. ✓
Want to go deeper?

Next come the quotient rule, derivatives of exponential and trigonometric functions, and applications such as optimization and related rates. If you'd like a 1-on-1 session on any of these with a TutorDice tutor, your first session is free.