Activity 7

Mathematica doesn't allow operations on equations as illustrated in the book.

(a == b) - c

One can map a function over an equation.  In this case we use the function that subtracts c from anything. That's a bit cumbersome, however.

Map[# - c &, a == b]

A somewhat simpler approach is to use Thread:

Thread[c + (a == b), Equal]

Thread[-8 
          x + (5 x  -  2 (x  -  7)  ==  
            8 (x  +  2)  -  17), Equal]

Simplification by expansion isn't automatic.  We use the percentage sign, %, which represents the previous output to simplify the process.

Simplify[%]

Thread[(1/5)*%, Equal]

Thread[3 + %, Equal]

Alternate Mathematica Versions

Here is an alternative sequence of steps prepared by Sherry Nolan and Christian Djacheci, UMass Lowell.

Step One, simplify each side of the equation using a CAS

ExpandAll[
      5 x  -  2 (x  -  7)  ==  
        8 (x  +  2)  -  17]

Step Two, subtract 8x from both sides and simplify using a CAS ( I was unable to find a way to do this with the CAS in one step).

Simplify[14  +  3 x  -  8  x]

Simplify[(-1  +  8 x)  -  8 x]

So, 14  -  5  x  =  -1.
Step Three, subtract fourteen from both sides and simplify

Simplify[(14  -  5  x)  -  14]

Simplify[(-1)  -  14]

So, -5 x  =  -15.
Step Four, use previous sides of equation to solve

Solve[-5 x  ==  -15, x]

Step Five, Check Answer

(5 x  -  2 (x  -  7)  ==  
          8 (x  +  2)  -  17 ) /.  x -> 3

So 5 x  -  2 (x  -  7)  ==  
        8 (x  +  2) -  17 when x  =  3.

Comments/Extensions

This entire process can also be done in one step by using one of the following commands:

Solve[
      5 x  -  2 (x  -  7)  ==  
        8 (x  +  2) -  17]

Reduce[
      5 x  -  2 (x  -  7)  ==  
        8 (x  +  2) -  17]

This can also be done skipping some steps by using the following commands:

Simplify[
      5 x  -  2 (x  -  7)  ==  
        8 (x  +  2) -  17]

Reduce[5 (-3  +  x) == 0]

This activity was an example of using the CAS to solve for a single variable after simplifying an equation. Many students are able to solve equations once they are put into a form with the single variable on one side and a zero on the other side of the equality. Most of the mistakes that students make come from simplifying the equations and collecting like terms.   This activity was good in that the first step showed how to use a CAS to expand and collect on each side of the equation and check their work, without having the CAS solve the whole equation for them.   The students, once they get this far, can step by step solve for the unknown variable and check their work against the CAS.