- Level: AS and A Level
- Subject: Maths
- Word count: 2573
Solution of equations by numerical methods.
Extracts from this document...
Introduction
P2 courseworkDavid Effah
PURE MAHEMATICS 2 COURSEWORK
SOLUTION OF EQUATIONS BY NUMRICAL METHODS
- Change of sign Method
- Decimal Search
- Chosen Equation: Y = 2X3 – 5X -2
There are three possible roots for this equation as its graph crosses the x-axis three times. By looking at the graph it is possible to estimate the where about of the roots. Furthermore by testing for the existence of change of sign between any two chosen points I could be able to decide if there is a root or not. Looking at the graph of any equation is also vital as there might be some discontinuities.
I will be testing if there is a root between points [-1,0].
- For [-1,0] – Substituting this two points in the equation Y = 2X3 – 5X-2 gives:
x | -1 | 0 |
y | 1 | -2 |
As it can be seen there is a change of sign, which implies that there is a root between the two points. To find this point to a limited degree of accuracy I will be using decimal search, whose working out is shown below.
x | 0 | -0.1 | -0.2 | -0.3 | -0.4 | -0.5 | -0.6 | -0.7 | -0.8 | -0.9 | -1 |
y | -2 | -1.502 | -1.016 | -0.554 | -0.128 | 0.25 | 0.568 | 0.814 | 0.976 | 1.042 | 1 |
x | -0.4 | -0.41 | -0.42 | -0.43 | -0.44 | -0.45 | -0.46 | -0.47 | -0.48 | -0.49 | -0.5 |
y | -0.12800 | -0.08784 | -0.04818 | -0.0090 | 0.029632 | 0.067750 | 0.105328 | 0.142354 | 0.178816 | 0.21470 | 0.25000 |
x | -0.43 | -0.431 | -0.432 | -0.433 | -0.434 | -0.435 | -0.436 | -0.437 | -0.438 | -0.439 | -0.44 |
y | -0.009 | -0.00513 | -0.0012 | 0.0026 | 0.00651 | 0.01037 | 0.014236 | 0.01809 | 0.02194 | 0.02579 | 0.0296 |
x | -0.432 | -0.4321 | -0.4322 | -0.4323 | -0.4324 | -0.4325 | -0.4326 | -0.4327 | -0.4328 | -0.4329 | -0.433 |
y | -0.0012 | -0.00086 | -0.0005 | -0.0001 | 0.00031 | 0.0007 | 0.001084 | 0.00147 | 0.00186 | 0.00225 | 0.0026 |
Location of root: -0.4324 < x < -0.4323
The estimated root is –0.432 to three decimal places.
Error Bound: -0.432 + 0.0005
A case of failure for the Decimal Search method
To demonstrate this I have chosen the equation
Middle
-50.76
-72.61
-128.85
-600.57
221.38
92.70
58.31
42.37
33.17
x
0.795
0.7951
0.7952
0.7953
0.7954
0.7955
0.7956
0.7957
0.7958
0.7959
0.796
y
-600.57
-951.66
-2295.6
5542.9
1254.2
706.66
491.70
376.89
305.46
256.74
221.38
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:
X | -4 | -3 |
Y | -11 | 14 |
X | 0 | 1 |
Y | 5 | -6 |
X | 3 | 4 |
Y | -4 | 21 |
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:
x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 |
3 | 3.141381 | 3.197673 | 3.219544 | 3.227962 | 3.231191 | 3.232427 | 3.232900 | 3.233081 |
x10 | x11 | x12 | x13 | x14 | x15 | x16 | x17 | x18 |
3.233151 | 3.233177 | 3.233187 | 3.233191 | 3.233193 | 3.233193 | 3.233194 | 3.233194 | 3.233194 |
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:
x1 | x2 | x3 | x4 | x5 | x6 | x7 |
-4 | -4.9167 | -9.4878 | -71.000 | -29519 | -2.1436 * 1012 | -8.2082 * 1036 |
Conclusion
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.
This student written piece of work is one of many that can be found in our AS and A Level Core & Pure Mathematics section.
Found what you're looking for?
- Start learning 29% faster today
- 150,000+ documents available
- Just £6.99 a month