Pure Mathematics 2: Solution of equation by Numerical Methods
Pure Mathematics 2: Solution of equation by Numerical Methods
Introduction:
In this coursework, I am going to solve equations by using the Numerical Methods. Numerical methods are used to solve equation that cannot be solved algebraically e.g. quadratic equations ax²+bx+c=0 can be solved using this formula:
x= -b± V b² - 4ac
2a
Therefore numerical methods would not be used for quadratic equations. I will be working with cubic equation because there is no formula to solve it. There are three methods, which I will be using:
* Change of sign method
* Newton-Raphson method
* Rearranging f(x) = 0 in the form x = g(x)
Change of sign method:
This method is concerned with when a function crosses the x-axis, and by definition changes sign (+ and -). If we are looking the root of equation f(x) = 0. The point at which the curve crosses x-axis is the root. Once an interval where f(x) changes sign then the root must be in the interval.
f(a) > 0
f(b) < 0
Therefore root must be between [a,b]
f(a) < 0
f(b) > 0
Root is between the interval [a,b]
To find the interval of each root for the equation, I'll be doing a decimal search first.
Lets take the equation y = x³ - 12x + 5
x
-4
-3
-2
-1
0
2
3
4
f(x)
-11
4
21
6
5
-6
-11
-4
21
There are 3 roots in this equation and they are in these intervals: [-4, -3]
[ 0 , 1 ]
[ 3 , 4 ]
Now, I am going to use Interval Bisection to find out one of the root. This method is similar to decimal search but instead of dividing each interval into 10 parts, using interval bisection, only need to divide into 2, which is more simpler.
f(x) = x³ - 12x + 5
I am going to use the root in the interval [0,1]
f(0) > 0
f(1) < 0
f(0+1) › f(0.5) = -0.875
2
Therefore f(0.5) < 0
f(0) > 0 f(0.5) < 0 f(1) < 0
Root is in interval [0, 0.5]
I now test the mid-point of [0, 0.5]
f(0+0.5) › f(0.25) = 2.015625
2
Therefore f(0.25) > 0
f(0) > 0 f(0.25) > 0 f(0.5) < 0
Root is in interval [0.25, 0.5]
I will now test mid-point of [0.25, 0.5]
f(0.25+0.5) › f(0.375) = 0.552734375
2
Therefore f(0.375) > 0
f(0.25) > 0 f(0.375) > 0 f(0.5) < 0
Root is in interval [0.375, 0.5]
I am going to continue this process with spreadsheet. Eventually, it will give an interval that is close to the root.
n
A
b
c
f(a)
f(b)
f(c)
0
0.5
5
-6
-0.875
2
0
0.5
0.25
5
-0.875
2.015625
3
0.25
0.5
0.375
2.015625
-0.875
0.552734
4
0.375
0.5
0.4375
0.552734
-0.875
-0.16626
5
0.375
0.4375
0.40625
0.552734
-0.16626
0.192047
6
0.40625
0.4375
0.421875
0.192047
-0.16626
0.012585
7
0.421875
0.4375
0.429688
0.012585
-0.16626
-0.07692
8
0.421875
0.429688
0.425781
0.012585
-0.07692
-0.03219
9
0.421875
0.425781
0.423828
0.012585
-0.03219
-0.00981
0
0.421875
0.423828
0.422852
0.012585
-0.00981
0.001389
1
0.422852
0.423828
0.42334
0.001389
-0.00981
-0.00421
2
0.422852
0.42334
0.423096
0.001389
-0.00421
-0.00141
3
0.422852
0.423096
0.422974
0.001389
-0.00141
-1.1E-05
4
0.422852
0.422974
0.422913
0.001389
-1.1E-05
0.000689
5
0.422913
0.422974
0.422943
0.000689
-1.1E-05
0.000339
6
0.422943
0.422974
0.422958
0.000339
-1.1E-05
0.000164
7
0.422958
0.422974
0.422966
0.000164
-1.1E-05
7.67E-05
8
0.422966
0.422974
0.42297
7.67E-05
-1.1E-05
3.29E-05
9
0.42297
0.422974
0.422972
3.29E-05
-1.1E-05
.11E-05
20
0.422972
0.422974
0.422973
.11E-05
-1.1E-05
.53E-07
The require root is in the interval [0, 1]
When n = 20 the root is in the interval [0.422972, 0.422974]. Therefore, the root should be 0.422973 +/- 0.000001 (6 d.p.)
Root is 0.422973 ± 0.000001
Failure of the change of signs method
There are a few situations where change of signs method cannot apply to some curves.
The first is when the curve touches the x-axis.
The change of signs method will not be able to detect a double root, as there is not change of sign, therefore this is a failure for this method.
The second failure is when there is a discontinuity in f(x)
This is the equation 1 =0 has no root, but the change of sign method will
x - 2.7
converge the root at x=2.7. Therefore this is another failure for this method.
The third one is when several roots are too close together, and I am going to demonstrate why this method will not work for this.
I am going to use the equation f(x) = x³-1.7x²+0.84x-0.108
First I am going to carry out a decimal search
x
-3
-2
-1
0
2
3
f(x)
-44.928
-16.588
-3.648
-0.108
0.032
2.772
4.112
-
-
-
-
+
+
+
The root is in the interval [0, 1]. Using interval bisection, I am going to find the root in the interval.
f(0+1) › f(0.5) = 0.012
2
f(0) < 0 f(0.5) > 0 f(1) > 0
Root is in interval [0, 0.5]
I am going to test the interval [0, 0.5]
f(0+0.5) › f(0.25) = 0.011375
...
This is a preview of the whole essay
0
2
3
f(x)
-44.928
-16.588
-3.648
-0.108
0.032
2.772
4.112
-
-
-
-
+
+
+
The root is in the interval [0, 1]. Using interval bisection, I am going to find the root in the interval.
f(0+1) › f(0.5) = 0.012
2
f(0) < 0 f(0.5) > 0 f(1) > 0
Root is in interval [0, 0.5]
I am going to test the interval [0, 0.5]
f(0+0.5) › f(0.25) = 0.011375
2
f(0) < 0 f(0.25) > 0 f(0.5) > 0
Root is in interval [0, 0.25]
I am going to test the interval [0, 0.25]
f(0+0.25) › f(0.125) = - 0.027609375
2
f(0) < 0 f(0.125) < 0 f(0.25) > 0
The root is in interval [0.125, 0.25]
I am going to use spreadsheet to carry out the rest of the process to find the root for this equation.
n
a
b
c
f(a)
f(b)
f(c)
0
0.5
-0.108
0.032
0.012
2
0
0.5
0.25
-0.108
0.012
0.011375
3
0
0.25
0.125
-0.108
0.011375
-0.02761
4
0.125
0.25
0.1875
-0.02761
0.011375
-0.00367
5
0.1875
0.25
0.21875
-0.00367
0.011375
0.00487
6
0.1875
0.21875
0.203125
-0.00367
0.00487
0.000864
7
0.1875
0.203125
0.195313
-0.00367
0.000864
-0.00134
8
0.195313
0.203125
0.199219
-0.00134
0.000864
-0.00022
9
0.199219
0.203125
0.201172
-0.00022
0.000864
0.000327
0
0.199219
0.201172
0.200195
-0.00022
0.000327
5.46E-05
1
0.199219
0.200195
0.199707
-0.00022
5.46E-05
-8.2E-05
2
0.199707
0.200195
0.199951
-8.2E-05
5.46E-05
-1.4E-05
3
0.199951
0.200195
0.200073
-1.4E-05
5.46E-05
2.05E-05
4
0.199951
0.200073
0.200012
-1.4E-05
2.05E-05
3.42E-06
5
0.199951
0.200012
0.199982
-1.4E-05
3.42E-06
-5.1E-06
6
0.199982
0.200012
0.199997
-5.1E-06
3.42E-06
-8.5E-07
7
0.199997
0.200012
0.200005
-8.5E-07
3.42E-06
.28E-06
8
0.199997
0.200005
0.200001
-8.5E-07
.28E-06
2.14E-07
9
0.199997
0.200001
0.199999
-8.5E-07
2.14E-07
-3.2E-07
20
0.199999
0.200001
0.2
-3.2E-07
2.14E-07
-5.3E-08
The interval bisection only shows one root for this equation since it only gives f(0.5) > 0, so it will only search for a root in the interval [0, 0.5] and eventually the root arrives at 0.3. It ignores the rest of the root in the equation.
The equation can be written as f(x) = (x-0.2)(x-0.6)(x-0.9)
f(0) > 0
f(1) > 0
There is no change of sign
As you can see, this equation actually has 3 roots, 0.2, 0.6, and 0.9. But the interval bisection can only lead us to x = 0.2. Therefore it shows that interval bisection is not good for equation with several roots close together.
Newton-Raphson Method:
This is a fixed-point estimation method. The estimate starts at x1, for a root of f(x) = 0. A tangent is then draw to the curve y = f(x) at the point (x1, f(x1)). The point at which the tangent cuts the x-axis then gives the next approximation for the root, and the process is repeated.
I am going to use the equation y = x³ - 3x + 1.
As you can see there are three roots in this graph, they are in the interval [-2, -1]
[0, 1]
[1, 2]
The gradient for the tangent to the curve at (x1, f(x1)) is f'(x1) (meaning dy/dx for x). The equation of the tangent is: y-y1 = m(x-x1). Therefore y-f(x1) = f'(x1) [x-x1]. This tangent passes through the point (x2, 0). Carrying on with this process, this will get closer and closer to the tangent. But there is a general formula for this process:
xn+1 = xn - f(Xn)/f'(Xn)
Returning to my function: f(x) = x³ - 3x +1
dy/dx = f'(x) = 3x - 3
The Newton-Raphson formula becomes:
xn+1 = xn - xn³ - 3x + 1
3xn² - 3
I am now going to use this formula to search for the root in the interval [-2 , -1]
Let x1 = -2
So x2 = -2 - (-2³ - 3(-2) +1)
3(-2)² - 3
= -2 - (-1/9)
= -1.888888889 (-18/9)
x3 = -18/9 - [(-18/9³) - 3(-18/9) + 1]
3(-18/9)² - 3
= -18/9 - ((-6539/729) - (-52/3) + 1)
3(346/81) - 3
= -1.879451567
x4 = -1.879451567 - (-1.879451567³ - 3(-1.879451567) + 1)
3(-1.879451567²) - 3
= -1.879451567 - (-6.63885855 - (-5.638354701) + 1)
7.597014578
= -1.879451567 - (-0.00006632210519)
= -1.879385245
Now I am going to use spreadsheet to find the root:
n
x(n)
f(x(n))
f'(x(n))
x(n+1)
-2
-1
9
-1.888888889
2
-1.888888889
-0.072702332
7.703703704
-1.879451567
3
-1.879451567
-0.00050385
7.597014578
-1.879385245
4
-1.879385245
-2.48007E-08
7.596266696
-1.879385242
5
-1.879385242
8.88178E-16
7.596266659
-1.879385242
6
-1.879385242
0
7.596266659
-1.879385242
7
-1.879385242
0
7.596266659
-1.879385242
The required root is in the interval [-2, -1], the starting value is x(-2) = 0, after 6 steps, this method has arrived at -1.879385242 (9 d.p.)
Error Bounds:
Root is in the interval [-1.879385242, -1.879385245]
Root is -1.8793852425 ± 0.000000005
Now, I am going to find out the rest of the roots: [0, 1]
Let x1 = 0
x2 = 0 - (0³ - 3(0) + 1)
3(0)² - 3
= 0 - (-1/3)
= 1/3
x3 = 1/3 - (1/3³ - 3(1/3) + 1)
3(1/3²) - 3
= 1/3 - (1/27 - 1 + 1)
1 - 3
= 1/3 - (-1/54)
= 19/54 (0.351851851)
x4 = 0.351851851 - (0.351851851³ - 3(0.351851851) +1)
3(0.35185185²) - 3
= 0.351851851 - (0.043559162 - 1.055555553 + 1)
0.371399175 - 3
= 0.351851851 - -0.011996391
-2.628600825
= 0.346550422
Now I am going to use spreadsheet to continue with the process.
n
x(n)
f(x(n))
f'(x(n))
x(n+1)
0
-3
0.333333333
2
0.333333333
0.037037037
-2.66666667
0.347222222
3
0.347222222
0.00019558
-2.63831019
0.347296353
4
0.347296353
5.72478E-09
-2.63815573
0.347296355
5
0.347296355
0
-2.63815572
0.347296355
6
0.347296355
0
-2.63815572
0.347296355
This shows that the root is close to 0.347296 (6 d.p.)
Now I am going to find the last root in the interval [1, 2]:
Let x1 = 2
x2 = 2 - (2³ - 3(2) + 1)
3(2²) - 3
= 2 - (8 - 6 + 1)
12 - 3
= 2 - 1/3
= 12/3
x3 = 12/3 - (12/3³ - 3(12/3) + 1)
3(12/3²) - 3
= 12/3 - (4.62962963 - 5 + 1)
81/3 - 3
= 12/3 - 0.118055555
= 1.548611111
x4 = 1.548611111 - (1.548611111³ - 3(1.548611111) + 1)
3(1.548611111²) - 3
= 1.548611111 - 3.713873551 - 4.645833333
7.194589119 - 3
= 1.548611111 - 0.068040218
4.194589119
= 1.532390162
Now, I am going to use spreadsheet to continue with the process
n
x(n)
f(x(n))
f'(x(n))
x(n+1)
2
3
9
.666667
2
.666667
0.62963
5.333333
.548611
3
.548611
0.06804
4.194589
.53239
4
.53239
0.001218
4.044659
.532089
5
.532089
4.17E-07
4.04189
.532089
6
.532089
4.88E-14
4.041889
.532089
7
.532089
0
4.041889
.532089
This shows the root is close to 1.532089 (6 d.p.)
Failure of Newton-Raphson method:
To test the failure of the Newton-Raphson method, I am going to choose another equation; y = x³ -4x + 2
f(x) = x³ - 4x + 2
xn+1 = xn - xn³ - 4xn + 2
3xn² - 4
Let x1 = 1.1
This is close to the root in interval [0,1] and [1, 2], therefore using the Newton-Raphson method, it should converge to either one of these roots.
x1 = 1.1
x2 = 1.1 - (1.1³ - 4(1.1) + 2)
3(1.1²) - 4
= 1.1 - (1.331 - 4.4 + 2)
3.63 - 4
= 1.1 - (-1.069)
-0.37
= 1.1 - 2.889189189
= -1.789189
x3 = -1.789189 - (-1.789189³ - 4(-1.789189) + 2)
3(-1.789189²) - 4
= -1.789189 - (-5.7275456956 - (-7.156756) + 2)
9.603591833 - 4
= -1.789189 - 3.429210305
5.603591833
= -1.789189 - 0.611966468
= -2.401155
x4 = -2.401155 - (-2.401155³ - 4(-2.401155) + 2)
3(-2.401155²) - 4
= -2.401155 - (-13.84396801 - (-9.60462) + 2)
17.296636 - 4
= -2.401155 - (-2.23934801)
13.296636
= -2.401155 - (-0.168414628)
= -2.232740
n
x(n)
f(x(n))
f'(x(and))
x(n+1)
.1
-1.069
-0.37
-1.789189
2
-1.789189
3.429208
5.603594
-2.401155
3
-2.401155
-2.239348
3.29664
-2.23274
4
-2.23274
-0.199539
0.95539
-2.214527
5
-2.214527
-0.002216
0.71238
-2.21432
6
-2.21432
-2.84E-07
0.70964
-2.21432
7
-2.21432
-5.33E-15
0.70964
-2.21432
8
-2.21432
0
0.70964
-2.21432
As you can see, the root is diverging towards the interval [-2, -3] instead of converging towards [0, 1].
This diagram shows clearly that when x1 is 1.1, the tangent diverts to -2, the reason that this happens is because the value that I chosen to draw the tangent is too close to the turning point of the curve, therefore when the tangent is drawn, it diverts to -2.
Rearranging f(x) = 0 in the form of x = g(x):
Rearranging f(x) = 0 into the form of x = g(x) means that any of value x for which x = g(x) is clearly a root of the original equation.
For this method I am going to use is: y = x³ - 5x + 3
The roots are in interval: [-3, -2]
[0, 1]
[1, 2]
Rearranging the equation in the form x = g(x):
f(x) › 0
=> x³ - 5x + 3 = 0
=> x³ + 3 = 5x
=> x³ + 3 = x
5
Therefore g(x) = x³ + 3
5
Using the g(x) formula, I am now going to find the root in the interval [0, 1]
Let x1 = 0
x2 = 0³ + 3
5
= 3/5 (0.6)
x3 = 0.6³ + 3
5
= 0.216 + 3
5
= 0.6432
x4 = 0.6432³ + 3
5
= 0.6532197
Now I am going to use spreadsheet to continue the process to find the root:
n
x(n)
x(n+1)
0
0.6
2
0.6
0.6432
3
0.6432
0.653219171
4
0.65321917
0.65574511
5
0.65574511
0.65639430
6
0.65639430
0.65656195
7
0.65656195
0.65660530
8
0.65660530
0.65661652
9
0.65661652
0.65661942
0
0.65661942
0.65662017
1
0.65662017
0.65662036
2
0.65662036
0.65662041
3
0.65662041
0.65662043
4
0.65662043
0.65662043
Rearranging f(x) = 0 into x = g(x) means that the root becomes the point of intersection of the curve y = g(x) and the line y = x
There are two possible solutions:
. g'(x) > 0 near the point of intersection of y = x
x1
x2 = g(x1) xn = g(xn-1)
x3 = g(x2)
x4 = g(x3)
This is the staircase diagram.
2. g'(x) < 0 near the point of intersection of y=x
This is a cobweb diagram
Returning to my equation, g'(x) > 0, therefore, I am going to use the staircase diagram.
This graph shows the g(x) and y=x, the points where both graph intersects are the root for the original equation.
I am now going to show that using the staircase diagram, it will converges to the root in [0,1] which I had already shown using the equation:
As you can see, the step gets closer and closer to the intersection of both equations.
Error bounds
After 14 steps this method has arrived at 0.65662043. the root is in the interval [0.65662041, 0.65662043]
Root is between 0.65662042 ± 0.00000001.
Now, I am going to test the other roots. [1, 2]
Using the g(x) formula:
x1 = 1
x2 = 1³ + 3
5
= 4/5
x3 = 4/5³ + 3
5
= 0.512 + 3
5
= 0.7024
x4 = 0.7024³ + 3
5
= 0.346540109 + 3
5
= 0.669308022
Now I am going to use the spreadsheet to continue with the process:
n
x(n)
x(n+1)
0.8
2
0.8
0.7024
3
0.7024
0.669308022
4
0.66930802
0.65996642
5
0.65996642
0.65749042
6
0.65749042
0.65684579
7
0.65684579
0.65667875
8
0.65667875
0.65663552
9
0.65663552
0.65662433
0
0.65662433
0.65662144
1
0.65662144
0.65662069
2
0.65662069
0.65662050
3
0.65662050
0.65662045
4
0.65662045
0.65662044
5
0.65662044
0.65662043
6
0.65662043
0.65662043
The starting value of x(1) = 1, therefore the root is in the interval [1, 2], but as you can see, the method is converging to the root in the interval [0, 1], therefore it is showing the wrong root.
This diagram shows the reason why the method converges the interval [1, 2] to the root in the interval [0, 1]. This therefore shows the failure of this method. Another failure for this method is when picking a root that would diverge instead of converging to the root.
Let x1 = 2
x2 = 2³ + 3
5
= 8 + 3
5
= 11/5 (2.2)
x3 = 2.2³ + 3
5
= 13.648
5
= 2.7296
x4 = 2.7296³ + 3
5
= 23.33747483
5
= 4.667494966
Now I am going to use the spreadsheet to continue with the process
n
x(n)
x(n+1)
2
2.2
2
2.2
2.7296
3
2.7296
4.667494966
4
4.66749497
20.93675096
5
20.93675096
###########
6
###########
###########
7
###########
###########
8
###########
###########
9
###########
###########
0
###########
#NUM!
1
#NUM!
#NUM!
2
#NUM!
#NUM!
This shows the sequence diverges away from the root instead of moving closer to it.
the reason why it diverges is because when the point x1 goes up, it meets the equation y=x instead of y = x³ - 5x + 3, therefore it diverge away.
To solve this problem, I'll have to rearrange the formula again in order for the equation to be under y=x.
f(x) = x³ - 5x + 3
f(x) = 0 => x³ - 5x + 3 = 0
x³ = 5x - 3
x = (5x - 3)1/³
So our new g(x) = (5x - 3)1/³, and the new iteration is xn+1 = (5xn - 3)1/³ for the root [1, 2]
This is the graph for the new g(x) function
Let x1 = 2
x2 = (5 x 2 - 3) 1/³
= 1.912931183
x3 = (5 x 1.912931183 - 3) 1/³
= 1.872423095
x4 = (5 x 1.872423095 - 3) 1/³
= 1.852964856
I am going to use spreadsheet to continue with this process:
n
x(n)
x(n+1)
2
.912931183
2
.912931183
.872423095
3
.872423095
.852964856
4
.85296486
.843470949
5
.84347095
.838803052
6
.83880305
.836499257
7
.83649926
.835360108
8
.83536011
.834796315
9
.83479631
.834517151
0
.83451715
.834378891
1
.83437889
.834310408
2
.83431041
.834276484
3
.83427648
.83425968
4
.83425968
.834251356
5
.83425136
.834247232
This shows that the new g(x) equation works on the other roots in the equation.
Comparison of the Three Methods:
In this section, I am going to compare the three methods by using one equation to test which method is more efficient than the others.
I am going to use the equation y = x³ - 12x + 5 which I had already used for the Change of Signs Method.
There are three roots in this equation: [-3, -4]
[0, 1]
[3, 4]
The root that I am going to use for comparing the three methods will be [0, 1]
From the change of sign method, the root in interval [0, 1], the root is 0.422973 ± 0.000001 (5 d.p.)
Newton-Raphson Method:
Formula xn+1 = xn - xn³ - f(Xn)/f'(Xn)
Rearranging the original equation: f(x) = x³ - 12x + 5
dy/dx = f'(x) = 3x² - 12
The Newton-Raphson method becomes:
xn+1 = xn - x³ - 12x + 5
3x² - 12
Using the same interval, I am now going to find the root between [0, 1] with this method.
Let x1 = 0
x2 = 0 - (0³ - 12(0) + 5)
3(0²) - 12
= 0 - (-5/12)
= 5/12
x3 = 5/12 - (5/12³ - 12(5/12) + 5)
3(5/12²) - 12
= 5/12 - (0.072337962 - 5 + 5)
0.520833 - 12
= 5/12 - 0.07233792
-11.479167
= 0.422968
x4 = 0.422968 - (0.422968³ - 12(0.422968) + 5)
3(0.422968²) - 12
= 0.488968 - (0.075669791 - 5.075616 + 5)
0.536705787 - 12
= 0.422968 - 0.000053791
-11.46329421
= 0.422972692
I am now going to use spreadsheet to continue with the process:
n
x(n)
f(x(n))
f'(x(n))
x(n+1)
0
5
-12
0.416667
2
0.416667
0.072338
-11.4792
0.422968
3
0.422968
4.99E-05
-11.4633
0.422973
4
0.422973
2.4E-11
-11.4633
0.422973
5
0.422973
0
-11.4633
0.422973
Error bound
The root is in interval [0.422968, 0.422973]
The root is 0.4229725 ± 0.0000005 (6 d.p.)
Rearranging f(x) = 0 to the form of x = g(x):
Rearranging the equation: f(x) = x³ - 12x + 5
f(x) › 0
=> x³ - 12x + 5 = 0
=> x³ + 5 = 12x
=> x³ + 5 = x
12
Therefore g(x) = x³ + 5
12
Using the formula, I am now going to find the root of [0, 1]
Let x1 = 0
x2 = 0³ + 5
12
= 5/12
x3 = 5/12³ + 5
12
= 0.42269483
x4 = 0.42269483³ + 5
12
= 0.422960272
I am now going to use spreadsheet to continues with the process:
n
x(n)
x(n+1)
0
0.416667
2
0.416667
0.422695
3
0.422695
0.42296
4
0.42296
0.422972
5
0.422972
0.422973
6
0.422973
0.422973
Error bound
After 6 steps, the root is in interval [0.422972, 0.422973].
The root is 0.4229725 ± 0.0000005 (6 d.p.)
Having done the three methods on the same equation and the same root, I can now compare their merits and limitation for each method:
* Change of Sign
Using the change of signs method to find the root is a very slow process, you have to use the decimal search to find the intervals where the roots are. Then, using the interval bisection, it speeds up the process a little. It is easy to use, and soon converges to the root that I am looking for. However, the root that is found using this method is just as accurate as the other two methods, but using this method, the number of steps to work the root out is 20, and is the most steps taken in all three methods.
* Newton-Raphson
The Newton-Raphson method gave the fastest speed of convergence, although when calculating the root using the Newton-Raphson iteration formula takes a lot of time because xn, follows one after another. When the iterative formula is used, it can fail to find the root if the calculations show divergence (when x1 is too close to the turning point). Using the iterative formula, only 5 steps are needed to work out the root.
* Rearranging method
Rearranging the function of f(x) = 0 to g(x), using the iteration formula, and the staircase diagram, this converges to the root in [0, 1] but have to rearrange the formula again in order to work out the other two. Therefore, using this method may take longer to work out all three roots in the equation. Only 6 steps are needed to work out the root.
All three methods are at 6 d.p.
Uses of hardware and software:
In this investigation, I had used quite a range of software packaging, which enables me to do complicated equations or graph instantly.
A graph-drawing package (Autograph) benefited all the methods. I was able to create the graphs for the functions and equations. This package also enables me to zoom into a root to draw tangents. A spreadsheet software package (Excel) allowed me to customize the tables and implement formulae that helped to calculate the approximations at each value of x. On the graphics application, I could easily revise and correct the formulae to make changes where applicable. I was then able to import the formulae into the word processor and present them alongside the graphs and explanations.
For hardware, I used a calculator to help me with complicated calculations to check for answers for Newton-Raphson and Rearranging formular.
.
Celene Leong 13.7 1