← Back to Calculus
Grade 12
CAPS Syllabus
Calculus

Introduction to Calculus and Differentiation from First Principles

Master the foundations of calculus and learn how to find instantaneous rates of change using differentiation from first principles.

Key Takeaways
  • Calculus allows us to find instantaneous rates of change, not just average rates
  • The derivative represents the gradient of the tangent line to a curve at a specific point
  • Differentiation from first principles uses the limit definition: $f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$
  • Understanding first principles is essential before using differentiation rules
  • The derivative has many notations: $f'(x)$, $\frac{dy}{dx}$, $\frac{df}{dx}$, or $D_x f$

What is Calculus?

Calculus is one of the most powerful branches of mathematics, with applications in physics, engineering, economics, biology, and many other fields. At its core, calculus deals with two fundamental concepts:

Differentiation

Finding rates of change and gradients of curves at specific points. This is what we'll focus on in this lesson.

Integration

Finding areas under curves and accumulation of quantities over intervals (covered in separate lessons).

Real-world applications you encounter every day:

  • Speed and velocity: How fast is a car accelerating at this exact moment?
  • Population growth: At what rate is a bacterial colony growing right now?
  • Economics: How sensitive is demand to a change in price?
  • Physics: What is the instantaneous velocity of a falling object?

The key word in all these examples is "instantaneous". In Grade 10 and 11, you learned how to calculate the average gradient between two points on a curve. But what if we want to know the gradient at exactly one point? That's where calculus comes in!

Average Gradient vs Instantaneous Gradient

Let's build our understanding by comparing what you already know with what we're about to learn.

Average Gradient (You Already Know This!)

The average gradient between two points $A(x_1, y_1)$ and $B(x_2, y_2)$ on a curve is calculated using:

$$m_{avg} = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}$$

This gives you the gradient of the secant line (the straight line joining two points on the curve).

Example:

For $f(x) = x^2$, the average gradient between $x = 1$ and $x = 3$ is:

$$m_{avg} = \frac{f(3) - f(1)}{3 - 1} = \frac{9 - 1}{2} = \frac{8}{2} = 4$$
Instantaneous Gradient (The New Concept!)

The instantaneous gradient is the gradient at exactly one point on the curve. It's the gradient of the tangent line to the curve at that point.

The Big Question:

How do we find the gradient at a single point when the formula $\frac{\Delta y}{\Delta x}$ requires two different points?

The Answer: We use limits!

We start with two points, but we make them get closer and closer together until they're infinitely close. The average gradient approaches the instantaneous gradient as the distance between the points approaches zero.

Visualizing the Process

Imagine a curve $y = f(x)$ and a point $A$ on it at $x = a$. Now pick another point $B$ at $x = a + h$ where $h$ is a small distance.

Step 1: Average gradient from A to B

$$m_{avg} = \frac{f(a+h) - f(a)}{h}$$

Step 2: Make h smaller and smaller

As $h \to 0$, point B gets closer to point A

Step 3: The limit gives the instantaneous gradient

$$m_{inst} = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}$$
Seeing It in Numbers: A Concrete Example
Let's see how the average gradient approaches the instantaneous gradient for $f(x) = x^2$ at $x = 3$

For $f(x) = x^2$ at $x = 3$, we know $f(3) = 9$. As $h$ gets smaller, watch how the average gradient approaches $2x = 6$:

hx + hf(x+h) = (x+h)²f(x+h) - f(x)Average GradientGetting closer to...
25251686
1416776
0.53.512.253.256.56
0.13.19.610.616.16
0.013.019.06010.06016.016
0 (limit)3906Instantaneous!

Notice how as $h$ gets smaller, the average gradient gets closer and closer to 6. The limit tells us that when $h = 0$ (the two points become one), the gradient is exactly 6. This is the instantaneous gradient at $x = 3$!

Secant Line Approaching Tangent Line
Watch how the secant line approaches the tangent line as h → 0 for the function f(x) = x². Click "Show Formula View" to see the actual function values and the first principles formula!
h (run)Δy (rise)A(x)B(x+h)f(x) = x²
Gradient: 0.400

What you're seeing:

The secant line connects points A (at x = 3) and B (at x = 3 + 2.0 = 5.0).

Gradient Calculation:

Gradient = rise ÷ run = Δy ÷ h = 0.400

Differentiation from First Principles

Now we're ready for the formal definition of the derivative, which is the foundation of all differentiation.

The First Principles Formula

The derivative of a function $f(x)$ at a point $x$ is defined as:

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

This is also written as: $\frac{dy}{dx} = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$

