Skip to content
IB Diploma ProgrammeSL & HL

Second order differential equations

Mathematics: Applications and Interpretation SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Second order differential equations notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Second order differential equations notes as text: skim, search, and jump between subtopics.

~13 min read

1. Writing a second order equation as a coupled system

A second order differential equation has d²x/dt² in it. In the exam the equation is given: you are not asked to find it from the physics.

To solve it, write it as coupled first order equations. Let y = dx/dt. Then dx/dt = y and dy/dt = f(x, y, t).

Make d²x/dt² the subject first. Divide by its coefficient before you replace dx/dt with y. The starting values are x₀ = x(t₀) and y₀ = dx/dt at t₀.

d²x/dt² = f(x, dx/dt, t)

dx/dt = y

dy/dt = f(x, y, t)

Worked example 13 marks

A mass on a spring moves so that its displacement x metres at time t seconds satisfies d²x/dt² + 5dx/dt + 6x = 12. At t = 0, x = 1 and dx/dt = -2.

Write the equation as a pair of coupled first order equations and state the starting values.

  1. 1

    M1: let y = dx/dt, so dx/dt = y [1]

  2. 2

    A1: dy/dt = 12 - 5y - 6x [1]

  3. 3

    A1: x₀ = 1 and y₀ = -2 at t₀ = 0 [1]

2. Euler's method for a coupled system

Euler's method steps forward in strides of h. For a coupled system, both x and y move on at each stride.

Use the old values on the right of each line: xn, yn and tn. The new xn₊₁ is not used to find yn₊₁.

Work in a table with columns tn, xn, yn. Starting at t = 0, the number of steps to reach a time t is n = t/h.

xn₊₁ = xn + h yn

yn₊₁ = yn + h f(xn, yn, tn)

tn₊₁ = tn + h

Worked example 14 marks

A system satisfies dx/dt = y and dy/dt = 12 - 5y - 6x, with x = 1 and y = -2 at t = 0. Use Euler's method with h = 0.1 to estimate x and dx/dt when t = 0.2.

  1. 1

    M1: both recurrences with old values: xn₊₁ = xn + 0.1yn and yn₊₁ = yn + 0.1(12 - 5yn - 6xn) [1]

  2. 2

    A1: first step x₁ = 1 + 0.1(-2) = 0.8 and y₁ = -2 + 0.1(12 + 10 - 6) = -0.4 [1]

  3. 3

    A1: second step x₂ = 0.8 + 0.1(-0.4) = 0.76 [1]

  4. 4

    A1: y₂ = -0.4 + 0.1(12 + 2 - 4.8) = 0.52, so x ≈ 0.76 and dx/dt ≈ 0.52 [1]

3. Estimating a value and a time from the steps

Questions ask for x at a given time, or for the first time x reaches a value. For a value at time t, take n = t/h steps and read xn.

For the first time x reaches a value such as 0, keep stepping until xn first reaches or passes it. Then give the time tn, not the step number n.

With h = 0.1, step n = 20 is the time t = 2.

Worked example 15 marks

Quentin is investigating the motion of a mass hanging on a large spring.

From research, Quentin thinks the displacement, x, in metres, of the mass at time t, in seconds, will satisfy the differential equation 9.8 = 2d²x/dt² + 2.4dx/dt + 8x.

Quentin begins his investigation when the mass is at a displacement of 0.5 metres and is moving such that dx/dt = 9.8.

(a) By using Euler's method with h = 0.1 to estimate the motion of the mass after being released, find:(i) the displacement of the mass after 1 second,(ii) the first estimated time the mass reaches x = 0.

  1. 1

    (i) (M1): recurrence xn₊₁ = xn + 0.1dx/dt|n and dx/dt|n₊₁ = dx/dt|n + 0.1d²x/dt²|n [1]

  2. 2

    (A1): d²x/dt² = 4.9 - 1.2dx/dt - 4x [1]

  3. 3

    (A1): dx/dt|n₊₁ = dx/dt|n + 0.1(4.9 - 1.2dx/dt|n - 4xn) [1]

  4. 4

    A1: when t = 1 (n = 10), x = 4.36 m (4.36333) [1]

  5. 5

    (ii) A1: t = 2 seconds. Award A0 for n = 20 or t = 20 [1]

4. Percentage error against a rounded exact value

The percentage error compares an estimate with the exact value, as a percentage of the exact value.

