NC.M3.A-REI.11Print or save as PDF
Solving Equations by Graphing
Some equations are easy to solve by hand and some are not. This guide shows why the x-coordinates of the points where y = f(x) and y = g(x) intersect are the solutions of f(x) = g(x), and how to find approximate solutions two ways: with graphing technology, and by successive approximations with a table of values.
Source: Authored for NCMath (not from the PDF prototype) — needs teacher review
Why an intersection is a solution
Two graphs, one equation
The idea — y = f(x) and y = g(x) cross at x = a ⇔ f(a) = g(a)
Every point on the graph of y = f(x) is a pair (x, f(x)). Every point on the graph of y = g(x) is a pair (x, g(x)).
A point where the two graphs cross sits on both curves. So it has one x-value and one y-value, and both functions give that same y at that x.
That means f(x) = g(x) at that x. An x-value that makes f(x) = g(x) true is a solution of the equation.
It works the other way too: if an x-value makes f(x) = g(x) true, the two graphs meet at that x.
Example
Solve 2x − 1 = −x + 5 using the graph of y = 2x − 1 and y = −x + 5.
The lines cross at the point (2, 3). The x-coordinate is 2. Check: 2(2) − 1 = 3 and −(2) + 5 = 3, so both sides equal 3 when x = 2. The solution is x = 2.
The lines cross at the point (2, 3). The x-coordinate is 2. Check: 2(2) − 1 = 3 and −(2) + 5 = 3, so both sides equal 3 when x = 2. The solution is x = 2.
Read the x-coordinate, not the y-coordinate
The question asks for x, so the answer is the x-coordinate of each intersection point.
The y-coordinate is the value both sides share. It is useful for checking, but it is not the solution.
A graph can cross more than once. Each crossing gives one solution.
- Write the equation as two functions: y = f(x) for the left side and y = g(x) for the right side.
- Graph both on the same axes.
- Find every point where the graphs cross.
- Read the x-coordinate of each crossing. Those are the solutions.
- Check each one in the original equation.
Example
Solve x² = x + 2 from the graph.
Graph y = x² and y = x + 2. They cross at (−1, 1) and (2, 4). The solutions are the x-coordinates: x = −1 and x = 2. Check: (−1)² = 1 and −1 + 2 = 1. Also 2² = 4 and 2 + 2 = 4.
Graph y = x² and y = x + 2. They cross at (−1, 1) and (2, 4). The solutions are the x-coordinates: x = −1 and x = 2. Check: (−1)² = 1 and −1 + 2 = 1. Also 2² = 4 and 2 + 2 = 4.
Trap: Do not answer with the y-coordinate. For the crossing (2, 4), the solution is x = 2, not 4. Test it: x = 4 gives 4² = 16 but 4 + 2 = 6, so 4 is not a solution.
Equations that are hard to solve by hand
2ˣ = x + 3
This equation mixes an exponential with a line. Algebra has no simple step that gets x alone, so graph both sides.
The graphs cross twice, so there are two solutions.
Graphing technology (a graphing calculator or a graphing site) can find each intersection. The values here are rounded to two decimal places.
Example
Use the graph to give both solutions of 2ˣ = x + 3, to two decimal places.
The graphs cross at about (−2.86, 0.14) and (2.44, 5.44). The solutions are the x-coordinates: x ≈ −2.86 and x ≈ 2.44. These are approximate, so use ≈.
The graphs cross at about (−2.86, 0.14) and (2.44, 5.44). The solutions are the x-coordinates: x ≈ −2.86 and x ≈ 2.44. These are approximate, so use ≈.
|x − 2| = x²/4
An absolute value and a parabola. By hand this needs separate cases for each side of the V. On a graph you can see both crossings at once.
The graphs cross twice, and both crossings are on the left branch of the V (where x < 2). The parabola never meets the right branch.
Example
Use the graph to solve |x − 2| = x²/4 to two decimal places.
The graphs cross at about (−5.46, 7.46) and (1.46, 0.54). The solutions are x ≈ −5.46 and x ≈ 1.46.
The graphs cross at about (−5.46, 7.46) and (1.46, 0.54). The solutions are x ≈ −5.46 and x ≈ 1.46.
sin x = 0.5x
A sine wave and a line. The line passes through the middle of the wave, so they cross three times.
One solution is x = 0, because sin 0 = 0 and 0.5(0) = 0. The other two are matching values on each side of 0.
Use radian mode on a calculator for this equation.
Example
How many solutions does sin x = 0.5x have, and what are they to two decimal places?
The graphs cross three times, at about (−1.90, −0.95), (0, 0) and (1.90, 0.95). The solutions are x ≈ −1.90, x = 0 and x ≈ 1.90.
The graphs cross three times, at about (−1.90, −0.95), (0, 0) and (1.90, 0.95). The solutions are x ≈ −1.90, x = 0 and x ≈ 1.90.
Trap: Do not stop at the first crossing you see. Count every place the graphs meet inside the window, then ask whether the graphs could cross again outside it.
Successive approximation with a table
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.
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.
The f(x) − g(x) = 0 view
Move everything to one side
Same equation — f(x) = g(x) ⇔ f(x) − g(x) = 0
Define — h(x) = f(x) − g(x)
Subtract g(x) from both sides. The equation becomes h(x) = 0, where h(x) = f(x) − g(x).
Solutions of h(x) = 0 are the zeros of h: the x-intercepts of its graph.
The zeros of h are at the same x-values as the intersections of f and g. The picture changes, but the solutions do not.
This is the view the table uses. The sign of f(x) − g(x) is the sign of h(x), so a sign change in the table is the graph of h crossing the x-axis.
Example
Rewrite 2ˣ = x + 3 as a zero problem and say where h is zero.
h(x) = 2ˣ − (x + 3) = 2ˣ − x − 3. Its graph crosses the x-axis at x ≈ −2.86 and x ≈ 2.44, the same two x-values where y = 2ˣ and y = x + 3 intersect. Check the y-intercept: h(0) = 1 − 0 − 3 = −2.
h(x) = 2ˣ − (x + 3) = 2ˣ − x − 3. Its graph crosses the x-axis at x ≈ −2.86 and x ≈ 2.44, the same two x-values where y = 2ˣ and y = x + 3 intersect. Check the y-intercept: h(0) = 1 − 0 − 3 = −2.
Trap: When h(x) is positive, f is above g. When h(x) is negative, f is below g. Zeros of h are where f and g are equal, not where f or g is zero.
Memory hook: Solutions live at the x where the graphs cross. A sign change in f(x) − g(x) tells you where to look.
Practice
1. The graph shows y = x² − 4x + 3 and y = x − 1. Use it to solve x² − 4x + 3 = x − 1.
2. The graph shows y = x + 1 and y = −2x + 7. A student says the solution of x + 1 = −2x + 7 is 3, because the lines cross at a point whose y-coordinate is 3. What is the solution, and what did the student do wrong?
3. The graph shows y = sin x and y = 0.5x. How many solutions does sin x = 0.5x have? Give each one, rounding to two decimal places where needed.
4. The graph shows y = 2ˣ and y = x². How many solutions does 2ˣ = x² have in the window shown? Two of them are whole numbers you can check by substitution. Find them, and say where the third lies.
5. A town has population P(t) = 5000(1.04)ᵗ, where t is the number of years from now. A second town has population Q(t) = 8000 + 150t. The towns want to know when their populations will be equal. Write the equation to solve, and say which two functions you would graph and which coordinate of the intersection to read.
6. Solve x³ = 5 − x to two decimal places using a table of values. The first two rows are done for you. Fill in the rest and say what the solution is.
| x | x³ | 5 − x | x³ − (5 − x) | Sign |
|---|---|---|---|---|
| 1 | 1.000 | 4.000 | −3.000 | − |
| 2 | 8.000 | 3.000 | 5.000 | + |
7. In the town problem, 5000(1.04)ᵗ = 8000 + 150t. Use a table to find, to the nearest tenth of a year, when the two populations are equal. Start with t = 20 and t = 21.
8. The graph shows y = 3 − |x| and y = x²/2. Solve 3 − |x| = x²/2 to two decimal places. Use a table to find the positive solution, then use the symmetry of the graph for the other one.