What does this mean in words?

To find the derivative (instantaneous rate of change) at any point $x$, we:

  1. Calculate the function value at $x + h$ (a tiny distance away)
  2. Subtract the function value at $x$
  3. Divide by the distance $h$
  4. Take the limit as $h$ approaches 0
Critical Understanding: What is $f(x+h)$?

Many students confuse $f(x+h)$ with $f(x) + h$. These are completely different!

❌ WRONG: $f(x+h) = f(x) + h$

Example: If $f(x) = x^2$ and $x = 3$, $h = 2$:

$f(3+2) = f(3) + 2 = 9 + 2 = 11$

But $f(5) = 25$, not 11!

✅ CORRECT: $f(x+h) = f(x+h)$

Example: If $f(x) = x^2$ and $x = 3$, $h = 2$:

$f(3+2) = f(5) = 5^2 = 25$

Or: $f(3+2) = (3+2)^2 = 25$

💡 Remember:

$f(x+h)$ means: "substitute $(x+h)$ everywhere you see $x$ in the function"

For $f(x) = x^2 + 3x$, we get: $f(x+h) = (x+h)^2 + 3(x+h) = x^2 + 2xh + h^2 + 3x + 3h$

Step-by-Step Process for First Principles

1Write the first principles formula
$$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$
2Substitute $f(x+h)$ and $f(x)$

Replace the function notation with the actual expressions

3Simplify the numerator

Expand, combine like terms, and factor if necessary

4Cancel the $h$ in the denominator

Factor out $h$ from the numerator so you can cancel it (this removes the $\frac{0}{0}$ problem)

5Evaluate the limit by letting $h \to 0$

Substitute $h = 0$ in the simplified expression

First Principles Calculator
Interactive demonstration of the first principles formula for f(x) = x² at x = 2
f'(x) = lim [f(x+h) - f(x)] / h
h→0
f(x) = f(2) =4
f(x+h) = f(2+1.00) =9.00
f(x+h) - f(x) =5.00
[f(x+h) - f(x)] / h =5.000

True derivative: f'(2) = 4

Error: 1.000

(2,4)(3.0,9.0)hΔy
h = 1.00

Observe:

  • • The red line shows h (horizontal change)
  • • The purple line shows Δy (vertical change)
  • • Gradient = Δy ÷ h = 5.000
  • • As h gets smaller, the ratio gets closer to 4 (the true derivative)
  • • The limit as h → 0 gives us the exact instantaneous rate of change

Derivative Notation

The derivative can be written in several different ways. They all mean the same thing!

Leibniz Notation
$$\frac{dy}{dx}$$ or $$\frac{df}{dx}$$

Read as "dee y dee x" or "the derivative of y with respect to x"

Prime Notation
$$f'(x)$$ or $$y'$$

Read as "f prime of x" or "y prime"

Operator Notation
$$D_x f$$

Read as "D sub x of f"

Dot Notation (Physics)
$$\dot{y}$$

Used when differentiating with respect to time

CAPS Examinations typically use:

  • $f'(x)$ for the derivative of $f(x)$
  • $\frac{dy}{dx}$ when working with $y$ as a function of $x$

Worked Examples: Differentiation from First Principles

Example 1: Linear Function
Find the derivative of $f(x) = 3x + 5$ from first principles
1

Step 1: Write the formula

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

Step 2: Substitute $f(x+h)$ and $f(x)$

$f(x) = 3x + 5$

$f(x+h) = 3(x+h) + 5 = 3x + 3h + 5$

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

Step 3: Simplify the numerator

$$f'(x) = \lim_{h \to 0} \frac{3x + 3h + 5 - 3x - 5}{h} = \lim_{h \to 0} \frac{3h}{h}$$
4

Step 4: Cancel $h$

$$f'(x) = \lim_{h \to 0} 3$$
5

Step 5: Evaluate the limit

$$f'(x) = 3$$

Answer: $f'(x) = 3$