An exact value given to the nearest unit lies in an interval. For 385 cm to the nearest cm, the value is between 384.5 and 385.5 cm, so 3.845 m to 3.855 m.

For the maximum possible error, use the end of the interval that makes the error largest. Put the estimate and the exact value in the same unit first.

percentage error = (|v_estimate - v_exact|)/(|v_exact|) × 100%

Worked example 13 marks

Quentin's Euler estimate of the displacement after 1 second is x = 4.36333 m. Using technology, Quentin correctly measures the displacement of the mass, after 1 second. His software gives him a value of 385 centimetres, which is accurate to the nearest centimetre.

(b) Find the maximum possible percentage error between your estimate from part (a)(i) and the exact displacement after 1 second.

  1. 1

    (A1): x = 3.845 seen or x = 3.855 seen [1]

  2. 2

    (M1): substitution into the percentage error formula using the estimate and 3.845, 3.855 or 3.85: (4.36333 - 3.845)/3.845 × 100 [1]

  3. 3

    A1: 13.5% (13.4805). Centimetres are accepted if both values use the same unit [1]

5. Exact solutions with eigenvalues

For d²x/dt² + adx/dt + bx = 0, the coupled system is dx/dt = y and dy/dt = -bx - ay. Its matrix is beginpmatrix 0 & 1 -b & -a endpmatrix.

The eigenvalues satisfy λ² + aλ + b = 0, as in AHL 5.17. Two real eigenvalues λ₁ and λ₂ give x = Ae^(λ₁t) + Be^(λ₂ t).

Use the starting values to find A and B. Exact solutions are only required for real distinct eigenvalues. When both are negative, all solutions move towards the origin. The equation can also be investigated using the phase portrait method in AHL 5.17.

λ² + aλ + b = 0

x = Ae^(λ₁ t) + Be^(λ₂ t)

Worked example 16 marks

Do not use a calculator. A displacement x satisfies d²x/dt² + 4dx/dt + 3x = 0, with x = 2 and dx/dt = -4 when t = 0. Find x in terms of t.

  1. 1

    M1: with y = dx/dt, the matrix is beginpmatrix 0 & 1 -3 & -4 endpmatrix [1]

  2. 2

    M1: characteristic equation λ² + 4λ + 3 = 0 [1]

  3. 3

    A1: λ = -1 and λ = -3 [1]

  4. 4

    M1: x = Ae^(-t) + Be^(-3t) and dx/dt = -Ae^(-t) - 3Be^(-3t) [1]

  5. 5

    A1: A + B = 2 and -A - 3B = -4, so B = 1 and A = 1 [1]

  6. 6

    A1: x = e^(-t) + e^(-3t) [1]

