Algebra 1 · Grades 9, 10

Solving Equations by Graphing Both Sides

Quick answer

An equation f(x) = g(x) asks where two outputs agree. Graph y = f(x) and y = g(x) on the same axes and the answer is visible: the x-coordinates of the crossing points. That works for any pair of functions, including pairs no algebra at this level can solve, such as 2 to the x equals x plus 3. A table then pins each crossing down to as many decimal places as needed.

What you'll learn

  • Explain why intersection points give the solutions of f(x) = g(x)
  • Approximate solutions from a graph and a table of values
  • Narrow a solution by successive approximation

One equation, two graphs

The equation

2x=x+32^x = x + 3

has no algebraic method at this level. The unknown sits in an exponent on one side and in a sum on the other, and no rearrangement isolates it.

But the equation asks a plain question: for which xx do these two expressions give the same number? Graph each side as its own function and the question becomes visual.

y=2xandy=x+3y = 2^x \qquad\text{and}\qquad y = x + 3
Graphing each side of 2^x = x + 3 An exponential curve rising steeply to the right and a straight line with slope one. They cross twice, once near x equals negative 2.86 slightly above the x-axis and once near x equals 2.44. -4-224-2246810xy x ≈ −2.86 x ≈ 2.44
  • y = 2^x
  • y = x + 3
Graphing each side of 2^x = x + 3

The graphs cross twice, so the equation has two solutions: about −2.86-2.86 and about 2.442.44.

Why the crossing points are the solutions

A graph is the set of every point that satisfies its equation. So:

  • (a,b)(a, b) is on the graph of y=f(x)y = f(x) exactly when f(a)=bf(a) = b
  • (a,b)(a, b) is on the graph of y=g(x)y = g(x) exactly when g(a)=bg(a) = b

A point on both graphs therefore has f(a)=bf(a) = b and g(a)=bg(a) = b. Two things equal to the same number are equal to each other:

f(a)=g(a)f(a) = g(a)

So the xx-coordinate of every crossing is a solution.

The argument also runs the other way. If f(a)=g(a)f(a) = g(a), call the shared value bb. Then (a,b)(a, b) is on the first graph and on the second, so it is a crossing point. The solutions and the crossings are the same list — none missing and none extra.

Nothing in that argument used the kind of function. It works for lines, parabolas, exponentials, absolute values, reciprocals and logarithms alike.

Narrowing with a table

A graph gives a solution to about a tenth. A table does better.

Subtract one side from the other. A solution is where 2x−(x+3)=02^x - (x + 3) = 0, so look for the difference changing sign.

xx2x2^xx+3x + 3difference
2.32.34.9254.9255.35.3−0.375-0.375
2.42.45.2785.2785.45.4−0.122-0.122
2.52.55.6575.6575.55.5+0.157+0.157
2.62.66.0636.0635.65.6+0.463+0.463

The difference goes from negative to positive between 2.42.4 and 2.52.5. At 2.42.4 the line is still above the curve; at 2.52.5 the curve has passed it. The crossing is in between.

Repeat with a step ten times smaller.

xx2x2^xx+3x + 3difference
2.432.435.38895.38895.435.43−0.0411-0.0411
2.442.445.42645.42645.445.44−0.0136-0.0136
2.452.455.46425.46425.455.45+0.0142+0.0142
2.462.465.50225.50225.465.46+0.0422+0.0422

Now the sign changes between 2.442.44 and 2.452.45. Each round buys one more decimal place, and the rounds can continue as long as needed. This is successive approximation.

Other kinds of functions

The method needs only two graphs. Absolute value works the same way.

∣x−1∣=3−x2|x - 1| = 3 - \tfrac{x}{2}
Graphing each side of |x − 1| = 3 − x/2 A V-shaped graph with its point at (1, 0), and a straight line falling gently to the right. They cross at two points, one on each arm of the V. -6-4-2246-22468xy x = −4 x = 8/3
  • y = |x − 1|
  • y = 3 − x/2
Graphing each side of |x − 1| = 3 − x/2

The line meets each arm of the V once, so there are two solutions. Reading them and checking:

∣−4−1∣=5=3+2∣83−1∣=53=3−43|-4 - 1| = 5 = 3 + 2 \qquad \left|\tfrac{8}{3} - 1\right| = \tfrac{5}{3} = 3 - \tfrac{4}{3}

A graph also reports how many solutions to expect before any algebra starts. Here the answer is two, so an algebraic solution that finds only one has missed a case.

Worked examples

Common mistakes

