Trap the solution, then squeeze it
Make a table of values. For each x, find f(x), g(x) and the difference f(x) − g(x).
If f(x) − g(x) changes sign between two x-values, the graphs crossed between them. That is the same as the solution lying between them (the graphs are continuous there).
Then try x-values inside that gap, with smaller steps, and keep the pair where the sign changes. Each round gives one more decimal place.
To decide how to round, test the halfway value. Its sign tells you which half of the gap holds the solution.
- Subtract to get a difference: f(x) − g(x).
- Try whole numbers until the sign changes. That gives a gap of width 1.
- Try the tenths inside that gap until the sign changes again. The gap is now 0.1 wide.
- Try the hundredths inside it. The gap is now 0.01 wide.
- Test the halfway value of that gap. If its sign matches the left end, the solution is in the right half, and the other way round. Round to the nearer end.
| x | 2ˣ | x + 3 | 2ˣ − (x + 3) | Sign |
|---|
| 2 | 4.0000 | 5.0000 | −1.0000 | − |
| 3 | 8.0000 | 6.0000 | 2.0000 | + |
| 2.4 | 5.2780 | 5.4000 | −0.1220 | − |
| 2.5 | 5.6569 | 5.5000 | 0.1569 | + |
| 2.44 | 5.4264 | 5.4400 | −0.0136 | − |
| 2.45 | 5.4642 | 5.4500 | 0.0142 | + |
| 2.445 | 5.4453 | 5.4450 | 0.0003 | + |
Solving 2ˣ = x + 3 near x = 2.4. Each pair of rows with opposite signs traps the solution.
Example
Use the table to give the positive solution of 2ˣ = x + 3 to two decimal places.
The sign changes from − to + between x = 2 and 3, then between 2.4 and 2.5, then between 2.44 and 2.45. The solution is between 2.44 and 2.45. Halfway is 2.445, and the difference there is +0.0003, which has the same sign as the right end (2.45). So the solution is in the left half, between 2.44 and 2.445. To two decimal places, x ≈ 2.44.
Trap: Do not round by guessing which row looks closer. Here the differences at 2.44 (−0.0136) and 2.45 (0.0142) are about the same size, so they can't settle it. Test the halfway value instead.