This shows that the root lies between (-3.34,-3.33).
This table shows the values of Y when X is between -3.34 and -3.33:
This shows that the root lies between (-3.332,-3.331). From these tables I now know that X = -3.3315 ± 0.0005.
Failure of Decimal Search
Decimal search is only effective in certain equations. When using decimal search it is usual to begin by using whole numbers. If an equation is used where the roots lie close together so that there are two between the integers, then decimal search will not show a change of sign. Another reason for the method to fail would be when a repeated root appears.
In trying to find the roots of the equation y = x^3-3x^2-1.32x+6.776.
Using the same method as before and starting with integers gives me these results:
It appears from the table that there is only a single root. However the curve of the equation looks like this:
Rearranging into the Form x = g(x)
The Equation y = x^3-14x-4, can be written in many different ways. By rearranging the equation I could write it as: ‘14x = x^3-4’ or ‘x = (x^3-4)/14.
The graph of the equation y = x^3-14x-4 looks like this:
If I now use the rearranged equation x = (x^3-4)/14 and draw the lines of both sides of the equation on a graph i.e. y = x and y = (x^3-4)/14, then the points where the two lines cross are the roots from the original equation.
This shows the graph of the two lines y=x and y = (x^3-4)/14.
The roots lie between (-4,-3), (-1,0) and (3,4).
Comparing this to my graph, I can see that it looks correct.
For my equation y = x^3-14x-4, to find the root in the interval (-1,0), I start at X1 = 1.
Xn^3 – 4 = Xn+1
14
X2 = (1^3 – 4)/14 = -0.21429
X3 = (-0.21429^3 – 4)/14 = -0.28642
X4 = (-0.28642^3 – 4)/14 = -0.28738
X5 = (-0.28738^3 – 4)/14 = -0.28741
X6 = (-0.28741^3 – 4)/14 = -0.28741
Root is -0.28741 to 5 d.p. This means the root is x = 0.28741 ± 0.000005
Failure of rearranging into the Form x = g(x)
This method will only work for certain cases. I will not be able to work out the other two roots of this equation using this method. If I try to find the root between (3,4) the method will fail.
If I start with X1 = 4
X2 = (4^3 – 4)/14 = 4.285714
X3 = (4.285714^3 – 4)/14 = 5.336942
X4 = (5.336942^3 – 4)/14 = 10.57228
I can see that the solutions are just getting further away from each other and will not ever match to 4 d.p.
Newton-Raphson Method
Newton-Raphson method works by making an estimate of the root X1.
This is the curve y=x^3-4x-7:
If I now draw a tangent at an estimate of 3, then it crosses the x-axis closer to the root than the estimate does, giving us a better estimate:
If I call the point where my estimate lies on the x-axis A, the point at which the tangent crosses the x-axis B, and the co-ordinate of the tangent C, I can start to produce an equation to work out the distance.
If I now say that the x co-ordinate of A is X0, then the co-ordinates of C are (X0,f(X0)). If I call the distance between A and B n, and call the point C X1, then I can find out where X1 is using X1 = X0 – n.
I can now repeat this to get closer and closer to the root.
By differentiating my equation:
f(x) = x^3-4x-7
Dy
Dx = 3x^2-4
F’(x) = 3x^2-4
I can now find the point where the tangent crosses the x-axis by using the Newton-Raphson formula:
X1 = X0 – f(X0)
f’(X1)
By finding where the roots lie:
I now know that the root lies between 2 and 3. I can see that there is only a single root, so I will now try to find it using Newton-Raphson method.
This is the graph between 2 and 3:
By using the formula that I previously stated I can see that as:
f(x) = x^3-4x-7
f’(x) = 3x^2-4
Now if I make x = 3:
X1 = X0 – f(x)
f’(x)
Or: X1 = X0 – X0^3-4x-7
3X0^2-4
So: X1 = 3 – 3^3-4(3)-7
3(3^2)-4
= 3 – 8
23
= 2.652
This answer gives a closer estimate then the previous. If I drew a straight line at this point and then a new tangent at the point, I will produce an even closer estimate. I will now repeat this until the result repeats to 5 decimal places.
X1 = 2.65217
X2 = X1 – X1^3-4x-7
3X1^2-4
X2 = 2.59096
X3 = 2.58913
X4 = 2.58913
I can now see that the results are converging. I can now say that root is correct within 5 decimal places.
This means X = 2.58913 ± 0.000005.
Failure of Newton-Raphson Method
This method seems to not fail often, but in some cases it still fails. If I use a line that only crosses the x-axis once, and use a tangent at an estimate close to the turning point that is not close to the x-axis, for example the equations: x^3-2x+2:
If I now make an estimate at 1, due to the gradient being steep so close to the turning point, and the line being far away from the x-axis, when the tangent finally reaches the x-axis, that point has passed the turning point and the new estimate will make a tangent at a point where the gradient is decreasing.
This is what happens:
This will just cause the new estimate to be 1 then 0 and then continually repeat.
Comparison of Methods
Out of the three methods that I have attempted, the fastest way to find a root appears to be Newton-Raphson. I used the equation y = x^3-14x-4 for the rearranging method and found a root 0.28741 ± 0.000005. If I use this equation and use decimal search to find the root:
This now shows that the root lies between (-0.288,-0.287). From this, I know that X = -0.2875 ± 0.0005.
If I use the Newton-Raphson method for the equation y = x^3-14x-4 then I know from before that the formula is:
X1 = X0 – X0^3-14x-4
3X0^2-14
Using X0 = 0 gives:
X1 = -0.28571
X2 = -0.28741
X3 = -0.28741
Overall, this shows that as long as the starting value (X0) isn’t an extremely bad estimate and very far away, then Newton-Raphson is the quickest method. Decimal search if a very basic method to understand and apart from repetition errors, is very reliable and easy to work with. The main disadvantage of this method is the simple fact that it involves a lot of repetition.
The rearranging into the form g(x) is a very easy method as it simply requires just putting the new answer into another simple formula. This is still a tedious method as it requires a lot of repetition.
Although the Newton-Raphson method can be slightly confusing and a mistake can be made easily, it is by far the quickest. The main problem occurring, by an estimate being made near a turning point that doesn’t occur close to the x-axis can be eliminated by using the decimal search method to find the rough points at which the roots cross the x-axis. The other problem that can cause this method to take a long time is by the original estimate being made not close to the root. This will result in it taking a long time to reach the root. This can however be eliminated by combining the decimal search method with Newton-Raphson. This will allow decimal search to find the rough points at which the roots occur, then allowing Newton-Raphson to close in on the root without suffering the repetition of decimal search.