Recap

  • Second order equations are rewritten as coupled first order equations: dx/dt = y and dy/dt = f(x, y, t).
  • Make d²x/dt² the subject first. Divide by its coefficient.
  • Euler: xn₊₁ = xn + h yn and yn₊₁ = yn + h f(xn, yn, tn). Use old values on the right.
  • The number of steps to reach time t is n = t/h. Give the time, not n.
  • Percentage error = (|estimate - exact|)/(|exact|) × 100%. A value to the nearest unit lies in an interval.
  • For d²x/dt² + adx/dt + bx = 0, the eigenvalues satisfy λ² + aλ + b = 0.
  • Show every Euler line or the characteristic equation. A bare value from the GDC may earn no marks.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State the first equation of the coupled system found by setting y = dx/dt in a second order differential equation.1 mark
    Answer
    1. dx/dt = y.

    Trap: Writing dy/dt = y. The equation for dx/dt is the definition of y.

  2. A quantity satisfies 2d²x/dt² + 6dx/dt + 4x = 10. Write it as a pair of coupled first order equations.2 marks
    Answer
    1. Let y = dx/dt, so dx/dt = y.
    2. d²x/dt² = 5 - 3dx/dt - 2x, so dy/dt = 5 - 3y - 2x.

    Trap: Not dividing by the coefficient 2, which gives dy/dt = 10 - 6y - 4x.

  3. A system has dx/dt = y and dy/dt = 2x - y, with x = 1 and y = 3 at t = 0. Use Euler's method with h = 0.5 to estimate x and y when t = 0.5.2 marks
    Answer
    1. x₁ = 1 + 0.5(3) = 2.5.
    2. y₁ = 3 + 0.5(2 - 3) = 2.5.

    Trap: Leaving out the step size h, which gives x₁ = 4.

  4. A displacement satisfies d²x/dt² = -x - 0.4dx/dt. It is released from rest at x = 2 at t = 0. Use Euler's method with h = 0.1 to estimate x and dx/dt when t = 0.2.3 marks
    Answer
    1. Let y = dx/dt, so dy/dt = -x - 0.4y, with x₀ = 2 and y₀ = 0.
    2. x₁ = 2 + 0.1(0) = 2 and y₁ = 0 + 0.1(-2 - 0) = -0.2.
    3. x₂ = 2 + 0.1(-0.2) = 1.98.
    4. y₂ = -0.2 + 0.1(-2 + 0.08) = -0.392. So x ≈ 1.98 and dx/dt ≈ -0.392.

    Trap: Using y₀ in the second step, which gives x₂ = 2 because the starting speed is zero.

  5. A displacement satisfies d²x/dt² = t - 2dx/dt, with x = 1 and dx/dt = 2 at t = 0. Use Euler's method with h = 0.25 to estimate x when t = 0.5.3 marks
    Answer
    1. Let y = dx/dt, so dy/dt = t - 2y.
    2. x₁ = 1 + 0.25(2) = 1.5 and y₁ = 2 + 0.25(0 - 4) = 1.
    3. x₂ = 1.5 + 0.25(1) = 1.75.

    Trap: Using t = 0.25 in the first step, which gives y₁ = 1.0625 and x₂ = 1.77. Use tn, the old time.

  6. Do not use a calculator. Determine the general solution of d²x/dt² + 5dx/dt + 6x = 0.3 marks
    Answer
    1. The eigenvalues satisfy λ² + 5λ + 6 = 0.
    2. (λ + 2)(λ + 3) = 0, so λ = -2 and λ = -3.
    3. x = Ae^(-2t) + Be^(-3t).

    Trap: Writing λ = 2 and λ = 3, from the factors (λ - 2)(λ - 3) or a lost sign.

  7. Do not use a calculator. A displacement satisfies d²x/dt² + 5dx/dt + 6x = 0, with x = 1 and dx/dt = -5 when t = 0. Find x in terms of t.4 marks
    Answer
    1. From the general solution x = Ae^(-2t) + Be^(-3t), dx/dt = -2Ae^(-2t) - 3Be^(-3t).
    2. A + B = 1 and -2A - 3B = -5.
    3. Substituting B = 1 - A: -2A - 3 + 3A = -5, so A = -2 and B = 3.
    4. x = -2e^(-2t) + 3e^(-3t).

    Trap: Using dx/dt = -5 as if it were x, or forgetting the factors -2 and -3 from differentiating.

  8. An Euler estimate of a displacement is 2.63 m. The exact displacement is 240 cm, correct to the nearest 10 cm. Determine the maximum possible percentage error in the estimate. Give your answer to three significant figures.4 marks
    Answer
    1. The exact value is from 235 cm to 245 cm. The estimate is 263 cm.
    2. The largest error uses 235 cm: (263 - 235)/235 × 100.
    3. 11.9%.

    Trap: Using 240 gives 9.58%. Use the end of the interval, in one unit.

  9. A float on a pond bobs up and down. Its height x metres above its rest position at time t seconds satisfies 2d²x/dt² + dx/dt + 8x = 0. It is released from rest at x = 0.8 when t = 0. (a) Write the equation as coupled first order equations, with starting values. (b) Use Euler's method with h = 0.05 to determine the first estimated time the float reaches x = 0.5 marks
    Answer
    1. (a) Let y = dx/dt. Divide by 2: dx/dt = y and dy/dt = -4x - 0.5y, with x₀ = 0.8 and y₀ = 0.
    2. (b) xn₊₁ = xn + 0.05yn and yn₊₁ = yn + 0.05(-4xn - 0.5yn).
    3. x₁₆ = 0.0670 is still positive. x₁₇ = -0.00438 is the first value at or below 0.
    4. Step n = 17 with h = 0.05 is the time t = 17 × 0.05 = 0.85 seconds.

    Trap: Giving the step number n = 17 (or t = 17, or t = 1.7 from h = 0.1) instead of the time t = 0.85; the markscheme awards A0 for n in place of t.

  10. A door closer is modelled by 3d²x/dt² + 9dx/dt + 6x = 0, where x is the displacement in metres at time t seconds. At t = 0, x = 1 and dx/dt = 1. (a) Write the equation as coupled first order equations. (b) Use Euler's method with h = 0.2 to estimate x when t = 0.4. (c) Find x in terms of t. (d) Use your answer to (c) to find the percentage error in the estimate from (b). Give your answer to three significant figures.10 marks
    Answer
    1. (a) Divide by 3: d²x/dt² = -2x - 3dx/dt. So dx/dt = y and dy/dt = -2x - 3y, with x₀ = 1 and y₀ = 1.
    2. (b) x₁ = 1 + 0.2(1) = 1.2 and y₁ = 1 + 0.2(-2 - 3) = 0.
    3. x₂ = 1.2 + 0.2(0) = 1.2. So x(0.4) ≈ 1.2 m.
    4. (c) λ² + 3λ + 2 = 0, so λ = -1 and λ = -2 and x = Ae^(-t) + Be^(-2t).
    5. A + B = 1 and -A - 2B = 1, so B = -2 and A = 3. x = 3e^(-t) - 2e^(-2t).
    6. (d) x(0.4) = 3e^(-0.4) - 2e^(-0.8) = 1.11230.
    7. (1.2 - 1.11230)/1.11230 × 100 = 7.88%.

    Trap: Not dividing by 3 first, which gives y₁ = -2, x(0.4) ≈ 0.8 and an error of 28.1%.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
