# Definition of the derivative

> IB Mathematics: Analysis and Approaches HL · IB AA HL
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u5-definition-of-the-derivative/

This module covers the formal limit definition of the derivative, its geometric meaning, and the relationship between differentiability and continuity. You will learn to differentiate functions from first principles, a common core requirement for IB AA HL exams.

**Prerequisites:** [Basic limits calculation](https://www.owlsprep.com/study/ib-math-aa-hl-u4-limits/); [Continuity of functions](https://www.owlsprep.com/study/ib-math-aa-hl-u5-continuity/)

## Learning objectives

- Understand the geometric interpretation of the derivative as the gradient of the tangent
- Use the limit definition of the derivative to differentiate basic functions from first principles
- Distinguish between differentiability and continuity
- Check differentiability of piecewise functions at junction points

## Formal Limit Definition from First Principles

**Derivative from First Principles** — The derivative of a function $f$ at a point $x$ is the limit of the average rate of change over an interval, as the length of the interval approaches zero. The derivative exists only if this limit is finite.

*Notation:* Two equivalent forms:  
1. $f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$  
2. $f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a}$

*Example:* For $f(x) = x^2$, the derivative at $x=3$ is $\lim_{h \to 0} \frac{(3+h)^2 - 9}{h} = 6$

**Worked example:** Find $f'(x)$ for $f(x) = 2x^2 + 3x - 1$ using first principles.

1. Start with the formal limit definition:
2. $$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$
3. Expand and simplify $f(x+h)$:
4. $$f(x+h) = 2(x+h)^2 + 3(x+h) - 1 = 2x^2 + 4xh + 2h^2 + 3x + 3h - 1$$
5. Subtract $f(x)$ and factor the numerator:
6. $$f(x+h) - f(x) = (2x^2 + 4xh + 2h^2 + 3x + 3h - 1) - (2x^2 + 3x - 1) = h(4x + 2h + 3)$$
7. Cancel $h$ (valid since $h \neq 0$ when taking the limit) then evaluate the limit:
8. $$f'(x) = \lim_{h \to 0} (4x + 2h + 3) = 4x + 3$$

> **Exam tip:** If an exam question explicitly says 'differentiate from first principles', you must use the limit definition. Using standard differentiation rules will earn you zero marks.

*Calculator:* forbidden

## Geometric Interpretation of the Derivative

The derivative $f'(a)$ is exactly equal to the gradient of the tangent line to the curve $y = f(x)$ at the point $(a, f(a))$. The expression $\frac{f(a+h) - f(a)}{h}$ gives the gradient of the *secant line* connecting $(a, f(a))$ and $(a+h, f(a+h))$. As $h \to 0$, the secant line approaches the tangent line, so its gradient approaches the derivative.

> **info**
>
> A positive derivative means the function is increasing at $x=a$, a negative derivative means it is decreasing, and a zero derivative means the function has a stationary point at $x=a$.

**Worked example:** Find the equation of the tangent line to $f(x) = x^3$ at $x=2$ using the definition of the derivative.

1. Calculate the derivative (gradient) at $x=2$:
2. $$f'(2) = \lim_{h \to 0} \frac{f(2+h) - f(2)}{h}$$
3. Expand and simplify the expression:
4. $$\frac{(2+h)^3 - 8}{h} = \frac{8 + 12h + 6h^2 + h^3 - 8}{h} = 12 + 6h + h^2$$
5. Evaluate the limit to get the gradient:
6. $$f'(2) = \lim_{h \to 0} (12 + 6h + h^2) = 12$$
7. Use point-gradient form for the tangent line (passes through $(2, 8)$):
8. $$y - 8 = 12(x - 2) \implies y = 12x - 16$$

*Calculator:* forbidden

## Differentiability and Continuity

**Differentiability at a point** — A function is differentiable at $x=a$ if and only if $f'_-(a) = f'_+(a)$ and both are finite.

*Notation:* Left-hand derivative: $f'_-(a) = \lim_{h \to 0^-} \frac{f(a+h) - f(a)}{h}$  
Right-hand derivative: $f'_+(a) = \lim_{h \to 0^+} \frac{f(a+h) - f(a)}{h}$

