# Solving equations by iteration (Investigation)

Lesson

In mathematics we learn methods to solve simple equations such as $2x+4=5$2x+4=5 and more difficult equations such as $x^2+6x+8=0$x2+6x+8=0.  But how can we find the solution for more complex equations such as $x^4-2x=0$x42x=0

### Guess and Check

We could guess the solution for $x$x , substitute it into the equation then evaluate the equation to check if it is a true statement.  If it is not true we will try another value for $x$x.

##### Example:

Solve $x^4-2x=0$x42x=0

 Guess $x$x $=$= $1$1 Check does $1^4-2$14−2 $=$= $0$0 $-1$−1 $=$= $0$0 not true
 Guess $x$x $=$= $2$2 Check does $2^4-2\times2$24−2×2 $=$= $0$0 $16-4$16−4 $=$= $0$0 $12$12 $=$= $0$0

What is the problem with this process and what do we need to consider?  What are suitable values to try for $x$x?

Another possible method could be to write $x$x as a function of $x$x  ,$f$f $x$x .  The equation can be rearranged as follows:  $x=\frac{1}{2}x^4$x=12x4

In this case we can try a value for $x$x, evaluate a new value for$x$x and then check if our new value is close to the old value.

Pick an initial guess for $x$x and call this $x_0$x0  (are there any restrictions for values of $x$x?)

$x_1=\frac{1}{2}x_0^4$x1=12x40 , evaluate for $x_1$x1

Then use $x_1$x1as the next guess for $x$x

$x_2=\frac{1}{2}x_1^4$x2=12x41 , evaluate for $x_2$x2

#### Solution

• Make an initial guess for $x$x
• Evaluate $\frac{1}{2}x_4$12x4  to calculate new value for $x$x
• Repeat until $x_{i+1}-x_i<0.0001$xi+1xi<0.0001
• Stop

#### Solution

We can use an excel spreadsheet to perform these iteration calculations

The spreadsheet table could look like this

 $x_i$xi​ $x_i+1$xi​+1 1 * **
• What cell formula should be written in the yellow cell to calculate our new value for x?
• What cell formula should be written in the red cell to calculate our new value for x?
• Copy the formulas in the red and yellow cells to the cells below by using the drag and fill function
• What does the table look like when the first value for $x$x tried is $1$1?
 $x_i+1$xi​+1 $x_1$x1​ 1 0.5 0.5 0.03125 0.03125 0.0000004768371582

• What does the table look like when the first value for $x$x tried is $10$10?
 $x_i+1$xi​+1 $x_i$xi​ 10 5000 5000 312500000000000 312500000000000 4.76837E+57 4.76837E+57 2.58494E+230

Are the values of x converging (approaching a particular number) or diverging (not approaching a number - getting further from each successive value for $x$x)?  Will the loop in our flowchart /program ever terminate?  This method of solving the equation has not been successful.

• Can the original equation have a different arrangement of the form $x$x =$f$f$\left(x\right)$(x) ?   What is this?

The original equation can be rearranged as follows: $\sqrt[4]{2x_i}$42xi

Change your flowchart for this new formula

Set up a spreadsheet in excel using this new formula and use the process of iteration to calculate successive values of $x$x. Fill in the cells below.

 x $\sqrt[4]{2x_i}$4√2xi​ 1

#### Solution

 x $\sqrt[4]{2x_i}$4√2xi​ 1 1.189207115 1.189207115 1.241857812 1.241857812 1.255380757 1.255380757 1.25878444 1.25878444 1.259636801 1.259636801 1.259849982 1.259849982 1.259903282 1.259903282 1.259916608 1.259916608 1.259919939
• Are the values of $x$x converging or diverging?  This method of solving the equation has been successful.

The solution for $x$x correct to $4$4 decimal places is $1.2599$1.2599

• What happens if we try a different value for the original value of $x$x?  Lets try the value $10$10.

#### Solution

 $x$x $\sqrt[4]{2x_i}$4√2xi​ 10 2.114742527 2.114742527 1.434075029 1.434075029 1.30136903 1.30136903 1.270157613 1.270157613 1.26247243 1.26247243 1.260558411 1.260558411 1.26008036 1.26008036 1.259960876 1.259960876 1.259931006 1.259931006 1.259923539 1.259923539 1.259921672

The solution for $x$x correct to $4$4 decimal places is $1.2599$1.2599