Skip to content
Family Table Math

Solving Equations and Inequalities Graphically

Some equations can’t be solved with algebra at all. Try isolating xx in 2x=x+32^x = x + 3: taking logs doesn’t help, because xx is stuck both in an exponent and outside one. Equations like this, which mix different function types, come up all the time in real problems. You can still solve them, very accurately, by using graphs to find roughly where the solutions are and then narrowing in with numbers. Trig functions here use radians.

To solve f(x)=g(x)f(x) = g(x):

  1. Graph both sides. Graph y=f(x)y = f(x) and y=g(x)y = g(x) on the same axes. The solutions are the xx-coordinates of the points where the graphs intersect.
  2. Find zeros. Move everything to one side: h(x)=f(x)−g(x)=0h(x) = f(x) - g(x) = 0. Graph y=h(x)y = h(x). The solutions are its zeros (xx-intercepts).

Both give the same answers. The first is good for seeing how many solutions there are and roughly where. The second is handy for narrowing them down, because you only have to watch one sign.

If h(a)h(a) and h(b)h(b) have opposite signs (and hh has no breaks between them), the graph must cross the xx-axis somewhere between aa and bb. So you can trap a solution:

  1. Find two values where hh changes sign, using the graph or a table.
  2. Test a value in between, and keep the half where the sign still changes.
  3. Repeat until the interval is small enough.

To round to 2 decimal places, show a sign change across the rounding interval. For example, if h(2.435)h(2.435) and h(2.445)h(2.445) have opposite signs, the solution is between them, so it rounds to 2.442.44.

To solve f(x)<g(x)f(x) \lt g(x), find where the graphs intersect first. Those points split the xx-axis into intervals, and on each interval one graph stays below the other. The solution is the set of intervals where the graph of ff is below the graph of gg. (This is the same idea as polynomial inequalities, but the boundary points now come from a graph instead of from factoring.)

Graphing technology such as Desmos finds intersection points and zeros instantly, and it’s a great way to check your work. But you should always be able to explain where the answer came from: an intersection, a zero, or a sign change. A by-hand table with a calculator works anywhere.

Solve 2x=x+32^x = x + 3. Give the answers to 2 decimal places.

Solution. Graph y=2xy = 2^x and y=x+3y = x + 3.

The curve y = 2^x and the line y = x + 3 cross at two points, with x-coordinates about -2.86 and 2.44. −3 −2 −1 1 2 3 −1 1 2 3 4 5 6 7 x ≈ −2.86 x ≈ 2.44 y = 2ˣ y = x + 3
y=2xy = 2^x and y=x+3y = x + 3 cross twice, so the equation has two solutions.

The graphs cross twice: once between x=−3x = -3 and x=−2x = -2, and once between x=2x = 2 and x=3x = 3. A line can’t cross an exponential curve more than twice, so these are all the solutions.

Let h(x)=2x−x−3h(x) = 2^x - x - 3 and narrow in on each crossing (values to 4 decimal places).

xx−3-3−2.9-2.9−2.865-2.865−2.86-2.86−2.855-2.8552.42.42.4352.4352.442.442.4452.4452.52.5
h(x)h(x)0.1250.1250.03400.03400.00230.0023−0.0023-0.0023−0.0068-0.0068−0.1220-0.1220−0.0274-0.0274−0.0136-0.01360.00030.00030.15690.1569
  • h(−2.865)>0h(-2.865) \gt 0 and h(−2.855)<0h(-2.855) \lt 0, so the first solution is between them and rounds to x≈−2.86x \approx -2.86.
  • h(2.435)<0h(2.435) \lt 0 and h(2.445)>0h(2.445) \gt 0, so the second solution rounds to x≈2.44x \approx 2.44.

Check: 22.44≈5.432^{2.44} \approx 5.43 and 2.44+3=5.442.44 + 3 = 5.44. They agree to within rounding. ✓

Solve cos⁡x=x\cos x = x, where xx is in radians. Give the answer to 2 decimal places.

Solution. Sketch y=cos⁡xy = \cos x and y=xy = x. The line y=xy = x is above 11 for x>1x \gt 1, and below −1-1 for x<−1x \lt -1, so any crossing must have −1≤x≤1-1 \le x \le 1. For −1≤x≤0-1 \le x \le 0, cos⁡x\cos x is positive while xx is not, so there’s no crossing there either. Between 00 and 11, cos⁡x\cos x falls from 11 while y=xy = x rises from 00, so they cross exactly once.

Let h(x)=cos⁡x−xh(x) = \cos x - x and narrow in (calculator in radian mode):

