Bisection failure
I am going to show the failure of bisection method. I have chosen a non-trivial equation y=10(x–1.32)(x–1.98)(x–1.55)+0.1.And the graph shows:
We can see these three roots are very close together. They are all in the interval [1, 2].By using the Excel:
This is a bisection failure. As the graph shows, we can't solve the other roots. We can only find one root, so the failure exists.
Newton-Raphson Method:
First of all, I am trying to estimate the root, and I start to work with tangents to find a more accurate estimation. We have to continue this method until the root is found to more than 5 decimal places. To be safe, it is necessary to evaluate f(x) at both these points and show that one value is positive and the other is negative (sign change).
The equation f(x) =0 is solved using the iteration:
I have chosen an equation y=4x³-x²-12x+2 which is a non-trivial equation and I am going to use Newton-Raphson method to solve it. By using the Autograph, see blow:
We can see the roots are in the intervals [-2,-1], [0, 1] and [1, 2].
I am going to show one root graphically which lies between [-2,-1]. Afterwards, I will combine my equation with
Now I am using the Excel to help me solve it accurately.
In this spreadsheet, Xr = estimated value Xr. f'(Xr) =the value after differentiated f (Xr)
By using the Excel, we can easily find the x value in the many terms satisfy my required degree of accuracy which is answer to 7 decimal places.
Root is -1.694532 to 6d.p.
Error bounds is -1.69453±0.000005.
Root bounds is -1.694535<x<-1.694525.
Check X Y
-1.694535 -0.00011128 (negative)
-1.694525 0.000147178 (positive)
Therefore, my answer is correct and it is in the bounds.
Below shows the formulae for using in the Excel:
By using the Excel, I can find the other two roots of the equation y=4x³-x²-12x+2.
This root is in interval [0, 1]
Root is 0.1658951 to 7d.p.
Error bounds are 0.1658951±0.00000005.
Root bounds is 0.16589505<x<0.16589515.
Check X Y
0.16589505 7.34295E-07(positive)
0.16589515 -4.6586E-07 (negative)
This root is in interval [1, 2]
Root is 1.7786356 to 7d.p
Error bounds are 1.7786356±0.00000005.
Root bounds is 1.77863555<x<1.77863565.
Check X Y
1.77863565 1.4965E-06 (positive)
1.77863555 -7.4402E-07 (negative)
Therefore, the roots of this equation are -1.694532 to 6d.p, 0.1658951 to 7d.p and 1.7786356 to 7d.p
Newton-Raphson failure:
I am going to show the failure of Newton-Raphson method. I have chosen a non-trivial equation
y=12x³-7x²-4x-0.2. And the graph shows:
Root is -0.3125502 to 7d.p
Error bounds is -0.3125502±0.00000005
Root bounds is -0.31255025<x<-0.31255015
Check X Y
-0.31255025 -2.3749E-07(negative)
-0.31255015 1.51756E-07(positive)
As the graph shows, it occurs failure. 0.5 is chosen for Xr and it is near the turning point .By using the Newton Raphson Method, I can't get the point I want, but the further one. Therefore, it is failure.
Rearranging equation method:
This method is rearranging the equation f(x) =0 into form x=g(x).Thus y=x and y=g(x) can cross together, and then we can get a single value which can be estimated for the root.
I have chosen an equation y=2x³-3x²-5x-2 which is a non-trivial equation. By using the Autograph, the graph has been shown blow:
The equation y=2x³-3x²-5x-2 can be rearranged to different forms. But it could exist the failure, therefore I have to try. When 0=2x³-3x²-5x-2 rearranged to 5x=2x³-3x²-2, and we can gain y=x and g(x) = (2x³-3x²-2)/5.
And using the Autograph to draw the y=x and y=g(x). See blow:
I am going to combine the graph and the figure I have worked out in Excel. As the figures show blow:
Root is -0.3450082 to 7d.p.
Error bounds is -0.3450082±0.00000005.
Root bounds is -0.34500825<x<-0.34500815.
Check X Y
-0.34500825 -0.345008213
-0.34500815 -0.34500824
X g'(x)
-0.34500825 -0.271173069
-0.34500815 -0.271173032
Below shows the formulae for using in the Excel:
Since the gradient of equation g'(x) <1, X=-0.34500825, g'(x) =-0.271173069, and that is a success example.
Rearranging equation failure:
To show that failure I chose the root in the interval (+1 to +2), and apply the same rearrangement:
g(x) = (2x³-3x²-2)/5.Because I think there are still some cases that this method fails.
By using the Autograph, see blow:
As the graph shows, I started the point 2.And unfortunately, I can’t get the solution. The failure exists.
I am going to combine the graph and the figure I have worked out in Excel. As the figures show blow:
The root found is not correct, as the gradient is greater than 1; therefore, it is impossible to use this method to find the root.
Comparison of methods:
I have finished investigating three methods. In the whole process I found I can solve the non-trivial equation by these three methods properly. And also I am impressed how they work out the roots. However, there are differences in the speed of convergence and the ease of use. Therefore, I am going to compare three methods how they work. Afterwards, I am going to compare the speed of convergence and ease of use with available hardware and software.
I have chosen an equation y=2x³+3x²-5x-2. By using the Autograph, the graph has been shown blow:
From the diagram above, it’s not difficult to see the three roots lie on the intervals which is[-3,-2],[-1,0]and[1,2].
Bisection methods
Root is -0.34501 to 5d.p
Error bounds is -0.34501±0.000005
Root bounds is -0.345015<x<-0.345005
Check X Y
-0.345015 4.3088E-05 (positive)
-0.345005 -2.04707E-05 (negative)
Newton-Raphson methods
Root is -0.34501 to 5d.p
Error bounds is-0.34501±0.000005
Root bounds is -0.345015<x<-0.345005
Check X Y
-0.345015 4.3088E-05 (positive)
-0.345005 -2E-05 (negative)
Rearranging equation methods
Root is -0.3450082 to 7d.p.
Error bounds is -0.3450082±0.00000005.
Root bounds is -0.34500825<x<-0.34500815.
Check X Y
-0.34500825 -0.345008213
-0.34500815 -0.34500824
X g'(x)
-0.34500825 -0.271173069
-0.34500815 -0.271173032
After I used each method to solve the same equation, I found that difference in the speed of convergence.
In bisection method, I have to use 18 iterations.
In Newton-Raphson method, I have to use 4 iterations.
In rearranging equation method, I have to use 15 iterations.
Now we can see the Newton-Raphson method is the fastest and the bisection method is the slowest.
All of the methods require using software, which is autograph and algebraic, spreadsheet to find out the root. And see blow there are two boxes:
In the whole project, using the Excel and Autograph is much more efficient and easier.