Systematic search for a change of sign - pure maths

Authors Avatar

Pure 2 Coursework                Saqub Malik

Pure 2 Coursework

Task I) Systematic search for a change of sign.

We are looking for solutions to f (x)=0, i.e. where the curve crosses the x-axis. The first thing to do is to draw a graph. For this method, initial boundary values are needed, and a graph is a good way to do this, and to check that the particular equation can be solved using this method.

It is convenient if the boundary values c & d are a whole unit apart e.g. 2 and 3.It will be noted that c and d have opposite signs, in this example c is -ve and d +ve. Now, you have to calculate f (x) for x, which is incremented in steps of 0.1 from c to d. The resulting table might look like this:

We now know that the root we are looking for lies between: c+0.6 and c+0.7
because this is where there is a change of sign and the graph obviously crosses the x-axis. Also note that you only need to calculate values until there is a change of sign, one need not go further. These are the limits for the root, which must lie between them. We can find the next decimal value of the root by repeating this method using an interval of 0.01 . Once further bounds are found you can repeat the decimal search using an interval of 0.001 and so on to the required accuracy.

I am going to use this method to solve the following equation, finding all roots to 3 decimal places:

y = f(x) = .2x^5 - 2x^4 + 5x^3 + 2

We know from the graph that there (conveniently) is only one root, and it is between -1 and 0. Therefore, I calculate values of f(x) for x = -1, -0.9, -0.8,...,-0.1,0 until I find a change of sign.

I have stopped at -0.6 because there was a change of sign. I know the root is between –

0.7 and -0.6 I will calculate values between these two:

And continuing to find the 3rd decimal value of the root (between -0.68 and -0.67):

This shows us that the root lies between -0.677 and -0.676. We can therefore say that the root is -0.6765 +/- 0.0005.

Error bounds

This method has the advantage that it automatically provides bounds within which a root lies, so the error is known. From the example above, I found the solution to be between -0.677 and -0.676, and these are its error bounds, which allowed me to quote the answer as -0.6765 +/- 0.0005, 0.0005 being half the interval between the error bounds.

Possible Causes of Failure

Join now!

There are several reasons why this method can fail. If the curve touches the x-axis or is discontinuous, then it will fail.

Example of a curve touching the x-axis:

e.g.: y = f(x) = x^3 - 2x^2 - x +2.63

This actually has three solutions, but the change of Sign method will only detect one because between 2 and 3 all values of f(x) at 0.1 intervals are positive and there is no change in sign, as only a very small part of it dips below the x-axis.

Example of a discontinuous ...

This is a preview of the whole essay