xx0.70.70.730.730.7350.7350.740.740.7450.7450.750.75
h(x)h(x)0.06480.06480.01520.01520.00680.0068−0.0015-0.0015−0.0099-0.0099−0.0183-0.0183

The sign changes between 0.7350.735 and 0.7450.745 (in fact between 0.7350.735 and 0.740.74), so the solution rounds to

x≈0.74x \approx 0.74

Check: cos⁡0.74≈0.738\cos 0.74 \approx 0.738, very close to 0.740.74. ✓

Solve 2x2<2x2x^2 \lt 2^x. Give the boundary values to 2 decimal places.

Solution. First solve the equation 2x2=2x2x^2 = 2^x. Graph both sides.

The parabola y = 2x^2 and the curve y = 2^x. They meet at x about -0.58, x = 1 and x about 6.32. The regions between -0.58 and 1 and to the right of 6.32, where 2^x is above 2x^2, are shaded and marked with thick green bars on the x-axis. −1 1 2 3 4 5 6 7 20 40 60 80 100 120 x ≈ 6.32 y = 2x² y = 2ˣ x = 1 x ≈ −0.58
2x2^x is above 2x22x^2 between the first two crossings and after the third.

The graphs meet three times. One crossing is exact: at x=1x = 1, both sides equal 22. Narrow in on the other two with h(x)=2x2−2xh(x) = 2x^2 - 2^x:

xx−0.585-0.585−0.575-0.5756.3156.3156.3256.325
h(x)h(x)0.01780.0178−0.0100-0.01000.14170.1417−0.1593-0.1593

So the crossings are at x≈−0.58x \approx -0.58, x=1x = 1 and x≈6.32x \approx 6.32.

Now test a value in each interval to see where 2x2<2x2x^2 \lt 2^x:

IntervalTest xx2x22x^22x2^x2x2<2x2x^2 \lt 2^x?
x<−0.58x \lt -0.58−1-1220.50.5no
−0.58<x<1-0.58 \lt x \lt 1000011yes
1<x<6.321 \lt x \lt 6.32228844no
x>6.32x \gt 6.32779898128128yes

The solution is approximately

−0.58<x<1orx>6.32-0.58 \lt x \lt 1 \quad\text{or}\quad x \gt 6.32

Notice the last interval: it’s easy to miss if your graph stops at x=5x = 5. Because exponentials eventually beat polynomials, 2x2^x must overtake 2x22x^2 again somewhere.

Town A has 80008000 people and grows by 4%4\% a year, so after tt years its population is A(t)=8000(1.04)tA(t) = 8000(1.04)^t. Town B has 12 00012\,000 people and grows by 100100 people a year: B(t)=12 000+100tB(t) = 12\,000 + 100t. When will the towns have the same population? Answer to 2 decimal places.

Solution. Solve 8000(1.04)t=12 000+100t8000(1.04)^t = 12\,000 + 100t. This mixes an exponential and a linear function, so use a graph or a table. Let h(t)=A(t)−B(t)h(t) = A(t) - B(t):

tt1010121212.94512.94512.95512.9551313
h(t)h(t)−1158.0-1158.0−391.7-391.7−2.6-2.61.61.620.620.6

hh changes sign between 12.94512.945 and 12.95512.955, so the populations are equal after about t≈12.95t \approx 12.95 years, when both towns have about 13 30013\,300 people. Before that Town B is bigger, and after it Town A’s exponential growth keeps it ahead for good.

Trying to solve with algebra that can’t work. Taking logs of 2x=x+32^x = x + 3 gives xlog⁡2=log⁡(x+3)x\log 2 = \log(x + 3), which still has xx in two different kinds of places. Recognize these equations early and switch to a graph.

Stopping after the first solution. Graph over a wide enough window to see every crossing. In Example 3, the crossing near 6.326.32 is far from the others.

Rounding from a single nearby value. Seeing that h(2.44)h(2.44) is small doesn’t prove the answer rounds to 2.442.44. Show a sign change between 2.4352.435 and 2.4452.445.

Using degree mode. In cos⁡x=x\cos x = x, xx is a real number of radians. In degree mode you’ll get a completely different (and wrong) answer.

Reading the wrong intervals for an inequality. f(x)<g(x)f(x) \lt g(x) is where the graph of ff is below the graph of gg. Test a point in each interval to be sure.

Giving the y-coordinate as the solution. The solutions of f(x)=g(x)f(x) = g(x) are the xx-coordinates of the intersection points. The yy-coordinate is just the common value.

1. (Warm-up) The equation 3x=5−x3^x = 5 - x can’t be solved algebraically.

  • (a) Explain why it has exactly one solution.
  • (b) Show that the solution lies between 11 and 22, then find it to 2 decimal places.