This makes sense! The gradient of the line $y = 3x + 5$ is 3 everywhere (it's a straight line).

Example 2: Quadratic Function
Find the derivative of $f(x) = x^2$ from first principles
1

Step 1: Write the formula

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

Step 2: Substitute $f(x+h)$ and $f(x)$

$f(x) = x^2$

$f(x+h) = (x+h)^2 = x^2 + 2xh + h^2$

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

Step 3: Simplify the numerator

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

Step 4: Factor and cancel $h$

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

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

5

Step 5: Evaluate the limit (let $h = 0$)

$$f'(x) = 2x + 0 = 2x$$

Answer: $f'(x) = 2x$

The gradient of $y = x^2$ at any point $x$ is $2x$. For example, at $x = 3$, the gradient is $2(3) = 6$.

Example 3: More Complex Quadratic
Find the derivative of $f(x) = 2x^2 + 3x - 1$ from first principles

Step 1: Write the formula

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

Step 2: Find $f(x+h)$

$f(x) = 2x^2 + 3x - 1$

$f(x+h) = 2(x+h)^2 + 3(x+h) - 1$

$= 2(x^2 + 2xh + h^2) + 3x + 3h - 1$

$= 2x^2 + 4xh + 2h^2 + 3x + 3h - 1$

Step 3: Substitute into the formula

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

Step 4: Simplify the numerator

$$= \lim_{h \to 0} \frac{2x^2 + 4xh + 2h^2 + 3x + 3h - 1 - 2x^2 - 3x + 1}{h}$$

$$= \lim_{h \to 0} \frac{4xh + 2h^2 + 3h}{h}$$

Step 5: Factor out $h$ and cancel

$$= \lim_{h \to 0} \frac{h(4x + 2h + 3)}{h}$$

$$= \lim_{h \to 0} (4x + 2h + 3)$$

Step 6: Evaluate the limit

$$f'(x) = 4x + 3$$

Answer: $f'(x) = 4x + 3$

Notice a pattern emerging? The derivative of $ax^2 + bx + c$ is $2ax + b$. You'll learn shortcuts for this later!

Visualizing Functions and Their Derivatives

See the relationship between a function and its derivative. The derivative tells us the gradient (slope) of the original function at each point.

Function vs Derivative Comparison
See how the derivative relates to the original function

Original Function

f(x) = x²
f(x)

Derivative

f'(x) = 2x
f'(x)

Key Observations:

  • • f(x) = x² is a parabola opening upward
  • • f'(x) = 2x is a straight line through the origin
  • • When f(x) has minimum (at x=0), f'(x) crosses the x-axis
  • • Where f(x) is increasing, f'(x) is positive
Quick Reference: First Principles Cheat Sheet

The Formula

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

The 5 Steps

  1. Write the formula
  2. Substitute $f(x+h)$ and $f(x)$
  3. Simplify the numerator
  4. Cancel $h$ from numerator/denominator
  5. Evaluate the limit (let $h = 0$)

Key Reminders

  • $f(x+h)$ means substitute $(x+h)$ everywhere you see $x$ in the function
  • Always expand $(x+h)^2 = x^2 + 2xh + h^2$ (not $x^2 + h^2$!)
  • You must factor out $h$ before canceling to avoid $\frac{0}{0}$
  • Only substitute $h = 0$ after canceling $h$
Common Mistakes to Avoid
  • Forgetting to expand $(x+h)^2$ or $(x+h)^3$ correctly

    Always use binomial expansion: $(x+h)^2 = x^2 + 2xh + h^2$, not $x^2 + h^2$

  • Not factoring out $h$ from the numerator

    You must factor out $h$ to cancel with the denominator, or you'll get $\frac{0}{0}$ when evaluating the limit

  • Sign errors when subtracting $f(x)$

    Remember: $-(3x + 5) = -3x - 5$, not $-3x + 5$. Distribute the negative sign carefully!

  • Evaluating the limit too early

    Only substitute $h = 0$ AFTER you've successfully canceled $h$ from numerator and denominator

  • Confusing $f(x+h)$ with $f(x) + h$

    $f(x+h)$ means substitute $(x+h)$ everywhere you see $x$ in the function, not just add $h$ at the end

Practice Questions

Additional Practice Questions
Access more practice problems with PDF export functionality. Download questions-only or with complete solutions for offline study.
View Practice Page

Work through these problems to master differentiation from first principles. Show all your steps and check your answers.

Question 1
Question 2
Question 3

Quick Self-Check Quiz

Test your understanding with these multiple-choice questions. Select your answer and check to see if you're correct.

Question 1
What does the derivative $$f'(x)$$ represent geometrically?
Question 2
What is the first principles formula for the derivative?
Question 3
What is the derivative of $$f(x) = 7$$ (a constant)?
Question 4
If $$f(x) = x^2$$, what is $$f(x+h)$$?
Question 5
Why do we need to factor out $$h$$ from the numerator in first principles?
Question 6
Using first principles, what is the derivative of $$f(x) = 4x$$?
Question 7
What is the difference between average gradient and instantaneous gradient?

Need More Help with Grade 12 Maths?

Join our Grade 12 mathematics program for personalized tutoring aligned with the CAPS curriculum.