These show that there are three roots. One between x=-2 and x=-1, one between x=1 and x=2 and another one between x=2 and x=3.
To find the root I need to work out the iterative formula for the Newton Raphson. This is:
Therefore
To find the root between x=-1 and x=-2 I will use a =-1 as this is close to the solution and should find the right root. Here is the table showing how the iterative formula has been used:
This process of Newton Raphson is also shown on the graph below:
As the iterative formula is repeating at this level the root must be close so the error bounds are likely to be between x=-1.65115 and x=-1.65105 but this must be justified by showing that there is a change of sign between the two. When x=-1.65115 y=-0.00067 and when x=-1.65105 y=0.00051. As there is a change of sign between the two there must be a root there. Therefore:
x=-1.6511(5s.f.)
-1.65115<x<-1.65105
Now I will find the other two roots of the equation. I will firstly find the root between x=1 and x=2 and I will use x0=1 as this is close to the root and is most likely to find that root.
When x=1.27388 y=0.000034 and when x=1.27390 y=-0.000030. There is a change of sign between the two therefore:
x=1.2739 (5s.f.)
1.27388<x<1.27390
Now I will find the root between x=2 and x=3 and I will use x0=3 as this is close to the root and is most likely to find that root.
When x=2.37719 and when. There is a change of sign between the two therefore:
x=2.3772 (5s.f.)
2.37719<x<2.37721
Failure of the Newton Raphson Method
When the gradient of the gradient of a curve is small the Newton Raphson method may give the root of the equation at a point you were not looking for. For example if I was looking for the root of the equation between and . The iterative formula for would be:
A sensibleto take would behowever the result would look like this.
This shows that the Newton Raphson method has failed to find the required root between x=0 and x=1 but the root at x=-1.4142 therefore it is a failure.
Rearranging f(x)=0 in the form x=g(x)
To show how this method works, I will show how this method can be used to find all of the roots of the equation x³-3x²-4x+7=0. Firstly I will require values for x0 and I also need to know how many roots I am looking for. This can be done with an integer search and a graph of y=x³-3x²-4x+7.
These show that there is a root between x=-2 and x=-1 another root between x=1 and x=2 and another root between x=3 and x=4. This is shown on the graph where it crosses the x-axis and when a change of sign occurs in the integer search.
Now I must make a rearrangement of the formula to get x=g(x) and then produce an iterative formula:
0=x³-3x²-4x+7
4x=x³-3x²+7
x=(x³-3x²+7)/4
xn+1=(xn³-3xn²+7)/4
For this method to work g’(x)<|1| at the root otherwise this method will fail to find the required root and another iterative formula will be required. To explain why a root was found I will find the g’(x) at the root. The formula for the gradient is:
g’(x)=(3x2-6x)/4
The iterative formula can now be used to hopefully find some of the roots of the equation. To find the root between x=1 and x=2 I will use a starting value of x0=1.
The method of x=g(x) is shown in this graph below:
As there is a repetition x=1.14332 must be very close to the root of the equation and it is justified to say that
x=1.1433 (5s.f.)
g’(1.1433)=-0.735
As g’(x)<|1| this method finds the roots. However for this reason
g(x)= (x³-3x²+7)/4 will not find the other roots. The gradient of this curve is g’(x)=(3x2-6x)/4. For the root between x=-2 and x=-1 I will take a rough estimate for the root that x ≈-1.5 and the gradient of the curve at this point is g’(-1.5)=3.9375 which is greater that 1 and is therefore unlikely to give a value for the root. For the root between x=3 and x=4 the gradient roughly equals g’(3.5)=3.9375 which is again greater than 1 and is not likely to find a root.
I will now look to another iterative formula to find the other roots. Here is my rearrangement of f(x) to form g(x)=x and the iterative formula:
Using this iterative formula I will hopefully find the root between x=-1 and x=-2 using x0=-1 as my starting value:
As there is repetition at x=-1.71448 it is justified to say there is a root at:
x=-1.7145 (5s.f.)
g’(x)=-0.713
g’(x)<|x| which explains why this method has found this root. I will now use the iterative formula to hopefully find the root between x=3 and x=4 using x0=3 as my starting value:
As there is repetition at x=3.57120 it is justified to say there is a root at:
x=3.5712 (5s.f.)
g’(x)=0.665
As g’(x)<|x| this explains why this method has found this root.
Failure of the x=g(x) method
There are many iterations that will not find all of the roots and when following this process will find the wrong root or will keep getting increasingly away from the root. Using the iteration below cannot find the root between x=3 and x=4:
If I use x0=3 the iteration finds the root between x=1 and x=2 as this table shows it is tending towards. I will also use the positive value for this iteration as the root I am looking for is above zero.
This process is shown in this graph:
The reason the root is not found is because the gradient of the curve is steeper than y=x so the iteration diverges. The gradient can be shown to be greater than one with calculus as well:
As g’(x) is greater than 1 this iteration cannot be used to find the root between x=3 and x=4 and therefore is a failure of the method.
Comparison of methods
To compare these methods I will use the equation I used for my g(x)=x method, 0=x³-3x²-4x+7 and try and find the root between x=1 and x=2 to 5 significant figures.
Change of Sign Method
Here is the process of change of sign used to find the root between x=1 and x=2:
Therefore change of sign method gives the answer:
x=1.1433 (5s.f.)
Newton Raphson Method
Here is the Process of Newton Raphson, showing the iterative formula and the table of values.
x0=1
As x=1.4328 is repeating this answer is close to the actual value and it is justified to say that:
x=1.1433 (5s.f.)
Comparison
These methods have all given the same answer and can now be compared in the speed it took for each method to find the root of the equation to the same degree of accuracy. This can be done by totalling the number of iterations required to get the answer.
Change of Sign Method - 27 iterations
Newton Raphson Method - 3 iterations
x=g(x) Method - 36 iterations
It is clear that the Newton Raphson method found the answer very fast, 9 times faster than the change of sign method. Although this is a good indicator of which method was the better ease of use must also be considered.
The change of sign method was very simple and reliable to give an accurate result and was least likely to fail. This method was very easy to use with a spreadsheet and graphing software. This method could also be done easily with a graphical calculator as tables can be produced.
The Newton Raphson method was again fairly easy to perform and also gave reliable results although an accuracy check was required to ensure the root had been found but the method was not likely to fail. It was again also very easy to use with a spreadsheet program and graphing software although some time would have been spent in deriving the iterative formula. This method is slightly harder to perform with a graphical calculator as an iterative formula would need to be input, however this method is very fast.
The rearrangement to x=g(x) method was again easy to perform and gave reliable results although again an accuracy check would be required. However this method fails many times and more than one iterative formula was required to find all the roots of the equation. After calculating an iterative formula this method was again easy to perform with a spreadsheet program and graphing software. This method is similarly easy as the Newton raphson method however is more likely to take more iterations.
In conclusion this investigation has shown that the Newton Raphson method of solving equations has shown to be the better of the three methods. This is due to its speed, ease to use and likelihood not to fail.