• # Revision:OCR Core 3 - Solving equations numerically

TSR Wiki > Study Help > Subjects and Revision > Revision Notes > Mathematics > Revision:OCR Core 3 - Solving equations numerically

## 8. Solving equations numerically

### Some basic principles

Solving linear equations is generally easy, and quadratic equations are also easy to solve using either the formula, or some factorisation method, however there are many equations for which at A-Level there is no clear method to solving them exactly. Cubic equations that do not factorise can be solved using an equation (like the quadratic equation formula [but more complicated]) however this is inconvenient, and in the case of equations whose solutions are for some practical purpose, there is less need for exact answers (approximations can suffice).

A single value for which an equation is true is called a root of an equation, and the set of all roots of a given equation is the solution.

Consider that a graph of has all the necessary information to solve equations in the form of , as a line can be drawn at , and the intersections of this line with the graph with be the roots.

Many equations are in (or can be rearranged into) the form , and therefore the line for which the intersections with the curve represent the solution of the equation is which is the x-axis. This leads to a useful rule called the sign-change rule.

Consider such that f(a) and f(b) have opposite signs. This implies that there must be at least one intersection with the x-axis between these two values, as the graph (if it is a continuous function) must pass through the axis at least once in order to go from positive y-value to negative y-value, or the other way around.

### Decimal search

The sign-change rule is very helpful in finding roots to equations in the sense that it will allow for certain deductions to be made.

Suppose values of "a", and "b" have been found such that:

, and .

This implies that there is at least a single value between "a", and "b" for which the equation is true.

Now it is possible to refine this value (through a process of trial and error).

It is possible to use a linear interpolation method to make a sensible first estimate when two numbers (integers in many cases) have been found.

Consider the case that , and .

Consider a line that joins these two, and where it would cross the axis (approximately).

(Where "y" is the intersection of the line with the axis [not the curve]).

This method can be used to find a good starting point within the found range for the value.

This process can be repeated (with or without the linear interpolation method) to achieve the desired level of accuracy.

Note that if the question calls for 3 decimal places of accuracy, the idea is to find a root of the equation that is 4 decimal places, (the fourth decimal digit being a five) in order to ascertain whether the root is higher (the same as), or lower; and therefore which way to round it.

It is helpful to adapt an equation into the form where it is necessary, as otherwise the sign-change rule would need to be adapted.

### Finding roots by iteration

Some sequences will diverge, and others will converge to a limit.

If a recursive definition of a sequence can be made such that:

, then a series of iterations can lead to a limit (to a certain degree of accuracy) if the sequence converges.

One missing element is the starting number, however, considering a graph of the function can enable a candidate to make an informed decision as to where to start.

The idea behind this method is that applying the function to the ever more accurate vales for "x" will produce ever more accurate results, as where "l" is the limit (and therefore the solution).

Accurate use of a calculator is vital for this method, and generally using any memory function possessed by the calculator is vital for success.

### Iterations which go wrong

Sometimes an expression can be rearranged in several ways into the form .

Some of these rearrangements will no converge to a limit (it should be somewhat obvious that this is happening).

Some recursive definitions involving the exponential function may need to be rearranged in order to make them converge.

The general rule is simply to try rearrangements and see which one will converge.

### Choosing convergent iterations

The convergence of the expression is governed by the modulus of the gradient of the line at a given intersection with the line .

The smaller the modulus of the gradient at this point, the quicker it will converge, and if the modulus of the gradient is above 1 there will be no convergence.

The different arrangements of the expressions are inverse functions, and are therefore reflections in the line . This is helpful as if one expression does not converge, then the other will.

It is often useful to consider the gradient of the curve at the desired root (intersection with the line ) as this enables the candidate to choose whether to use the original expression or the inverse of the expression (before embarking upon the lengthy process of the iterations).