# Section 3.4: Iterative Solution of Several Algebraic Equations using Single Equation Methods

This is intended to be an informal introduction to material which is formally introduced in section 3.5. If you understand what this section is about, then all that the further treatment will really add is some terminology and notation.

The iterative methods which have been described for single nonlinear equations cannot easily be extended to handle problems where it is necessary to iterate on several variables at once, although such methods are available.

However, as we have seen, we can have sets of equations which can be solved directly by rearrangement and reordering without any iteration. It should thus be clear that we would expect to find sets of several equations where iteration is required, but only in a single unknown.

Here are two cases where this is obvious, and a solution method can easily be devised.

### Example 1

x + log (x) = 0

y = x²

Clearly an iterative solution in the single variable serves to determine x. y is then calculated from the second equation which is already written appropriately.

We can refer to the second equation as the `tail' of the equation set.

### Example 2

y² = 4
x + log (x) + y= 0

The first equation involves only y and so can be solved. once y is known the second equation contains only x, although it must be solved iteratively.

We could call the first equation the `head' of the equation set.

## Iterative Solution of `Quasi-single' Equations

The above cases are trivial and obvious. The following is slightly less obvious, although it has already been used as an example.

1 - (p1 + p2) = 0
where p1 = exp(11(1-300/x))
and p2 = exp(11(1-250/x))

This is really a set of 3 equations in 3 unknowns, no one of which, as written, may be solved on its own for any single variable.

However, it is obvious that by simple substitution we can arrive at one equation in x, namely:

1 - ( exp(11(1-300/x)) + exp(11(1-250/x)) ) = 0

Once x is determined iteratively then the second and third equations, which form a `tail', may be used to determine p1 and p2 directly.

When a numerical solution is to be determined there are two ways of setting the problem out. One is essentially as above, but the other avoids any algebraic substitution with the attendant risk of errors. In each case we show the Fortran instructions necessary to evaluate both the l.h.s. of equation to be solved iteratively, i.e.
1 - (p1 + p2)

and the `tail variables' p1 and p2.

```f = 1.0 - (exp(11.0*(1.0-300.0/x) + exp(11.0*(1.0-250.0/x))
! This evaluates the function
! when it is zero x will be correct, and so will...
p1 = exp(11.0*(1.0-300.0/x))
p2 = exp(11.0*(1.0-250.0/x))
```

### Method 2: good

```! At the current x evaluate:
p1 = exp(11.0*(1.0-300.0/x))
p2 = exp(11.0*(1.0-250.0/x))
! and hence ..
f = 1.0 - (p1 + p2)
```
The overall effect in each case is exactly the same. But this second method avoids more algebra.

We call a group of equations requiring iterative solution in this way a `partition' of the set of equations.