Slope fields and Euler's method: VCE Specialist Mathematics Unit 4
“Slope (direction) fields as a representation of a first-order differential equation, the sketching of solution curves on a slope field, and Euler's method for the numerical approximation of a solution from an initial condition with a chosen step size”
A differential equation assigns a gradient to every point in the plane. A slope field draws a short line segment of that gradient at a grid of points, so a solution curve is one that is tangent to the field everywhere. Euler's method approximates a solution numerically by stepping in straight-line pieces: from a point it computes the next point by and , where is the step size. Smaller steps give more accuracy. Euler always follows the current gradient for one whole step, so it lags behind curving solutions.
Jump to a section
What this dot point is asking
VCAA wants you to read and sketch the slope field of a first-order differential equation, to trace approximate solution curves through it, and to apply Euler's method to compute a numerical approximation to a solution given an initial condition and a step size. These are the qualitative and numerical companions to solving differential equations exactly.
Slope fields
A first-order differential equation gives the gradient of the solution at any point . A slope field (or direction field) draws a short segment with that gradient at many grid points. The picture shows the "flow" of all solutions at once: a solution curve is any curve that is tangent to the segments everywhere it passes.
To sketch a solution through a given point, start at that point and draw a curve that follows the local segment directions, staying parallel to nearby segments. Different starting points give different members of the solution family, which never cross.
Reading a slope field: where the segments are horizontal; where is large the segments are steep; segments that depend only on are constant along vertical lines, and those depending only on are constant along horizontal lines.
Euler's method
Euler's method turns the gradient information into a numerical solution. Starting from a known point and using step size , it repeatedly takes a straight step along the current gradient:
Geometrically, at each step you follow the tangent line for a horizontal distance , then recompute the gradient at the new point and repeat. The result is a polygonal (broken-line) approximation to the true solution curve.
Accuracy. Because the method holds the gradient fixed across each step, it drifts away from a curving solution, undershooting or overshooting depending on the concavity. Halving the step size roughly halves the error, so a smaller gives a better approximation at the cost of more steps.
Two Euler steps
Use Euler's method with step size to estimate for , given .
Here , , , .
Step 1 (to ). Gradient at is . Then
Step 2 (to ). Gradient at is . Then
So Euler's method estimates .
As a sanity check, the gradients are positive and growing, so should rise from and rise faster each step; the increments then confirm this. The true solution curves upward, so this two-step estimate is a slight underestimate.
- Using the new gradient too early
- In Euler's method the gradient for a step is evaluated at the start of that step, the point , not at the destination.
- Wrong step size in the update
- The increment is . Forgetting the factor overshoots massively.
- Drawing crossing solution curves
- Distinct solution curves of a first-order equation do not cross, since each point has a single gradient.
- Confusing the axes of a slope field
- Segments show , the gradient, not values of . A horizontal segment means gradient zero, not .
Examples in context
Example 1. For , the slope field segments are perpendicular to the radius at each point, and the solution curves are circles.
Example 2. One Euler step for from with gives , approximating .
Try this
Q1. What does a horizontal segment in a slope field indicate? [1 mark]
- Cue. The gradient is zero there.
Q2. Write the Euler update formula for . [1 mark]
- Cue. .
Q3. For with and , find at . [2 marks]
- Cue. Gradient at is , so .
Exam-style questions
Questions in the style of VCAA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.
2025 VCAA-style2 marksConsider the differential equation dQ/dt = (300 - Q)/150 with Q(0) = 5. Using Euler's method with a step size of 15 minutes, find Q(30), the approximate quantity of salt in the tank after 30 minutes. Give your answer in kilograms, correct to two decimal places.
Show worked answer →
Euler's method uses Q(next) = Q(current) + h . f(t, Q), with f(t, Q) = (300 - Q)/150 and step size h = 15. Start at t = 0, Q = 5.
Step 1 (to t = 15): slope = (300 - 5)/150 = 295/150 = 1.9667, so Q(15) = 5 + 15 . 1.9667 = 5 + 29.5 = 34.5.
Step 2 (to t = 30): slope = (300 - 34.5)/150 = 265.5/150 = 1.77, so Q(30) = 34.5 + 15 . 1.77 = 34.5 + 26.55 = 61.05.
Therefore Q(30) is approximately 61.05 kg (to two decimal places).
2023 VCAA-style1 markConsider the following pseudocode. define f(x,y) = e^(xy); x = 0; y = 0; h = 0.5; n = 0; while n >= 0: y = y + h x f(x,y); x = x + h; n = n + 1; print y; end while. After how many iterations will the pseudocode print 2.709? A. 1 B. 2 C. 3 D. 4 E. 5
Show worked answer →
The pseudocode is Euler's method for dy/dx = e^(xy) with x0 = 0, y0 = 0 and step h = 0.5. Each pass updates y by y = y + h . e^(xy), then increases x by 0.5, then prints y.
Iteration 1: y = 0 + 0.5 . e^(0 . 0) = 0.5 . 1 = 0.5; then x becomes 0.5. Prints 0.5.
Iteration 2: y = 0.5 + 0.5 . e^(0.5 . 0.5) = 0.5 + 0.5 . e^0.25 = 0.5 + 0.642 = 1.142; then x becomes 1.0. Prints 1.142.
Iteration 3: y = 1.142 + 0.5 . e^(1.0 . 1.142) = 1.142 + 0.5 . e^1.142 = 1.142 + 1.567 = 2.709; prints 2.709.
So 2.709 is printed after 3 iterations, which is option C.