- Level: AS and A Level
- Subject: Maths
- Word count: 3060
Solving Equations Numerically
Extracts from this document...
Introduction
Josh Wakeford 12B1
05/04/03
Pure 2 Coursework: Solving Equations Numerically
Many cubic equations can be solved algebraically; however, many cannot, which means we have to give approximate answers. Graphs, like the one seen below, cannot be solved algebraically and have to be solved some other way.
So, how can we solve these graphs to any degree of accuracy, and in the most efficient way possible? This problem comes up a lot in real life, as many equations in real life will not be able to be solved algebraically, and so other methods have to be used.
There are a number of methods that can be used here, and in this coursework, I am going to describe a trio of good methods that all have their advantages and disadvantages.
Interval Estimation – Change of Sign Method
Now, as are looking for the values of x when the graph crosses the x-axis, we know that when there is a root, f(x) will change sign, so assuming that the graph does not have any asymptotes or other breaks in it, we know that once we have located a interval with a root in it, f(x) will change sign.
For example, in the diagram to the left, we know that there is a root between 1 and 2.
Decimal Search
Middle
As the equation of a straight line can be written
y-y1 = m(x-x1);
the equation of the tangent must be
y-f(x1) = f’(x1)(x-x1).
Where the tangent cuts the x axis, we will call the point (x2,0), so:
0-f(x1) = f’(x1)(x2-x1).
We can rearrange this to give:
x2 = x1-(f(x1)/f’(x1))
Which gives us the Newton-Raphson iteration formula, which is:
xn+1 = xn-(f(xn)/f’(xn))
When we use our cubic equation with this formula, we can values which will start to converge at a very quick rate, this makes using this formula a lot quicker than using the decimal search with the change of sign method which was explained earlier.
The method with which this is done is illustrated graphically on the next page. Also, on the next page, is the way in which it is possible to find all three roots to the equation.
If we plot this method of obtaining the roots in a table, we get the following:
x | f(x) | f'(x) | x' |
-2 | 6.8 | 20 | -2.34000000000000 |
-2.34000000000000 | -2.58359200000000 | 32.94040000000000 | -2.26156767980960 |
-2.26156767980960 | -0.01675654070199 | 29.77062765342460 | -2.26100482500865 |
-2.26100482500865 | 0.00075737613753 | 29.74828054340280 | -2.26103028450156 |
-2.26103028450156 | -0.00003455148215 | 29.74929124239710 | -2.26102912307953 |
-2.26102912307953 | 0.00000157557904 | 29.74924513564450 | -2.26102917604151 |
-2.26102917604151 | -0.00000007184920 | 29.74924723815710 | -2.26102917362635 |
-2.26102917362635 | 0.00000000327645 | 29.74924714227880 | -2.26102917373649 |
-2.26102917373649 | -0.00000000014942 | 29.74924714665100 | -2.26102917373146 |
-2.26102917373146 | 0.00000000000682 | 29.74924714645160 | -2.26102917373169 |
-2.26102917373169 | -0.00000000000033 | 29.74924714646070 | -2.26102917373168 |
-2.26102917373168 | 0.00000000000003 | 29.74924714646030 | -2.26102917373168 |
-2.26102917373168 | -0.00000000000001 | 29.74924714646030 | -2.26102917373168 |
Where f(x) is applying the function to the value just found. Where f(x) = 0 is where the difference between the tangent crossing the x-axis and the graph crossing the x-axis are the same. The closest we managed to get in this case was 0.00000000000001, which is probably close enough.
So the root is -2.26102917373168 ± 0.000000000000005.
The other two roots are found in these following tables:
x | f(x) | f'(x) | x' |
0 | 2 | -14 | 0.14285714285714 |
0.14285714285714 | 0.01282798833819 | -13.67346938775510 | 0.14379530916844 |
0.14379530916844 | -0.00007910411767 | -13.67011087238190 | 0.14378952252060 |
0.14378952252060 | 0.00000049930572 | -13.67013163639910 | 0.14378955904590 |
0.14378955904590 | -0.00000000315117 | -13.67013150533860 | 0.14378955881538 |
0.14378955881538 | 0.00000000001989 | -13.67013150616570 | 0.14378955881684 |
0.14378955881684 | -0.00000000000013 | -13.67013150616050 | 0.14378955881683 |
0.14378955881683 | 0.00000000000000 | -13.67013150616050 | 0.14378955881683 |
The root found in this table is 0.143789558815385 ± 0.000000000000005.
x | f(x) | f'(x) | x' |
5 | 312 | 216 | 3.55555555555556 |
3.55555555555556 | 89.59835390946500 | 103.33333333333300 | 2.68847471127041 |
2.68847471127041 | 24.10298233491410 | 53.73954116953500 | 2.23995985962932 |
2.23995985962932 | 5.36050535730701 | 33.39674141438490 | 2.07945002752342 |
2.07945002752342 | 0.72784915149579 | 26.99646178022800 | 2.05248911844500 |
2.05248911844500 | 0.04732869754988 | 25.96689335046130 | 2.05066646307722 |
2.05066646307722 | 0.00230660109554 | 25.89776294818390 | 2.05057739742703 |
2.05057739742703 | 0.00010973435526 | 25.89438636297440 | 2.05057315966083 |
2.05057315966083 | 0.00000521425557 | 25.89422570775330 | 2.05057295829333 |
2.05057295829333 | 0.00000024775204 | 25.89421807384790 | 2.05057294872547 |
2.05057294872547 | 0.00000001177175 | 25.89421771112760 | 2.05057294827086 |
2.05057294827086 | 0.00000000055932 | 25.89421769389320 | 2.05057294824926 |
2.05057294824926 | 0.00000000002657 | 25.89421769307440 | 2.05057294824824 |
2.05057294824824 | 0.00000000000126 | 25.89421769303550 | 2.05057294824819 |
2.05057294824819 | 0.00000000000006 | 25.89421769303360 | 2.05057294824819 |
2.05057294824818 | -0.00000000000017 | 25.89421769303330 | 2.05057294824819 |
Conclusion
However, to do this at any real speed, you need to have access to a powerful computer program, or be able to do large sums quite fast. It is easy to do if you have a computer program like Excel or Autograph, but otherwise one of the other methods might be easier.
The Change of Sign method is not particularly fast. It does get to a root, but you need to produce whole tables of data for each decimal place you obtain, and this is really quite a slow process. On the plus side, it is possible to do this without any special hardware or software, a calculator and a piece of paper are enough to get to a few decimal places with this method, and if you have the time and patience, you can find many more decimal places.
The x = g(x) method is also slower than Newton Raphson in most cases. It can be quite fast, but it often depends on where you start from, however, assuming you choose a reasonable value, you get quite a good rate of convergance. This method is possible without a computer, but would be very time consuming, and it might be quicker to use the Change of Sign Method.
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