Solution

(a) y=3xy = 3^x is always increasing and y=5−xy = 5 - x is always decreasing, so their graphs can cross at most once. And they do cross, since 3x3^x starts below the line on the left and ends up above it on the right.

(b) Let h(x)=3x+x−5h(x) = 3^x + x - 5. Then h(1)=3+1−5=−1<0h(1) = 3 + 1 - 5 = -1 \lt 0 and h(2)=9+2−5=6>0h(2) = 9 + 2 - 5 = 6 \gt 0, so there’s a solution between 11 and 22.

Narrowing in: h(1.2)≈−0.0628h(1.2) \approx -0.0628, h(1.205)≈−0.0372h(1.205) \approx -0.0372, h(1.215)≈0.0143h(1.215) \approx 0.0143. The sign changes between 1.2051.205 and 1.2151.215, so x≈1.21x \approx 1.21.

2. (Warm-up) Show that x3+x=7x^3 + x = 7 has a solution between 11 and 22, and find it to 2 decimal places.

Solution

Let h(x)=x3+x−7h(x) = x^3 + x - 7. Then h(1)=−5h(1) = -5 and h(2)=3h(2) = 3: a sign change.

xx1.71.71.81.81.731.731.7351.7351.7451.745
h(x)h(x)−0.387-0.3870.6320.632−0.092-0.092−0.042-0.0420.0590.059

The sign changes between 1.7351.735 and 1.7451.745, so x≈1.74x \approx 1.74.

3. (Warm-up) Without solving, explain how many solutions sin⁡x=0.3x\sin x = 0.3x has (xx in radians). Use a sketch of both sides.

Solution

sin⁡x\sin x is always between −1-1 and 11, and 0.3x0.3x is between −1-1 and 11 only for −3.33≤x≤3.33-3.33 \le x \le 3.33. So all solutions are in that interval.

x=0x = 0 is a solution. For x>0x \gt 0: sin⁡x\sin x starts out rising faster than the line (at x=2x = 2, sin⁡2≈0.91>0.6\sin 2 \approx 0.91 \gt 0.6), but by x=3x = 3 it’s below it (sin⁡3≈0.14<0.9\sin 3 \approx 0.14 \lt 0.9), so they cross once between 22 and 33. For π<x≤3.33\pi \lt x \le 3.33, sin⁡x\sin x is negative while 0.3x0.3x is positive, so there are no more crossings. Both sides are odd functions, so the picture for x<0x \lt 0 is the mirror image.

There are 33 solutions: x=0x = 0 and one each near ±2.4\pm 2.4. (Narrowing in gives ±2.36\pm 2.36.)

4. (Core) Solve x3−3x+1=0x^3 - 3x + 1 = 0. Give all solutions to 2 decimal places.

Solution

The rational root candidates ±1\pm 1 don’t work (1−3+1=−11 - 3 + 1 = -1 and −1+3+1=3-1 + 3 + 1 = 3), so it doesn’t factor nicely. Use a table of h(x)=x3−3x+1h(x) = x^3 - 3x + 1 to find sign changes:

xx−2-2−1-1001122
h(x)h(x)−1-13311−1-133

There are sign changes in (−2,−1)(-2, -1), (0,1)(0, 1) and (1,2)(1, 2): three solutions, the most a cubic can have. Narrowing in:

  • h(−1.885)≈−0.043h(-1.885) \approx -0.043 and h(−1.875)≈0.033h(-1.875) \approx 0.033, so x≈−1.88x \approx -1.88.
  • h(0.345)≈0.006h(0.345) \approx 0.006 and h(0.355)≈−0.020h(0.355) \approx -0.020, so x≈0.35x \approx 0.35.
  • h(1.525)≈−0.028h(1.525) \approx -0.028 and h(1.535)≈0.012h(1.535) \approx 0.012, so x≈1.53x \approx 1.53.

5. (Core) Solve 3x>x+23^x \gt x + 2. Give boundary values to 2 decimal places where needed.

Solution

Solve 3x=x+23^x = x + 2 first. x=1x = 1 is exact: 3=33 = 3. A line meets an exponential at most twice; let h(x)=3x−x−2h(x) = 3^x - x - 2. h(−2)≈0.111>0h(-2) \approx 0.111 \gt 0 and h(0)=−1<0h(0) = -1 \lt 0, so there’s another crossing between −2-2 and 00. Narrowing in: h(−1.875)≈0.0025h(-1.875) \approx 0.0025 and h(−1.865)≈−0.0061h(-1.865) \approx -0.0061, so it’s at x≈−1.87x \approx -1.87.

