Solving Equations Graphically and Numerically
Theory
An equation such as \(2^x = x + 3\) can be solved by graphing both sides and reading the \(x\)-coordinates of the crossing points. This Year 10A maths page (Victorian Curriculum 10A) shows how to solve linear and non-linear equations from graphs, how to improve an estimate by guess, check and refine or the bisection method, and how to check that all the solutions have been found. Curriculum: VC2M10A16, VC2M10AA10 / AC9M10A05.
The graph of \(y = f(x)\) is the set of points whose coordinates make the equation true. Where the graphs of \(y = f(x)\) and \(y = g(x)\) cross, the two \(y\)-values are equal, so the \(x\)-coordinate of each crossing point is a solution of the equation \(f(x) = g(x)\).
The number of crossing points is the number of solutions. Two straight lines cross once, or never if they are parallel. A line can meet a parabola \(2\), \(1\) or \(0\) times. Curves such as \(y = 2^x\) can meet a line or a parabola more than once.
A solution read from a graph is usually an estimate. To improve it, use a numerical method: guess, check and refine with a table of values, or halve the interval (the bisection method) until the answer is accurate enough.
A change of sign shows where a solution is. If \(h(x) = f(x) - g(x)\) is negative at one value and positive at another, the graphs cross somewhere between them (for smooth graphs with no breaks).
Solutions of an equation are the \(x\)-coordinates of crossing points:
| Equation | Graphs to draw | Read off |
|---|---|---|
| \(f(x) = 0\) | \(y = f(x)\) | \(x\)-intercepts |
| \(f(x) = k\) | \(y = f(x)\) and \(y = k\) | \(x\)-values where the horizontal line meets the curve |
| \(f(x) = g(x)\) | \(y = f(x)\) and \(y = g(x)\) | \(x\)-values of the crossing points |
How to solve an equation graphically
- Write the equation as \(f(x) = g(x)\). Choose graphs that are easy to draw, rearranging if that helps.
- Draw both graphs on the same axes, or use a graphing tool.
- Read the \(x\)-coordinate of every crossing point. The \(y\)-coordinate is not the solution.
- Check each value by substituting it into both sides. Zoom in on a graphing tool for more accuracy.
How to guess, check and refine
- Move everything to one side: \(h(x) = f(x) - g(x)\). A solution is where \(h(x) = 0\).
- Find a sign change between two whole numbers using a table of values.
- Refine: try values in between (\(2.1, 2.2, \ldots\)) until the sign changes between two neighbours, then test the halfway value to round correctly.
The bisection method
- Start with an interval \(a \lt x \lt b\) where \(h(a)\) and \(h(b)\) have opposite signs.
- Test the midpoint \(m = \dfrac{a + b}{2}\). Keep the half where the sign still changes.
- Repeat. Each step halves the width of the interval. Stop when both ends round to the same value.
Have all the solutions been found?
- Look wider: extend the graphs to the left and right. Exponential and cubic graphs can cross a line again far from the first point.
- Use what you know: a line meets a parabola at most twice, and two different straight lines meet at most once.
(ii) Use graphs to explain why \(3x + 2 = 3x - 4\) has no solution.
(i) The solution is the \(x\)-coordinate of the crossing point, not the \(y\)-coordinate.
| \(x\) | \(=\) | \(\boldsymbol{4}\) |
Check: \(2(4) - 1 = 7\). ✓
(ii) Graph \(y = 3x + 2\) and \(y = 3x - 4\). Both lines have gradient \(3\) but different \(y\)-intercepts, so they are parallel and never cross. With no crossing point, the equation has no solution. Algebra agrees: subtracting \(3x\) gives \(2 = -4\), which is false.
(ii) Use the graph to solve \(x^2 - 2x - 2 = 1\), and check your answers.
(i) The solutions of \(x^2 - 2x - 2 = 0\) are the \(x\)-intercepts. The curve crosses the \(x\)-axis a little to the right of \(-1\) and a little to the left of \(3\).
| \(x\) | \(\approx\) | \(\boldsymbol{-0.7} \text{ or } \boldsymbol{x \approx 2.7}\) |
(ii) The solutions are where the line \(y = 1\) meets the curve: at \((-1, 1)\) and \((3, 1)\).
| \(x\) | \(=\) | \(\boldsymbol{-1} \text{ or } \boldsymbol{x = 3}\) |
Check: \((-1)^2 - 2(-1) - 2 = 1\) and \(3^2 - 2(3) - 2 = 1\). ✓
Let \(h(x) = 2^x - x - 3\). A solution is where \(h(x) = 0\), so look for a change of sign.
| \(x\) | \(2\) | \(2.4\) | \(2.45\) | \(2.5\) | \(3\) |
|---|---|---|---|---|---|
| \(h(x)\) | \(-1\) | \(-0.122\) | \(0.014\) | \(0.157\) | \(2\) |
\(h(2.4) \lt 0\) and \(h(2.5) \gt 0\), so the solution is between \(2.4\) and \(2.5\). The halfway value gives \(h(2.45) \gt 0\), so the solution is between \(2.4\) and \(2.45\).
| \(x\) | \(\approx\) | \(\boldsymbol{2.4}\) |
The other solution: \(h(-3) = 0.125 \gt 0\) and \(h(-2) = -0.75 \lt 0\), so there is a second solution between \(-3\) and \(-2\), where the line crosses the curve on the left. Refining the same way gives \(x \approx -2.9\).
Let \(f(x) = x^3 - 2x - 5\). Then \(f(2) = -1 \lt 0\) and \(f(3) = 16 \gt 0\). Test the midpoint each time and keep the half where the sign changes.
| \(x\) | \(2.5\) | \(2.25\) | \(2.125\) | \(2.0625\) |
|---|---|---|---|---|
| \(f(x)\) | \(5.625\) | \(1.891\) | \(0.346\) | \(-0.351\) |
\(f(2.5) \gt 0\): the solution is in \(2 \lt x \lt 2.5\). \(f(2.25) \gt 0\): \(2 \lt x \lt 2.25\). \(f(2.125) \gt 0\): \(2 \lt x \lt 2.125\). \(f(2.0625) \lt 0\): \(2.0625 \lt x \lt 2.125\).
Both ends of the last interval round to \(2.1\), so
| \(x\) | \(\approx\) | \(\boldsymbol{2.1}\) |
Each step halves the interval: its width went \(1, 0.5, 0.25, 0.125, 0.0625\).
Common pitfalls
Frequently asked questions
How do you solve an equation using a graph?
Draw the graphs of the left side and the right side on the same axes. The \(x\)-coordinate of each crossing point is a solution.
How do I know how many solutions there are?
Count the crossing points. Make sure the graphs are drawn wide enough, and use facts such as a line meeting a parabola at most twice.
What is guess, check and refine?
It is a way to improve an estimate. Substitute values into one side minus the other, look for a change of sign, then try values closer and closer together until the answer is accurate enough.
What is the bisection method?
Start with an interval where the sign changes. Test the midpoint and keep the half where the sign still changes. Each step halves the interval.
Why not just use algebra?
Many equations, such as \(2^x = x + 3\), cannot be solved with the algebra met in Year 10. Graphs and numerical methods still give accurate answers.