Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Analysis and Approaches
  3. ›5 Calculus
  4. ›5.12 First principles and continuity

IB Mathematics: Analysis and Approaches · Topic 5 · Calculus

5.12 First principles and continuity

Use first principles to differentiate, explain continuity at a point, and identify the main types of discontinuity.

  • 4 min read
  • 5 parts
  • 9 questions
  • Draft
  • HL only
Start a Quick 5 on this topic→Jump to the 9 questions
1/5The derivative comes from the limit of chord gradients
  1. 1The derivative comes from the limit of chord gradients
  2. 2Expanding and cancelling h gives the derivative
  3. 3A function is continuous where its graph has no break
  4. 4Discontinuities fall into three standard types
  5. 5A differentiable function must be continuous, but not the reverse
  6. Check your recall
  7. Practice: 9 questions
1

Part 1 of 5: The derivative comes from the limit of chord gradients

Take a point PPP on a curve and a second point QQQ a small distance hhh to its right. The straight line through them is a chord. Its gradient is f(x+h)−f(x)h\frac{f(x+h)-f(x)}{h}hf(x+h)−f(x)​.

As hhh shrinks, QQQ slides towards PPP. The chord settles onto the line that just touches the curve at PPP. The limit of the chord gradient is the derivative.

A chord gradient is an average rate of change over a gap of width hhh. Taking hhh to zero turns that average into an instantaneous rate.

Writing this out is the method of first principles: f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}f′(x)=limh→0​hf(x+h)−f(x)​.

Figure 1. The chord from P to Q is steeper than the line that touches the curve at P. Its gradient approaches that of the line as Q moves towards P.

Key terms · tap one for its definition

limit

A limit is the value a function approaches as its input approaches a specified value.

derivative

The derivative gives a function’s instantaneous rate of change with respect to its input.

first principles

First principles is the method of finding f′(x)f'(x)f′(x) directly from the limit of the difference quotient as h→0h\to0h→0.

Part 1 done

2

Part 2 of 5: Expanding and cancelling h gives the derivative

The method follows a fixed pattern. Write the difference quotient, expand, cancel hhh, then let h→0h\to0h→0. The factor hhh must cancel completely, or an algebra step has gone wrong.

Expanding is the hardest step. For a square, (x+h)2=x2+2xh+h2(x+h)^2=x^2+2xh+h^2(x+h)2=x2+2xh+h2. For a cube, (x+h)3=x3+3x2h+3xh2+h3(x+h)^3=x^3+3x^2h+3xh^2+h^3(x+h)3=x3+3x2h+3xh2+h3.

After cancelling, every remaining term with a factor of hhh vanishes as h→0h\to0h→0. What is left is the derivative.

Worked example

Differentiating from first principles

Use first principles to find f′(x)f'(x)f′(x) for f(x)=x2+2xf(x)=x^2+2xf(x)=x2+2x.
  1. 1
    Expand: f(x+h)=x2+2xh+h2+2x+2hf(x+h)=x^2+2xh+h^2+2x+2hf(x+h)=x2+2xh+h2+2x+2h.
  2. 2
    Subtract: f(x+h)−f(x)=2xh+h2+2hf(x+h)-f(x)=2xh+h^2+2hf(x+h)−f(x)=2xh+h2+2h.
  3. 3
    Divide by hhh: f(x+h)−f(x)h=2x+h+2\frac{f(x+h)-f(x)}{h}=2x+h+2hf(x+h)−f(x)​=2x+h+2.
  4. 4
    Let h→0h\to0h→0: the limit is 2x+22x+22x+2.

Answer: f′(x)=2x+2f'(x)=2x+2f′(x)=2x+2

Each step is algebra rather than calculus. The only calculus idea is the final limit.

Common mistake

Do not set h=0h=0h=0 before cancelling. The quotient is then 00\frac0000​, which is undefined.

Go deeperFirst principles for sine

