Lesson Eighteen – Commanding to Solve Equations

By now you may be able to solve equations with one or two variables. In this section, we are going to explore the steps involved in writing commands to solve equations. This skill is useful for programming a computer to display a web site properly or controlling a robot.

Example 1

Solve for x: x + 7 = 10

Commands
Step 1: Write the equation → x + 7 = 10
Step 2: Undo addition → x + 7 – 7 = 10 – 7
Step 3: Do the arithmetic → x = 3
Step 4: Underline the answer → x = 3

Example 2

Solve for x: ¼x = 17

Step 1: Write the given equation → ¼ • x = 17
*To do the problem without a fraction, convert the fraction into a decimal by commanding the computer to “do the arithmetic arithmetic.”
Step 2: Do the arithmetic → 0.25
Step 3: Undo the multiplication → 0.25x = 17
                                                       0.25 = 0.25
Step 4: Do the arithmetic → x = 68
Step 5: Underline the answer → x = 68

An algorithm means solve the equation

Steps to using an algorithm to solve an equation

Step 1: Write the given
Step 2: Do the first instruction that applies
-Do the arithmetic
-Undo the addition
-Undo the subtraction
-Undo the multiplication
-Undo the division
Step 3: Keep on doing this until there is nothing to do
Step 4: Underline the answer

This method is usually successful. The reason we use the phrase “Undo the addition” instead of “add this number” is because if you use “add” you must specify a number, and sometimes this number can be very long. It is better not to type the number and instead use “undo the addition.”