Practice problems

  1. The graphs of y=f(x)y = f(x) and y=g(x)y = g(x) cross at (2,7)(2, 7) and (−1,4)(-1, 4). Solve f(x)=g(x)f(x) = g(x).

    Answer

    x=2x = 2 or x=−1x = -1

    Full solution

    The solutions are the xx-coordinates of the crossings. The yy-coordinates, 77 and 44, are the shared values.

  2. The graphs of y=x2y = x^2 and y=2x+3y = 2x + 3 cross at (−1,1)(-1, 1) and (3,9)(3, 9). Solve x2=2x+3x^2 = 2x + 3.

    Answer

    x=−1x = -1 or x=3x = 3

    Full solution

    Read the xx-coordinates, then check: (−1)2=1=2(−1)+3(-1)^2 = 1 = 2(-1) + 3 ✓ and 32=9=2(3)+33^2 = 9 = 2(3) + 3 ✓

  3. How many real solutions does x2=−4x^2 = -4 have?

    Answer

    None.

    Full solution

    y=x2y = x^2 never goes below 00, so it never meets the line y=−4y = -4.

  4. Between which two consecutive whole numbers is the solution of 2x=202^x = 20?

    Answer

    Between 44 and 55.

    Full solution

    24=16<202^4 = 16 < 20 and 25=32>202^5 = 32 > 20, so the curve passes y=20y = 20 between x=4x = 4 and x=5x = 5.

  5. For 2x=x+32^x = x + 3, the difference 2x−(x+3)2^x - (x + 3) is −0.122-0.122 at x=2.4x = 2.4 and +0.157+0.157 at x=2.5x = 2.5. What does that tell you?

    Answer

    A solution lies between 2.42.4 and 2.52.5.

    Full solution

    The difference changes sign, so the two sides trade places between those inputs. They must be equal somewhere in between.

  6. Solve 1x=x\tfrac{1}{x} = x and explain how the graph shows there are exactly two solutions.

    Answer

    x=1x = 1 or x=−1x = -1.

    Full solution

    The line y=xy = x passes through each branch of y=1xy = \tfrac{1}{x} once, at (1,1)(1, 1) and (−1,−1)(-1, -1).

    Neither graph meets the other anywhere else, so those are the only solutions.

  7. Check that x=−4x = -4 and x=83x = \tfrac{8}{3} both solve ∣x−1∣=3−x2|x - 1| = 3 - \tfrac{x}{2}.

    Answer

    Both check.

    Full solution

    At x=−4x = -4: ∣−5∣=5|-5| = 5 and 3+2=53 + 2 = 5 ✓

    At x=83x = \tfrac{8}{3}: ∣53∣=53\left|\tfrac{5}{3}\right| = \tfrac{5}{3} and 3−43=533 - \tfrac{4}{3} = \tfrac{5}{3} ✓

  8. Find the solution of 3x=53^x = 5 to one decimal place.

    Hint

    Try x=1.4x = 1.4 and x=1.5x = 1.5.

    Answer

    About 1.51.5.

    Full solution

    31.4≈4.6563^{1.4} \approx 4.656 and 31.5≈5.1963^{1.5} \approx 5.196, so the solution is between 1.41.4 and 1.51.5.

    To decide which way it rounds, test the midpoint: 31.45≈4.9183^{1.45} \approx 4.918, still below 55. So the solution is above 1.451.45 and rounds to 1.51.5.

  9. Explain why the argument that crossings are solutions works for every kind of function.

    Answer

    It uses only what a graph means — every point satisfies its equation — and never the formula of either function.

    Full solution

    The argument says: a point on both graphs has f(a)=bf(a) = b and g(a)=bg(a) = b, so f(a)=g(a)f(a) = g(a). And if f(a)=g(a)f(a) = g(a), the point (a,f(a))(a, f(a)) lies on both graphs.

    Neither step asks whether ff is linear, exponential or anything else. So the method applies to any pair of functions that can be graphed.

  10. Reading the crossing (3,9)(3, 9) of y=x2y = x^2 and y=2x+3y = 2x + 3, Andre reports that the solution of x2=2x+3x^2 = 2x + 3 is 99. Find his errors.

    Hint

    Which coordinate is the input? And is there only one crossing?

    Answer

    He reported the yy-coordinate, and he missed a crossing. The solutions are x=3x = 3 and x=−1x = -1.

    Full solution

    At (3,9)(3, 9) the input is 33 and the shared output is 99. The equation asks for the input, so this crossing gives x=3x = 3.

    Substituting 99 shows the mistake: 92=819^2 = 81 but 2(9)+3=212(9) + 3 = 21.

    The parabola also crosses the line at (−1,1)(-1, 1), since (−1)2=1=2(−1)+3(-1)^2 = 1 = 2(-1) + 3. So the full answer is x=3x = 3 or x=−1x = -1.

Frequently asked questions

Why do intersection points solve f(x) = g(x)?

A point on both graphs has one x and one y. Being on the first graph means f(x) equals that y, and being on the second means g(x) does, so f(x) = g(x) there.

Is the solution the x or the y of the intersection?

The x. The y is the value both sides share at that point, not the input that makes them equal.

What if the graphs never cross?

Then no real x makes the two sides equal, and the equation has no real solution.

How do I get more decimal places than the graph shows?

Make a table of f(x) − g(x). Where it changes sign, a solution lies between. Shrink the step and repeat.

Does this work for exponential or absolute value equations?

Yes. The argument never uses the type of function, so it works for any two functions that can be graphed.

What to learn next

Standards alignment

This lesson covers the following Common Core State Standards for Mathematics.

  • CCSS.MATH.CONTENT.HSA.REI.D.11Reasoning with Equations and InequalitiesExplain why the x-coordinates of the points where the graphs of the equations y = f(x) and y = g(x) intersect are the solutions of the equation f(x) = g(x); find the solutions approximately, e.g., using technology to graph the functions, make tables of values, or find successive approximations. Include cases where f(x) and/or g(x) are linear, polynomial, rational, absolute value, exponential, and logarithmic functions.