Grade by Grade
D. Characteristics of Functions · Combining Functions and Modelling

When Algebra Is Not Enough: Solving Graphically and Numerically

D3.2About 75 minutes
Learning goals
  • I can recognize equations and inequalities that standard algebra cannot solve, such as cos x = x and 2ˣ = x + 3.
  • I can solve such equations graphically, using intersections or the zeros of a difference function.
  • I can solve them numerically to a required accuracy with tables of values and interval halving (bisection).
  • I can solve inequalities graphically by finding intersection points and deciding which graph is above.

Words to know

numerical method
A step-by-step procedure that gets closer and closer to a solution, giving it to any accuracy you need, without a formula.
sign change
When h(a) and h(b) have opposite signs. If h is continuous, it must equal 0 somewhere between a and b.
bisection (interval halving)
A numerical method: check the sign of h at the midpoint of an interval that contains a zero, keep the half where the sign changes, and repeat.
continuous
A function whose graph has no breaks, holes or jumps on an interval, so it can be drawn without lifting the pencil.
solution set of an inequality
All x-values that make the inequality true, often written as intervals.

An equation no formula can solve

Try to solve cos x = x. Rearranging does not help: x is stuck both inside a cosine and outside it. The same happens with 2ˣ = x + 3 (x is an exponent and a plain term) or log x = x − 2. There is no algebraic method in this course (or in any textbook) that gives an exact formula for their solutions.

But engineers, scientists and economists solve equations like these every day, to as many decimal places as they need. They use graphs to see roughly where the solutions are and numerical methods to pin them down. That is what this lesson teaches. (The curriculum calls these equations "not accessible by standard algebraic techniques".)

Method 1: Graphs

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

  • Intersection view: graph y = f(x) and y = g(x). Each intersection gives a solution: its x-coordinate.
  • Zero view: graph the single function h(x) = f(x) − g(x). Each zero of h is a solution. This is the idea from Sums and Differences of Functions: f − g is zero exactly where f and g meet.

A graph also tells you how many solutions there are. For cos x = x: cos x is between −1 and 1, so a solution must have −1 ≤ x ≤ 1, and on that interval the graphs cross only once.

Intersection of y = cos x and y = xZero of h(x) = cos x − x0.511.5−10.51xyx ≈ 0.739y = cos xy = x0.511.5−2−11xyzero at x ≈ 0.739
Left: y = cos x and y = x cross once, near x = 0.739. Right: the same solution is the zero of h(x) = cos x − x.

Method 2: Tables and sign changes

If h is continuous and h(a) and h(b) have opposite signs, then h has a zero between a and b. So build a table of h(x):

  1. Use whole numbers (or a sensible step) to find an interval with a sign change.
  2. Repeat with steps of 0.1 inside that interval, then 0.01, and so on.

Each round gives one more correct decimal place.

Worked example

Example 1: Solve 2ˣ = x + 3 with a table

Find all solutions of 2ˣ = x + 3, correct to two decimal places.

  1. Let h(x) = 2ˣ − x − 3. Whole numbers: h(−3) = 0.125, h(−2) = −0.75, h(2) = −1, h(3) = 2. Sign changes on [−3, −2] and [2, 3]. (The exponential grows faster than the line on the right, and on the left 2ˣ ≈ 0 while x + 3 becomes negative, so there are no other crossings.)
  2. Right root, steps of 0.1: h(2.4) ≈ −0.122 and h(2.5) ≈ 0.157. So 2.4 < x < 2.5.
  3. Steps of 0.01: h(2.44) ≈ −0.014 and h(2.45) ≈ 0.014. So 2.44 < x < 2.45. One more round (h(2.444) < 0 and h(2.445) > 0) shows x ≈ 2.44 to two decimal places (more precisely 2.4449...).
  4. Left root: h(−2.9) ≈ 0.034, h(−2.8) ≈ −0.056; then h(−2.87) ≈ 0.007 and h(−2.86) ≈ −0.002, so x ≈ −2.86 (more precisely −2.8625...).

x ≈ −2.86 or x ≈ 2.44.

Method 3: Bisection (interval halving)

Bisection is a tidy version of the table method that a computer (or a patient human) can repeat forever:

  1. Start with an interval [a, b] where h changes sign.
  2. Find the midpoint m = (a + b)/2 and the sign of h(m).
  3. Keep the half, [a, m] or [m, b], where the sign still changes.
  4. Repeat. Each step halves the interval, so 10 steps shrink it by a factor of 2¹⁰ = 1024.