A key theorem: If a function is differentiable at a point, it must be continuous at that point. The converse is *not* true: a function can be continuous but not differentiable. The classic example is $f(x) = |x|$ at $x=0$, which is continuous but the left and right derivatives do not match.

**Worked example:** Prove that the piecewise function $f(x) = \begin{cases} x^2 & x \leq 1 \\ 2x - 1 & x > 1 \end{cases}$ is differentiable at $x=1$.

1. First confirm continuity at $x=1$ (required for differentiability):
2. Left limit: $\lim_{x \to 1^-} x^2 = 1$, Right limit: $\lim_{x \to 1^+} (2x - 1) = 1$, $f(1) = 1$, so continuous.
3. Calculate the left-hand derivative:
4. $$f'_-(1) = \lim_{h \to 0^-} \frac{(1+h)^2 - 1}{h} = \lim_{h \to 0^-} \frac{2h + h^2}{h} = 2$$
5. Calculate the right-hand derivative:
6. $$f'_+(1) = \lim_{h \to 0^+} \frac{(2(1+h) - 1) - 1}{h} = \lim_{h \to 0^+} \frac{2h}{h} = 2$$
7. Since $f'_-(1) = f'_+(1) = 2$, the limit exists, so $f$ is differentiable at $x=1$.

**Check your understanding**

Test your understanding:

1. If a function is continuous at $x=a$, it must be differentiable at $x=a$. True or false?

   - True
   - False

   *Answer:* False

   *Why:* Continuous functions can have corners, cusps, or vertical tangents where the derivative does not exist. The classic example is $f(x) = |x|$ at $x=0$.

*Calculator:* forbidden

## Common pitfalls

- **Wrong:** Evaluating the limit at $h=0$ before canceling $h$, leading to division by zero.
  - Why it fails: When taking the limit as $h \to 0$, $h$ approaches 0 but is never equal to 0, so cancellation is allowed before substitution.
  - Correct: Simplify the expression fully to remove $h$ from the denominator before evaluating the limit.
- **Wrong:** Claiming a piecewise function is differentiable just because it is continuous at the junction point.
  - Why it fails: Continuity is a necessary condition for differentiability, not a sufficient one. Left and right derivatives must also match.
  - Correct: Always calculate both left-hand and right-hand derivatives at junction points to confirm they are equal.
- **Wrong:** Not expanding $f(x+h)$ fully before canceling $h$, leading to an incorrect limit.
  - Why it fails: Canceling $h$ incorrectly before factoring leaves an erroneous expression for the limit.
  - Correct: Expand $f(x+h)$ fully, subtract $f(x)$, combine like terms, then factor out $h$ before canceling.
- **Wrong:** Using standard differentiation rules when asked to differentiate from first principles.
  - Why it fails: Exam questions explicitly test your understanding of the limit definition, so alternative methods earn no marks.
  - Correct: Always start from the limit definition and show all steps when asked for first principles.

## Cheatsheet

| Concept | Formula |
| --- | --- |
| Derivative at $x$ | f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} |
| Derivative at $x=a$ (alternative) | f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a} |
| Left-hand derivative | f'_-(a) = \lim_{h \to 0^-} \frac{f(a+h) - f(a)}{h} |
| Right-hand derivative | f'_+(a) = \lim_{h \to 0^+} \frac{f(a+h) - f(a)}{h} |
| Tangent line at $(a, f(a))$ | y - f(a) = f'(a)(x - a) |
| Key relationship | Differentiable $\implies$ Continuous, not vice versa |

## What's next

Now that you understand the definition of the derivative from first principles, you can move on to standard differentiation rules for polynomials, trigonometric, exponential, and logarithmic functions. These rules let you compute derivatives far faster than first principles, and are used in almost all subsequent calculus topics. This foundational definition is the basis for implicit differentiation, related rates, integration, and all applications of calculus to optimization, kinematics, and differential equations.

- [Differentiation Rules for Basic Functions](https://www.owlsprep.com/study/ib-math-aa-hl-u5-differentiation-rules/)
- [Implicit, parametric and logarithmic differentiation](https://www.owlsprep.com/study/ib-math-aa-hl-u5-implicit-parametric-and-logarithmic-differentiation/)
- [Higher order derivatives](https://www.owlsprep.com/study/ib-math-aa-hl-u5-higher-order-derivatives/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u5-definition-of-the-derivative/