For f(x)=sin⁡xf(x)=\sin xf(x)=sinx, use sin⁡(x+h)=sin⁡xcos⁡h+cos⁡xsin⁡h\sin(x+h)=\sin x\cos h+\cos x\sin hsin(x+h)=sinxcosh+cosxsinh. The quotient splits into sin⁡x⋅cos⁡h−1h+cos⁡x⋅sin⁡hh\sin x\cdot\frac{\cos h-1}{h}+\cos x\cdot\frac{\sin h}{h}sinx⋅hcosh−1​+cosx⋅hsinh​.

With hhh in radians, sin⁡hh→1\frac{\sin h}{h}\to1hsinh​→1 and cos⁡h−1h→0\frac{\cos h-1}{h}\to0hcosh−1​→0 as h→0h\to0h→0. So f′(x)=cos⁡xf'(x)=\cos xf′(x)=cosx.

Part 2 done

Quick check

One question on the part you just read

Easy

State the first principles formula for the derivative f′(x)f'(x)f′(x).
Show answer and explanation

Answer: B · Worked explanation

The derivative is the limit of the chord gradient, f(x+h)−f(x)h\frac{f(x+h)-f(x)}{h}hf(x+h)−f(x)​, as h→0h\to0h→0. Adding f(x)f(x)f(x) does not give a gradient. Taking the limit without dividing by hhh gives zero for a continuous function, not a rate of change. The numerator must be a difference, because the derivative measures how much fff changes as xxx changes.
3

Part 3 of 5: A function is continuous where its graph has no break

Think of drawing a graph without lifting your pencil. A function drawn this way near a point is continuous at a point. Continuity is judged one point at a time. Three things must hold at x=ax=ax=a:

  • f(a)f(a)f(a) is defined.
  • lim⁡x→af(x)\lim_{x\to a}f(x)limx→a​f(x) exists.
  • The limit equals f(a)f(a)f(a).

The limit exists only when the left-hand and right-hand limits agree.

A hole, a jump or a vertical gap all break the graph. Each makes at least one condition fail.

For a piecewise function, check the point where the rule changes. Compare both one-sided limits with the function value.

Worked example

Finding a value that makes a function continuous

Let f(x)=x2+1f(x)=x^2+1f(x)=x2+1 for x<2x<2x<2 and f(x)=kx−1f(x)=kx-1f(x)=kx−1 for x≥2x\ge2x≥2. Find kkk so that fff is continuous at x=2x=2x=2.
  1. 1
    Left-hand limit: as x→2−x\to2^-x→2−, f(x)→22+1=5f(x)\to2^2+1=5f(x)→22+1=5.
  2. 2
    Function value: f(2)=2k−1f(2)=2k-1f(2)=2k−1.
  3. 3
    Continuity needs 2k−1=52k-1=52k−1=5, so k=3k=3k=3.
  4. 4
    Check the right side: 3(2)−1=53(2)-1=53(2)−1=5.

Answer: k=3k=3k=3

Key term

continuous at a point

A function is continuous at x=ax=ax=a when f(a)f(a)f(a) and lim⁡x→af(x)\lim_{x\to a}f(x)limx→a​f(x) both exist and are equal.

Part 3 done

4

Part 4 of 5: Discontinuities fall into three standard types

When one of the three conditions fails, the function has a discontinuity. Look for one where a denominator is zero or where a piecewise rule changes. Each type behaves differently.

Three standard discontinuities

TypeExample at the pointWhat happens
Removablex2−1x−1\frac{x^2-1}{x-1}x−1x2−1​ at x=1x=1x=1The limit is 2, but f(1)f(1)f(1) is undefined
Jump∣x∣x\frac{|x|}{x}x∣x∣​ at x=0x=0x=0Left limit is -1, right limit is 1
Infinite1x\frac1xx1​ at x=0x=0x=0Values grow without bound; no limit
Type
Removable
Example at the point
x2−1x−1\frac{x^2-1}{x-1}x−1x2−1​ at x=1x=1x=1
What happens
The limit is 2, but f(1)f(1)f(1) is undefined
Type
Jump
Example at the point
∣x∣x\frac{|x|}{x}x∣x∣​ at x=0x=0x=0
What happens
Left limit is -1, right limit is 1
Type
Infinite
Example at the point
1x\frac1xx1​ at x=0x=0x=0
What happens
Values grow without bound; no limit

