# Locating Roots

Recall that locating roots of a curve means to find the -coordinates of the points at which the curve crosses the -axis. To do this analytically means to do it by solving equations using algebra. We know how to find roots analytically for some functions, like quadratics, for example. That is, by solving for . We can also do it for some cubics and some trigonometric equations etc. However, there are many equations where we cannot find roots analytically and we must do it numerically. This is where we make ‘guesses’ for the roots and improve them successively via some calculation. This is sometimes known as iteration.

### Change of Sign

We can make a first guess at a root of the equation (where cannot be solved analytically) if we see a change in sign of between two given -values. For example, consider the graph of – we cannot find the roots analytically. We can see from the graph that and (using radians). It follows that since and , the curve has a root between and . Similarly, and , the curve has a root between and . See Example 1 for successive interval narrowing to get an approximation to the root.

This curve also illustrates some situations to be aware of.  Note that and and there is no root between and . However, and and there are two roots. Hence, it is possible that if the curve has the same sign at two points, there could be no roots or an even number of roots. There are 4 roots between and , two -values where the curve is negative. Similarly, and and there is one root between and . Whereas, and and there are three roots between and . Hence, it is possible if the curve has different signs at two points, there could be an odd number of roots in between.

These examples illustrate the importance of choosing intervals sufficiently small to indicate the presence of a single root. The final situation to be aware of is the case where a curve has different signs at two points and has no roots in between. This can happen if the curve is not continuous – see some discontinuous curves. In these cases, a change of sign may be due to an asymptote rather than a root.

To summarise: if the function is continuous on a sufficiently small interval , and and have opposite signs, then has a root on the interval .

## Iteration – Recursive Formula

An alternative way to find roots is to rewrite the equation in the form . Finding the root that satisfies is then the same as finding the that satisfies the equation . On a graph, this is the point where the curve of crosses the straight line . By setting up the recursive formula , the solution can be found iteratively. This means that we choose and by setting , this formula says that . So, our next guess for the root is . Similarly, the next guess is , found by setting and evaluating . Recursively, and are our next guesses for the root and so on. By choosing a value for well, this formula may converge to a root in one of two ways.

This is an example of a staircase diagram. We put the first choice of into to find . This is our next choice to put in to so we go along horizontally to the line so we can put this value in. We move vertically up to find and so on, converging to the solution of , that is the original root, iteratively.

This is an example of a cobweb diagram. As before, we move vertically to find values and horizontally to find the new corresponding -values. Due to the shape of the curve, the convergence occurs by going around the solution creating a cobweb-like effect as opposed to the staircase effect seen in the other diagram.

In the above diagrams, the choice of does not affect the convergence. That is, all choices of result in staircase/cobweb convergence towards the root. This is dependent on the shape of the curve when compared with the straight line, however.  The diagrams below show how the curve and the choice of can result in staircase/cobweb divergence.

Note that there may be several choices for rewriting in the form when finding the recursive formula . The choice of , as well as the choice of , may affect the convergence of the iteration. See Example 2. Even when the sequence converges, the location of the root needs to be justified – see Example 2 for this too.

## Locating Roots using the Newton-Raphson Method

The Newton-Raphson method is also an iterative procedure for locating roots. To solve , Newton-Raphson uses a specific recursive formula:

Notice the difference between this formula, that uses the derivative , as opposed to any in the iterations above. We revert to looking for the actual root as opposed to the intersection between two curves. To do this, the Newton-Raphson method works using tangents – root guesses are updated by finding where successive tangents cross the -axis.

The Newton-Raphson formula is essentially a rearrangement of the formula for a derivative. Consider the tangent at , for example. We find the gradient of the tangent (or derivative of the curve) using rise over run: . We can rearrange this to get . This basically says that we improve the guess for the root by moving backwards by an amount that is the run. If the gradient is rise over run then the run is rise over gradient.  See Example 3 for the use of Newton-Raphson in a modelling example where we locate a stationary point rather than a root.

Since there is division by the derivative, the Newton-Raphson method can fail when the derivative is 0. That is, locating roots near a stationary point. This makes sense when considering that a tangent at a stationary points is flat and doesn’t cross the -axis. We are then unable to use Newton-Raphson to update the root guess. It follows that choosing at a stationary point will result in the method failing. In the case where is small, division by a small number creates a large update to the root guess and convergence can be slow. Hence, the choice of should be made away from any stationary points.

## Examples

Use successive interval narrowing to find the root of that is between and to 2 decimal places. (Make sure you are using radians).

Solution:

We calculate the function at : to 5 decimal places. Then at : to 5 decimal places. Hence, the root is on the interval . We continue by refining the values:

At this point we find that so that we may conclude that the root is to 2 decimal places.

Another choice for successive interval narrowing would be the bisection method.

Consider the function .

1. Show that can be written as .
2. Apply the formula with . Does the sequence diverge/converge to a root? If the sequence converges, is it staircase or cobweb convergent and what is the root, with justification, to 3 decimal places? Experiment with other .
3. Now apply the formula with . Does the sequence diverge/converge to a root? If the sequence converges, is it staircase or cobweb convergent and what is the root, with justification, to 2 decimal places? Experiment with other .

Solution:

1. Firstly, we can write as . It follows that and so .

2. Applying the formula:

We can see that the sequence is stairway converging (it is increasing each time and not spiraling). The root seems to be to 3 decimal places which we can justify using bounds: and . The formula exhibits the same behaviour for all positive â€“ it doesnâ€™t work for negative .

3. Applying the formula:

We can see that the sequence is again stairway converging (it is decreasing each time and not spiraling). However, the root is different and seems to be to 3 decimal places which we can justify using bounds: and . The formula exhibits the same behaviour for all below (or equal to) the root but diverges for above the root.

The shape of a hill can be modelled by the function for .

1. Show that has a stationary point on the interval
2. Perform 3 iterations of the Newton-Raphson method, starting with , to find the stationary point.

Solution:

1. Let (see how to differentiate trigonometric functions). We choose as the derivative because will have a root when has a stationary point. This is because we are looking for when the derivative is 0. Setting gives Now setting gives Since is continuous and changes sign on the interval , it has a root on this interval. It follows that has a stationary point on the interval .

2. The Newton-Raphson formula for this example is

It follows that , , . The method has converged quickly to the fixed point . Hence, the stationary point of the original function is at . Note that the y-coordinate also being 15 is a coincidence.

## Extra Resources

### Questions by Topic

A2NumericalMethodsExamQuestions