StepInterval [a, b]Midpoint mh(m) = cos m − mKeep
1[0, 1]0.50.3776 (+)[0.5, 1]
2[0.5, 1]0.75−0.0183 (−)[0.5, 0.75]
3[0.5, 0.75]0.6250.1860 (+)[0.625, 0.75]
4[0.625, 0.75]0.68750.0853 (+)[0.6875, 0.75]
5[0.6875, 0.75]0.718750.0339 (+)[0.71875, 0.75]
6[0.71875, 0.75]0.7343750.0079 (+)[0.734375, 0.75]
7[0.734375, 0.75]0.7421875−0.0052 (−)[0.734375, 0.7421875]
8[0.734375, 0.7421875]0.738281250.0013 (+)[0.73828125, 0.7421875]
Bisection for cos x = x, starting from h(0) = 1 > 0 and h(1) ≈ −0.4597 < 0 (radian mode).
root ≈ 0.739step 1: [0, 1]step 2: [0.5, 1]step 3: [0.5, 0.75]step 4: [0.625, 0.75]step 5: [0.6875, 0.75]step 6: [0.71875, 0.75]step 7: [0.734375, 0.75]step 8: [0.734375, 0.7421875]00.250.50.751
Each bar is the interval kept at that step. The bars halve in length and close in on the root, x ≈ 0.739 (dashed line).
Worked example

Example 2: How accurate is bisection after 8 steps?

After step 8, the root of cos x = x lies in [0.73828125, 0.7421875]. Give the root to two decimal places, and say how many more steps would guarantee three decimal places.

  1. Every number in [0.7383, 0.7422] rounds to 0.74, so x ≈ 0.74 to two decimal places.
  2. The interval length is 1/2⁸ = 1/256 ≈ 0.0039. For three decimal places we want a length below 0.0005 (half of 0.001).
  3. 1/2¹¹ ≈ 0.00049 < 0.0005, so 3 more steps (11 in total) are enough. Continuing gives x ≈ 0.739 (the true value is 0.739085...).

x ≈ 0.74 now; three more steps give x ≈ 0.739.

Radians, always

Equations that mix trigonometric functions with plain x (such as cos x = x or 3 sin x = x) only make sense with x in radians. Set your calculator to radian mode before you build a table.

Solving inequalities graphically

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

  1. Solve f(x) = g(x) (graphically or numerically). These boundary points split the x-axis into intervals.
  2. On each interval, f is either entirely above g or entirely below it (for continuous functions). Check one test point per interval, or read the graph.
  3. Write the solution as intervals. Use open endpoints for > and <, closed endpoints for ≥ and ≤ (when the function is defined there).

In the sibling units Polynomial Functions and Equations and Rational Functions and Equations you did this with factorable polynomials. Now the boundary points may come from a graph or bisection.

Worked example

Example 3: Solve 2ˣ > x²

Solve 2ˣ > x², using the graph in the lesson Comparing the Function Families.

  1. Boundary points: 2ˣ = x² at x = 2 and x = 4 exactly (2² = 4 and 2⁴ = 16 = 4²), and at one negative value. A table of h(x) = 2ˣ − x² gives h(−1) = −0.5 and h(0) = 1; bisection then gives x ≈ −0.767.
  2. Test points: x = −1: 0.5 > 1? No. x = 0: 1 > 0? Yes. x = 3: 8 > 9? No. x = 5: 32 > 25? Yes.
  3. So 2ˣ is above x² on −0.767 < x < 2 and on x > 4.

−0.767 < x < 2 or x > 4 (approximately, at the left end).

Worked example

Example 4: When will demand outgrow capacity?

A growing city's daily water demand is D(t) = 500(1.04)ᵗ megalitres (ML), t years from now. Planned upgrades raise the treatment capacity to C(t) = 800 + 30t ML/day. When will demand exceed capacity?

  1. Solve D(t) > C(t), that is 500(1.04)ᵗ > 800 + 30t. This mixes an exponential and a linear term, so use a table.
  2. t = 30: D ≈ 1622, C = 1700 (D < C). t = 35: D ≈ 1973, C = 1850 (D > C). So the crossing is between 30 and 35.
  3. Refine: t = 32: D ≈ 1754, C = 1760 (D < C). t = 33: D ≈ 1824, C = 1790 (D > C). So 32 < t < 33; bisection gives t ≈ 32.2.
  4. At t = 0, D = 500 < 800, and after the crossing the exponential stays ahead, so the solution is t > 32.2.

Demand exceeds capacity after about 32.2 years; the city should plan a bigger upgrade before then.

1020304050100020003000t ≈ 32.2demand D(t)capacity C(t)D(t) = 500(1.04)ᵗC(t) = 800 + 30tShaded: D(t) > C(t),so the solution ofD(t) > C(t) is t > 32.2.ML/dayt (years)
Exponential demand (solid) starts below the linear capacity (dashed) but overtakes it at t ≈ 32.2 years. The shaded region is the solution of D(t) > C(t).
Just for fun