A removable discontinuity can be repaired by defining f(a)f(a)f(a) to equal the limit. A jump or infinite discontinuity cannot.

A jump has no limit because the two sides disagree. An infinite discontinuity has no limit because the values grow without bound.

Exam tip

For a fraction, set the denominator to zero. Then factorise to see whether the zero factor cancels.

Key term

discontinuity

A discontinuity is a point where a function fails to be continuous.

Part 4 done

Quick check

One question on the part you just read

Easy

Identify the type of discontinuity of f(x)=1xf(x)=\frac1xf(x)=x1​ at x=0x=0x=0.
Show answer and explanation

Answer: C · Worked explanation

The values of 1x\frac1xx1​ grow without bound near x=0x=0x=0, so there is no limit. This is an infinite discontinuity. A removable one needs a limit that exists, and a jump needs different finite one-sided limits. Near x=0x=0x=0 the function 1x\frac1xx1​ becomes very large, so there is no finite limit from either side.
5

Part 5 of 5: A differentiable function must be continuous, but not the reverse

Continuity and the derivative both rest on limits. A function is differentiable at a point when its derivative exists there. Differentiable at x=ax=ax=a implies continuous at x=ax=ax=a.

So a break in the graph rules out a derivative at that point.

The converse is false. The graph of y=∣x∣y=|x|y=∣x∣ has a sharp corner at the origin. Chord gradients from the right equal 1, and from the left equal -1.

Figure 2. The graph has no break at the origin, but it has a corner there.

These limits disagree, so f′(0)f'(0)f′(0) does not exist. The function is continuous at 0 but not differentiable there.

Key term

differentiable

A function is differentiable at a point when its derivative exists there, meaning the limit of the difference quotient exists.

Note read

