Tested at three significant figures, we can see the change in sign, and thus the root of the equation lies between 0.340 and 0.341. I will test one more time allowing me to round my answer accurate to three decimal places.
The table bellow illustrates far more accurately where our route lies. With the change in sign lying between 0.3406 and 0.3407, using simple rounding, we can conclude that the root I was investigating is at 0.341 to three decimal places.
This is shown clearly on a zoom in of my graph.
Using the decimal method doesn’t always work however. Below is a graph y=9x³+51x²+91x+49.
When we use the decimal method to look for a change of sign we see that there is not one on the repeated root.
Between X=2 and X=3 we can see that there is a route, however as it is a repeated route and just touches the axis, there is no sign change, so the decimal method does not work.
The second route of the equation can be found (at X=-1) this is because the curve cuts the x-axis and there is therefore a change of sign!
Another way of solving the roots of an equation is the Newton-Raphson method.
I am going to use the equation ‘y=x³+4x²+x-3’. Below is the graph of my equation.
We can find the roots by using the Newton-Raphson method. This is where we take a series of tangents to the graph. By taking a series of tangents, we see the tangents converging to the roots.
As can be seen from the graph, there are roots between -4 and -3, -2 and -1, and 0 and 1. The root between 0 and 1 is the first I will investigate.
The Newton-Raphson formula is xn+1 = xn-(f(xn)/f’(xn).
At the point x=1 on the graph:
f(x) = x³+4x²+x-3 = 3
f(‘x) = 3x2+8x+1 = 12
So using the NR method:
Xn+1 = 1-(3/12) = 0.75
I now will use f(0.75) to find a tangent which cuts closer to the root.
f(0.75) = x³+4x²+x-3 = 0.421875
f’(0.75) = 3x2+8x+1 = 8.6875
So using the NR method:
Xn+1 = 0.75-(0.421875/8.6875) = 0.7014388489
I will now use f(0.7014388489) to find a closer tangent.
f(x) = x³+4x²+x-3 = 0.146241425
f(‘x) = 3x2+8x+1 = 8.087560168
So using the NR method:
Xn+1 = 0.7014388489-(0.146241425/8.087560168) = 0.6833565816
Using f(0.6833565816):
f(x) = x³+4x²+x-3 = -0.1296272762
f(‘x) = 3x2+8x+1 = 7.867781306
So using NR method:
Xn+1 = 0. 6833565816-(-0.1296272762/7.867781306) = 0.6998322907
Using f(0.6998322907):
(x) = x³+4x²+x-3 = 0.00164675759
f(‘x) = 3x2+8x+1 = 8.067954031
Using NR method:
Xn+1 = 0.6998322907-(0.00164675759/8.067954031)=0.6996281798
Using f(0.6996281798):
(x) = x³+4x²+x-3 = 2.5410463 E-7
f(‘x) = 3x2+8x+1 = 8.065464208
So using NR method:
Xn+1 = 0. 6996281798-(2.5410463 E-7/8.065464208) = 0.6996281483
My last two answers are the same to 5sf. (0.69963) so I can conclude that the root lies here.
Below is a table I constructed to find the other two roots.
For the root between -2 and -1:
So we can deduce from the table that the root between -2 and -1 lies at the point x = -1.23913.
For the root between -3 and -4:
We can tell from the table the root between -3 and -4 lies at x=-3.4605 to 5sf.
I will test the error range to this point. My answer is correct to 5sf and if I test f(x) to 0.00005 either side of my answer, I would expect to see a change of sign either side (as the curve cuts the axis).
f(-3.4605-0.00005) = -4.1707 E-4
f(-3.4605+0.00005) =5.07047985 E-4
As can be seen there IS a change of sign, so we can tell that my answer is correct.
Sometimes however the NR method doesn’t work.
Below is the graph y=1/x-2.
The blue lines surrounding my graph represent the tangents usually used to find where the curve cuts the x-axis. The blue lines are trying to find the root between where x=0 and x=1.
The tangents however are diverging so they will never find a root for itself.
This can be proved in the table below:
The NR method in this case is not useful as the tangents diverge and thus no root can be found.
The final method used to find the root of an equation is the rearrangement method. Using an equation, it can be rearranged to help find the root.
Below is the curve y=2x³-2x²-5x+1.
The equation can be re-arranged to make y=2x³-2x²+1/5.
By using the method we can calculate the root. Using the rearranged method I found the root quite easily, as can be seen from the table below.
Looking at the graph zoomed in, we can see the lines converging to the root.
The rearrangement method doesn’t always work however. When the gradient at the root is steep, the method doesn’t work and the lines diverge instead of converge.
When trying to find the root nearer 3 on the x-axis, the values diverge and no root can be found.
This can also be illustrated on the graph; we see the lines converging successfully; diverge when the gradient is too steep.
The method fails because the gradient of the curve is too steep. gradient>1. If the gradient is <1 then the root can not be found like this.
To help me in my comparison of these methods, I am going to use both decimal search and Newton-Raphson method to find the other two roots of the equation 2x³-2x²-5x+1.
Using decimal search to find the root between one and two.
Change of sign lies between 0 and 1.
The change of sign now lies between 0.1 and 0.2.
The change of sign now lies between 0.18 and 0.19.
The change of root now lies between 0.188 and 0.189.
The root now lies between 0.1884 and 0.1885
The root now lies between 0.18846 and 0.18847.
I can conclude that the root lies at 0.18846 + or – 0.000005.
I will now use the Newton-Raphson method to find the same root again.
Using Newton-Raphson Iteration function on Autograph, we can quickly see where the root lies.
Below is a copy of the graph with the root being found at 0.1885 (Autograph only works to 4 DP).
Having tested all three, there is no clear winner as to which is the best for finding the roots of equation.
Newton-Raphson method is extremely quick when using Autograph although it isn’t particularly accurate, stopping at 4 decimal places. Also Autograph is a specialist program which may not always be available to us. Newton Raphson can be done on a calculator too which is easy.
Decimal Search is, I believe, the easiest.
Once the equations are set up on Excel (a far more common program than Autograph) it is easy to find the roots by looking for the change in sign.
This can also be done on the table function of a calculator which is quick and easy too. The decimal search method is, I would say, more readily accessible as no rare programs are needed.
Finally is the rearrangement method. This, like the other two is not particularly complicated. It is the hardest of the three however. Once the curve has been rearranged it is easy to put into an Excel sheet but of the three it is the most likely to fail as it cannot cope with steep gradients.
Newton-Raphson is pretty robust although it can trip up on 1/x curves.
Of the three, decimal search is, in my opinion, the best as it is quick, simple and doesn’t fail easily.