Funny but true: put a calculator in radian mode, type any number, and press cos over and over. The display settles on 0.7390851..., the solution of cos x = x. Some mathematicians call it the Dottie number. It is a numerical method you can do with one finger.

Hands-on activity

Bisection by hand (and by button)

You need: a scientific calculator in radian mode, paper and a pencil.

  1. Warm-up game: a family member thinks of a whole number from 1 to 1000. You guess the middle, they say "higher" or "lower", and you always guess the middle of what is left. How many guesses do you need at most? (This is bisection.)
  2. Solve 3 sin x = x for x > 0. Let h(x) = 3 sin x − x. Check that h(2) > 0 and h(3) < 0.
  3. Do 7 steps of bisection on [2, 3] in a table like the one in this lesson. Give the root to two decimal places.
  4. The Dottie button: type 1, then press cos about 40 times. Write down what the display settles on. Try starting from 5 instead.

What to look for: the guessing game needs at most 10 guesses, because 2¹⁰ = 1024 > 1000. For 3 sin x = x: h(2) ≈ 0.728 and h(3) ≈ −2.577; after 7 steps the interval is about [2.273, 2.281], so the root is about 2.28 (more precisely 2.2789). The cos button settles on 0.739085... from any start, because it is closing in on the solution of cos x = x.

Your turn

1

Explain why x² = 2ˣ cannot be solved by the algebra you know, and how many solutions it has.

2

Let h(x) = x³ + x − 5. Show that h has a zero between 1 and 2, and find it to one decimal place using a table.

3

Solve log x = x − 2 graphically. How many solutions are there?

4

Do two steps of bisection for cos x = x starting from [0.7, 0.8].

5

Solve sin x > x/2 for x > 0, given that sin x = x/2 at x ≈ 1.895.

6

How many bisection steps starting from an interval of length 1 guarantee an interval shorter than 0.001?

More practice: warm-up

1

Is cos x = x solvable by standard algebra?

2

h(1) = −4 and h(2) = 3, and h is continuous. What can you conclude?

3

What is the midpoint of [2, 3]?

4

To solve f(x) = g(x) graphically, which coordinate of the intersection do you read?

5

f is above g on 1 < x < 4. What is the solution of f(x) > g(x) there?

More practice: on your own

1

Find the positive solution of 2ˣ = 3x to one decimal place.

2

Use the graph idea to explain why 2ˣ = −x has exactly one solution, and find which whole numbers it is between.

3

Solve 3 sin x ≥ x for x ≥ 0, given 3 sin x = x at x ≈ 2.279 (and at x = 0).

4

Solve 2ˣ < x + 3, using Example 1.

5

In Example 4, the city builds faster: C(t) = 800 + 40t. Will demand still overtake capacity? Estimate when.

Challenge

1

Show that x⁵ + x = 1 has exactly one real solution, and find it to two decimal places.

2

For which values of k does the equation 2ˣ = kx have no positive solution? Investigate with graphs for k = 1, 2, 3.

3

Bisection always works on [a, b] if h(a) and h(b) have opposite signs and h is continuous. Explain why it can fail for h(x) = 1/x on [−1, 1].

Check your understanding

Quiz

1.

Which equation cannot be solved with the standard algebra of this course?

2.

h(2) = 0.6 and h(3) = −1.2, and h is continuous. After one bisection step, h(2.5) = −0.3. Which interval contains a zero?

3.

The graphs of f and g cross at x = −1 and x = 3, and f(0) > g(0). What is the solution of f(x) > g(x) between the crossing points?

4.

Bisection starts on an interval of length 1. What is the length after 5 steps?

5.

What is the solution of cos x = x (x in radians), to three decimal places?

6.

Using the graphs of y = 2ˣ and y = x² (lesson Comparing the Function Families), how many solutions does 2ˣ = x² have?

For parents and teachers

Big idea: D3.2 asks students to solve equations and inequalities graphically and numerically when standard algebra cannot reach the solutions. Graphs show how many solutions exist and roughly where; tables, sign changes and bisection give any accuracy you need. Graphing technology (a graphing calculator's intersect feature, or a free online grapher) is normal here, but every answer can be reached with a scientific calculator.

How to help: play the higher-or-lower number game to show why halving works. Ask your teen to estimate before calculating, and to check the final answer by substituting it back in.

Common difficulties:

  • Using degree mode for equations with trigonometric functions and x.
  • Reading the y-coordinate of an intersection instead of the x-coordinate.
  • Missing a solution because the graph window was too small (2ˣ = x² has a negative solution).
  • Assuming a sign change means a zero when the function has an asymptote.

The guessing game in the activity is a good family warm-up for this lesson.