Check your recall[14 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.State[2 marks]

    State the first principles definition of f′(x)f'(x)f′(x).

    Show mark schemeHide mark scheme

    Model answer

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

    • 1 mark for writing the difference quotient f(x+h)−f(x)h\frac{f(x+h)-f(x)}{h}hf(x+h)−f(x)​
    • 1 mark for taking the limit as h→0h\to0h→0
  2. 2.Determine[3 marks]

    Determine the derivative of f(x)=x3f(x)=x^3f(x)=x3 from first principles.

    Show mark schemeHide mark scheme

    Model answer

    (x+h)3−x3h=3x2h+3xh2+h3h=3x2+3xh+h2\frac{(x+h)^3-x^3}{h}=\frac{3x^2h+3xh^2+h^3}{h}=3x^2+3xh+h^2h(x+h)3−x3​=h3x2h+3xh2+h3​=3x2+3xh+h2. As h→0h\to0h→0, this tends to 3x23x^23x2.

    • 1 mark for expanding (x+h)3(x+h)^3(x+h)3 and subtracting x3x^3x3
    • 1 mark for dividing by hhh to obtain 3x2+3xh+h23x^2+3xh+h^23x2+3xh+h2
    • 1 mark for taking the limit to obtain 3x23x^23x2
  3. 3.State[2 marks]

    State the conditions for a function to be continuous at x=ax=ax=a.

    Show mark schemeHide mark scheme

    Model answer

    f(a)f(a)f(a) must be defined and lim⁡x→af(x)\lim_{x\to a}f(x)limx→a​f(x) must exist. The limit must equal f(a)f(a)f(a).

    • 1 mark for stating that f(a)f(a)f(a) is defined and the limit exists
    • 1 mark for stating that the limit equals f(a)f(a)f(a)
  4. 4.Determine[3 marks]

    Determine kkk so that fff is continuous at x=2x=2x=2, where f(x)=3x+kf(x)=3x+kf(x)=3x+k for x<2x<2x<2 and f(x)=x2−1f(x)=x^2-1f(x)=x2−1 for x≥2x\ge2x≥2.

    Show mark schemeHide mark scheme

    Model answer

    f(2)=4−1=3f(2)=4-1=3f(2)=4−1=3. The left-hand limit is 6+k6+k6+k. Continuity needs 6+k=36+k=36+k=3, so k=−3k=-3k=−3.

    • 1 mark for finding f(2)=3f(2)=3f(2)=3
    • 1 mark for finding the left-hand limit 6+k6+k6+k
    • 1 mark for solving to obtain k=−3k=-3k=−3
  5. 5.Distinguish[2 marks]

    Distinguish between a removable discontinuity and a jump discontinuity.

    Show mark schemeHide mark scheme

    Model answer

    At a removable discontinuity the limit exists but differs from, or is missing from, the function value. At a jump the left and right limits are different.

    • 1 mark for stating that a removable discontinuity has a limit that exists
    • 1 mark for stating that a jump has different left-hand and right-hand limits
  6. 6.Explain[2 marks]

    Explain why f(x)=∣x∣f(x)=|x|f(x)=∣x∣ is continuous but not differentiable at x=0x=0x=0.

    Show mark schemeHide mark scheme

    Model answer

    The graph has no break at x=0x=0x=0, so fff is continuous. The chord gradients tend to 1 from the right and -1 from the left, so the derivative does not exist.

    • 1 mark for stating that the graph has no break, so it is continuous
    • 1 mark for stating that the left and right gradient limits differ, so the derivative does not exist

Practice this topic

9 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 9 answered

Includes the 2 quick checks in the note above.

3.

Easy·Identify[1 mark]

Identify the function that is continuous but not differentiable at x=0x=0x=0.
Show answer and explanation

Answer: D · Worked explanation

The graph of ∣x∣|x|∣x∣ is unbroken at the origin but has a corner, where the left and right gradients are -1 and 1. The functions x2x^2x2 and x3x^3x3 are differentiable there. The function 1x\frac1xx1​ is undefined at 0. A function that is differentiable at a point must also be continuous there, so a corner is the standard example that separates the two ideas.
4.

Medium·Determine[2 marks]

Let f(x)=kx+1f(x)=kx+1f(x)=kx+1 for x<3x<3x<3 and f(x)=x2−2f(x)=x^2-2f(x)=x2−2 for x≥3x\ge3x≥3. Determine kkk so that fff is continuous at x=3x=3x=3.
Show answer and explanation

Answer: A · Worked explanation

Here f(3)=9−2=7f(3)=9-2=7f(3)=9−2=7, and the left-hand limit is 3k+13k+13k+1. Continuity needs 3k+1=73k+1=73k+1=7, so k=2k=2k=2. The value 6 is 7−17-17−1, which forgets to divide by 3. The right-hand side needs no separate test here, because the second rule already gives f(3)f(3)f(3), which equals the right-hand limit.
5.

Medium·Calculate[2 marks]

Calculate lim⁡x→3x2−9x−3\lim_{x\to3}\frac{x^2-9}{x-3}limx→3​x−3x2−9​.
Show answer and explanation

Answer: C · Worked explanation

Factorise: x2−9x−3=x+3\frac{x^2-9}{x-3}=x+3x−3x2−9​=x+3 for x≠3x\ne3x=3. The limit as x→3x\to3x→3 is 6. Substituting x=3x=3x=3 directly gives 00\frac0000​, which does not mean the limit fails to exist. The value 0 comes from the numerator alone. Direct substitution gives 00\frac0000​, which is why the factor x−3x-3x−3 must be cancelled before taking the limit.
6.

Medium·Identify[1 mark]

Identify the discontinuity of f(x)=x2−4x−2f(x)=\frac{x^2-4}{x-2}f(x)=x−2x2−4​ at x=2x=2x=2.
Show answer and explanation

Answer: A · Worked explanation

For x≠2x\ne2x=2, f(x)=x+2f(x)=x+2f(x)=x+2, so the limit at x=2x=2x=2 is 4, but f(2)f(2)f(2) is undefined. This is a removable discontinuity. It is not infinite, because the values stay close to 4 near x=2x=2x=2. A limit that exists but differs from the function value, or a missing value, is exactly the removable case.
7.

Hard·Determine[2 marks]

Use the limit lim⁡h→0(2+h)3−8h\lim_{h\to0}\frac{(2+h)^3-8}{h}limh→0​h(2+h)3−8​ to determine f′(2)f'(2)f′(2) for f(x)=x3f(x)=x^3f(x)=x3.
Show answer and explanation

Answer: A · Worked explanation

Expand: (2+h)3−8=12h+6h2+h3(2+h)^3-8=12h+6h^2+h^3(2+h)3−8=12h+6h2+h3. Dividing by hhh gives 12+6h+h212+6h+h^212+6h+h2, which tends to 12. The value 8 is f(2)f(2)f(2) itself, not the gradient. The value 6 takes only the 6h6h6h term. This is the first principles limit evaluated at x=2x=2x=2, and it agrees with the general result f′(x)=3x2f'(x)=3x^2f′(x)=3x2.
8.

Hard·Identify[2 marks]

Let f(x)=x2f(x)=x^2f(x)=x2 for x≤1x\le1x≤1 and f(x)=3x−2f(x)=3x-2f(x)=3x−2 for x>1x>1x>1. Identify the correct statement at x=1x=1x=1.
Show answer and explanation

Answer: B · Worked explanation

Both pieces give 1 at x=1x=1x=1, so fff is continuous. The gradient is 2x=22x=22x=2 from the left and 3 from the right. These differ, so the derivative does not exist. A change of rule does not by itself cause a break. A corner, where the one-sided gradients differ, is the standard example of a function that is continuous but not differentiable.
9.

Hard·Determine[2 marks]

Let f(x)=x2−x−6x−3f(x)=\frac{x^2-x-6}{x-3}f(x)=x−3x2−x−6​ for x≠3x\ne3x=3, and f(3)=kf(3)=kf(3)=k. Determine kkk so that fff is continuous at x=3x=3x=3.
Show answer and explanation

Answer: D · Worked explanation

Factorise: x2−x−6=(x−3)(x+2)x^2-x-6=(x-3)(x+2)x2−x−6=(x−3)(x+2), so f(x)=x+2f(x)=x+2f(x)=x+2 for x≠3x\ne3x=3. The limit at x=3x=3x=3 is 5. Continuity needs k=5k=5k=5. The value 6 comes from adding 3 instead of 2, and 0 from the numerator at x=3x=3x=3. Here the function value is chosen to fill the hole in the graph, so it equals the limit.

Keep going

Next topic5.13 Limits and L'Hôpital's rulePrevious topic5.11 Definite integrals and areas

More in Topic 5 · Calculus

  1. 5.8Maxima, minima and optimizationNotes · 10 questions
  2. 5.9KinematicsNotes · 10 questions
  3. 5.10Indefinite integrals and substitutionNotes · 10 questions
  4. 5.11Definite integrals and areasNotes · 10 questions
  5. 5.12First principles and continuityNotes · 9 questions· HL only
  6. 5.13Limits and L'Hôpital's ruleNotes · 10 questions· HL only
  7. 5.14Implicit differentiation and related ratesNotes · 10 questions· HL only
  8. 5.15Derivatives of further functionsNotes · 10 questions· HL only
  9. 5.16Integration by substitution and partsNotes · 10 questions· HL only

All IB Mathematics: Analysis and Approaches topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1The derivative comes from the limit of chord gradients
  2. 2Expanding and cancelling h gives the derivative
  3. 3A function is continuous where its graph has no break
  4. 4Discontinuities fall into three standard types
  5. 5A differentiable function must be continuous, but not the reverse
  6. Check your recall
  7. Practice: 9 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe

A chord approaching the curve’s gradient

y-1-0.500.511.522.53-10123456x
  • f(x) = x²
  • chord PQ
  • line at P
  • P
  • Q

The graph of the modulus function

y-3-2-10123-10123x
  • y = |x|