The decimal search method suggests that the location of the root is:
0.7952< x < 0.7953.
To three decimal places the estimated root is 0.795.
Error Bound: 0.795 + 0.0005
This is impossible as there is a vertical asymptote at about this point.
Reason: As there is a change of sign at either side of the asymptote, the method converges to the point where vertical asymptote crosses the x-axis.
Demonstration:
In order for Y= [(X2 +1) / (5X4 - 2)] -1 to be undefined the denominator has to be zero.
5X4 – 2 = 0
5X4 = 2
X4 = 2/5
X= √(2/5) ⇒ X = + 0.795(3dp.)
Therefore it is impossible to have 0.795 as a root. This clearly shows the failure of the decimal search as it gave as a root that is incorrect.
- Rearranging f(x) =0 in the form x=g(x)
-
Chosen equation: Y = X3 –12X + 5
- The graph of this equation crosses the X-axis three times, therefore
Y = X3 –12X + 5 has three roots. The estimated where about of these roots are between points [-4, -3], [0,1], and [3,4]. To be certain I will be looking if there is a change of sign when substituting these points. The results are as follows:
There are three roots found between the above-mentioned points. I will use the rearranging method to find the root between [0,1].
-
Rearranged equation: X = √(12x –5)
General Iterative Formula: Xn+1=√(12xn –5)
Results found by taking x1 as 3 are:
The estimated root converges to 3.2332(5sf.).
Error Bound: 3.2332 + 0.00005
-
Graph of the rearranged equation, g(x) = √(12x –5) is shown below:
The magnitude of the gradient of g(x) for values of x should be close to the root. The rearrangement of the equation will work if and only if;
-1<g’(x) <1
g’(x) = 4 => when x is 3.2332, g’(x)= 0.3826
(12x –5)2/3
Since this value is between (-1, 1) the method works for this root.
Problem with the rearrangement method
I will still be using the equation Y = X3 –12X + 5. From the graph and test for change of sign we know that there is a root between -3 and -4. To find the root close to x = -4 I will use the previous equation used for rearranging method.
-
Rearranged equation: X = (X3 + 5) / 12
General Iterative Formula: Xn+1=[(X n)3 +5] / 12
Results found by taking x1 as -4 are:
This method just doesn’t help me find the root as is doesn’t converge to any particular number. It just goes on increasing to some big numbers. My expectation was for the method to converge to one of the two unfound roots, either 0.42297 or 3.2332. Therefore I can conclude that the rearrangement method has failed for this case. The reason for the failure might be because of the discontinuities or because of a poor choice of a starting value.
In this case g’(x) = x2 ;when x is –4 g’(x) is 4.
4
This value is not between –1 and 1. Therefore the rearrangement method fails.
-
Graph of the rearranged equation, y = (X3 + 5) / 12 is shown below:
- Newton-Raphson method
-
Chosen equation: Y = 4X4 + 7X3 – 5
-
δy / δx=16x3 + 21x2
-
Iterative Formula: Xn + 1= Xn – f (Xn)
f’(Xn)
Xn + 1= Xn – (4 Xn4 + 7 Xn -5)
(16Xn 3 + 21 Xn2)
Number of possible roots: Two (as the graph crosses the x-axis twice)
Estimated where about of roots: between points [0,1] and [-2, -1]
-
Checking by putting the points in the equation Y = 4X4 + 7X3 – 5:
Therefore there are two roots found between points [–2, –1] and [0,1]. I will use the Newton-Raphson method to find these two points.
For the root between [-2, -1]:
The estimated root is – 1.9252(5sf.)
Error Bound: -1.9252 + 0.00005
For the root between [0, 1]:
The estimated root is – 0.78956(5sf.)
Error Bound: 0.78956 + 0.000005
A case of failure for the Newton-Raphson method
-
Chosen equation: Y = 2 + 1
3-x2
(3-x2)2
-
Iterative Formula: Xn + 1= Xn – f (Xn)
f’(Xn)
Xn + 1= Xn – 2 + 1
3-x2
2x
(3-x2)2
As it can obviously be seen on the graph there are two roots, one between 1 and 2, and another one between –1 and –2. I will use the Newton-Rapson method to find the root between 1 and 2. This time I will be using a calculator rather than other computer packages to find the roots.
X1 will be taken to be 1 in this case. Applying the iterative formula above I found:
The root I was looking for was either 1.8708(5sf.) or -1.8708(5sf.). Using the Newton-Rapson method I expected to find one of the above-mentioned roots. Nevertheless there was no convergence revealed. Instead the numbers were going all over the place and were dramatically getting bigger all the time. At last the calculator was not able to handle the number; an error message was encountered. The existence of the discontinuity prevented the method from working and it has failed.
Comparison of the three methods
To compare the three methods I have decided to use the equation I used for the decimal search method, which was Y = 2X3 – 5X –2. I have already shown how the roots of this equation can be found by using the decimal search method. I will apply the rearrangement and the Newton-Raphson method to find the root between points [-1,0]. We know that there is the existence of a root between these two points as there is a change of sign.
- Rearranging f(x) =0 in the form x=g(x)
-
Rearranged equation: X = (2X3 - 2) / 5
General Iterative Formula: Xn+1=[(2X n3) - 2] / 5
Results found by taking x1 as 0 are:
Error Bound: -0.4323 + 0.00005
It was possible to find the expected root, which was –0.432(3dp).
- Newton-Raphson Method
-
δy / δx = 6x2 – 5
-
Iterative Formula: Xn + 1= Xn – f (Xn)
f’(Xn)
Xn + 1= Xn – (2 Xn3 -5 Xn -2)
(6 Xn2 - 5)
By using the iterative formula I got:
The estimated root appears to be -0.432(3dp.) and agrees with two previous results.
Error Bound: -0.4323 + 0.00005
Comparison of Ease of use and Speed of convergence
In order to find the root that was requires all the three methods were successful. Nevertheless the ease of use and the speed of convergence obtained by each method were different. Drawing the graph of the equation before starting any calculations was essential. To do this coursework I have used Microsoft Excel. Using excel made calculations fairly easy. In addition to this I have used a software to draw my graphs. The ability of excel in allowing formulas to be copied from one cell to another saved me a lot of time. Using a calculator in one of the calculations above was a bit long, compared to using excel.
I had to insert different formulas in the cells to calculate various values. Some of them include:
=((D5^3) + 5) / 12
=((2*(D4^3)) - (5*D4) -2)
=D5 - ((4*(D5^4)) + (7*(D5^3)) - 5)/((16*(D5^3))+(21*(D5^2)))
Ease of use
From all the methods I used, the rearrangement method was the easiest to use once the correct rearrangement is done. Short and easy calculations were carried out using the iterative formulas. In some cases it is hard to find the different roots of an equation, as different rearrangements has to be done. g’(x) also has to lie between –1 and 1, or else the value of x converges to an unwanted root, or doesn’t converge to anything at all.
The Newton-Rapson method was fairly easy as well. At times the Newton-Raphson method might be laborious, as long differentiations has to be carried out. While using excel I had to insert long formulas when applying this method. This problem also happens when using a calculator.
On the other hand the decimal search method takes a long time. Finding the root of an equation to three decimal points using the decimal search method considerably takes a long time and is tedious.
Speed of convergence
By using the Newton-Rapson method I was able to find the roots that I was looking for very rapidly. While comparing each method using the same equation it only took four steps to get the estimated root, compared to seven for that of the rearrangement method.
As it is stated above the rearrangement method has a fairly fast convergence. Changing the equation f(x) into the form g (x) is a crucial point. Any error will result in failure to find the root. Sometimes it could be very long depending on the equation that we are trying to find the root for.
The decimal search method takes a long time as it is mentioned above. Having to keep on splitting the boundaries of a root in order to reach to the closest point to the precise root is a long process. If we were trying to find a root to five or more decimal places it would be laborious and cumbersome.
Although all the three methods have their own disadvantages, if carefully applied to an appropriate equation they would give a good estimation of the root(s) of an equation to a limited degree of accuracy.