Test each interval:

  • x=−2x = -2: h>0h \gt 0, so 3x>x+23^x \gt x + 2. ✓
  • x=0x = 0: h=−1<0h = -1 \lt 0. ✗
  • x=2x = 2: h=9−4=5>0h = 9 - 4 = 5 \gt 0. ✓

The solution is approximately x<−1.87x \lt -1.87 or x>1x \gt 1.

6. (Core) Solve log⁡x=2−x\log x = 2 - x. Give the answer to 2 decimal places.

Solution

log⁡x\log x is increasing and 2−x2 - x is decreasing, so there’s at most one solution, and the domain needs x>0x \gt 0. Let h(x)=log⁡x+x−2h(x) = \log x + x - 2.

h(1)=0+1−2=−1h(1) = 0 + 1 - 2 = -1 and h(2)=log⁡2≈0.301h(2) = \log 2 \approx 0.301: a sign change. Narrowing in:

xx1.71.71.81.81.751.751.761.761.7551.7551.7651.765
h(x)h(x)−0.070-0.0700.0550.055−0.007-0.0070.0060.006−0.0007-0.00070.0120.012

The sign changes between 1.7551.755 and 1.7651.765, so x≈1.76x \approx 1.76.

7. (Core) A town has 15 00015\,000 people and grows by 3%3\% a year. Its water system can serve 18 000+150t18\,000 + 150t people after tt years, as it’s gradually upgraded. After how many years will the population exceed the system’s capacity? Answer to 2 decimal places.

Solution

Solve 15 000(1.03)t=18 000+150t15\,000(1.03)^t = 18\,000 + 150t. Let h(t)=15 000(1.03)t−18 000−150th(t) = 15\,000(1.03)^t - 18\,000 - 150t.

tt5510108899
h(t)h(t)−1361-1361659659−198-198222222

Narrowing in between 88 and 99: h(8.47)≈−3.1h(8.47) \approx -3.1 and h(8.48)≈1.1h(8.48) \approx 1.1. Checking the rounding interval: h(8.475)≈−1.0h(8.475) \approx -1.0 and h(8.485)≈3.2h(8.485) \approx 3.2, so t≈8.48t \approx 8.48.

The population exceeds the system’s capacity after about 8.488.48 years, that is, during the ninth year.

8. (Challenge) Solve cos⁡x≥x2\cos x \ge x^2, with xx in radians. Give the boundary values to 2 decimal places.

Solution

Both sides are even functions, so the graph is symmetric about the yy-axis. At x=0x = 0, cos⁡0=1>0\cos 0 = 1 \gt 0. As xx moves away from 00, cos⁡x\cos x decreases and x2x^2 increases, and for ∣x∣≥1\lvert x \rvert \ge 1, x2≥1≥cos⁡xx^2 \ge 1 \ge \cos x (with equality impossible, since cos⁡1<1\cos 1 \lt 1). So there’s exactly one crossing with 0<x<10 \lt x \lt 1 and its mirror image.

Let h(x)=cos⁡x−x2h(x) = \cos x - x^2. h(0.815)≈0.0216h(0.815) \approx 0.0216 and h(0.825)≈−0.0021h(0.825) \approx -0.0021, so the crossing is at x≈0.82x \approx 0.82, and by symmetry at x≈−0.82x \approx -0.82.

Since h(0)=1>0h(0) = 1 \gt 0, the inequality holds between the crossings:

−0.82≤x≤0.82(approximately)-0.82 \le x \le 0.82 \quad (\text{approximately})

9. (Challenge) Find all solutions of x=2sin⁡xx = 2\sin x, with xx in radians, to 2 decimal places.

Solution

2sin⁡x2\sin x is between −2-2 and 22, so any solution has −2≤x≤2-2 \le x \le 2. x=0x = 0 is a solution. Both sides are odd, so solutions come in pairs ±x\pm x.

For x>0x \gt 0, let h(x)=x−2sin⁡xh(x) = x - 2\sin x. Near 00, 2sin⁡x2\sin x rises faster than xx (for example, h(1)=1−2sin⁡1≈−0.68h(1) = 1 - 2\sin 1 \approx -0.68), but h(2)=2−2sin⁡2≈0.18h(2) = 2 - 2\sin 2 \approx 0.18. So there’s a crossing between 11 and 22.

xx1.81.81.91.91.8951.8951.9051.905
h(x)h(x)−0.148-0.1480.0070.007−0.0008-0.00080.0160.016

The sign changes between 1.8951.895 and 1.9051.905, so x≈1.90x \approx 1.90.

The solutions are x=0x = 0 and x≈±1.90x \approx \pm 1.90.