t = 20 or n = 20 for the first time x = 0t = 2 seconds. Step n = 20 with h = 0.1 is the time t = 2.
(4.36333 - 3.85)/3.85 × 100 = 13.3% with the exact value 3.85x = 3.845 seen or 3.855 seen, then 13.5% (13.4805) as the maximum possible error.
4.36333 - 385, with metres and centimetres mixedBoth values in the same unit: 3.85 m or 385 cm.

Frequently asked questions

How do I write a second order differential equation as coupled first order equations?
Let y = dx/dt, so dx/dt = y. Make d²x/dt² the subject first, dividing by its coefficient, then replace dx/dt with y. For d²x/dt² + 5dx/dt + 6x = 12 you get dy/dt = 12 - 5y - 6x. The starting values are x₀ = x(t₀) and y₀ = dx/dt at t₀, here x₀ = 1 and y₀ = -2.
How do I apply Euler's method to a second order equation written as a pair?
Step x and y together, using the old values on the right of both lines: xn₊₁ = xn + h yn and yn₊₁ = yn + h f(xn, yn, tn). Do not use the new xn₊₁ to find yn₊₁. For dx/dt = y and dy/dt = 12 - 5y - 6x with x = 1, y = -2 and h = 0.1, the estimates at t = 0.2 are x ≈ 0.76 and dx/dt ≈ 0.52.
How do I find the first time an Euler estimate of displacement reaches zero?
For a value at time t, take n = t/h steps and read xn. For the first time x reaches zero, keep stepping until xn first reaches or passes it, then give the time tn, not the step number. For the mass on the spring with h = 0.1, the displacement after 1 second is 4.36 m, and the first time it reaches x = 0 is t = 2 seconds, because step n = 20 is t = 2.
How do I find the maximum possible percentage error when the exact value is rounded?
An exact value given to the nearest unit lies in an interval. For 240 cm to the nearest 10 cm, it lies between 235 cm and 245 cm. Use the end of the interval that makes the error largest, with the estimate in the same unit. For an estimate of 263 cm the maximum possible percentage error is 11.9%.
How do I solve d^2x/dt^2 + a dx/dt + bx = 0 exactly?
Write the eigenvalues as roots of λ² + aλ + b = 0. Two real distinct roots λ₁ and λ₂ give x = Ae^(λ₁ t) + Be^(λ₂ t). Use the starting values to find A and B. For d²x/dt² + 4dx/dt + 3x = 0 with x = 2 and dx/dt = -4 at t = 0, the solution is x = e^(-t) + e^(-3t).
Why does my percentage error come out wrong when the estimate is in metres and the exact value is in centimetres?
Both values must be in the same unit. Metres and centimetres mixed, as in 4.36333 - 385, is wrong. Write the exact value as 3.845 m, which comes from 385 cm. Then (4.36333 - 3.845)/3.845 × 100 = 13.5%.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters