- Level: AS and A Level
- Subject: Maths
- Word count: 2163
To apply various numerical methods to find roots of equations and to appreciate the limitations of these methods
Extracts from this document...
Introduction
Jonathan Nye R44
Maths Coursework
Jonathan Nye
The aim of this assignment is to…
Be able to apply various numerical methods to find roots of equations and to appreciate the limitations of these methods;
Know some techniques which I will find useful in other areas of mathematics and in other subjects;
Understand some of the key ideas underlying numerical analysis, a branch of mathematics in its own right.
In this coursework I am going to investigate ways of solving equations of a graph using a number of methods.
The first equation I have chosen to investigate is ‘y=2x³+5x²+x-1’ and I am going to investigate the solutions of this equation using decimal search.
Bellow is a copy of the table y=f(x) for a range of values. To find one of the roots of the equation I am going to use the decimal search method to three significant figures.
X= | Ans |
-4 | -53 |
-3 | -13 |
-2 | 1 |
-1 | 1 |
0 | -1 |
1 | 7 |
2 | 37 |
3 | 101 |
4 | 211 |
There are three changes of sign in the table above, which correspond to the three changes of roots on the graph. I am going to prove this is the case for the change in sign between y=0 and y=1
Middle
X=
Ans
-5
-256
-4
-75
-3
-8
-2
-1
-1
0
0
49
Between X=2 and X=3 we can see that there is a route, however as it is a repeated route and just touches the axis, there is no sign change, so the decimal method does not work.
The second route of the equation can be found (at X=-1) this is because the curve cuts the x-axis and there is therefore a change of sign!
Another way of solving the roots of an equation is the Newton-Raphson method.
I am going to use the equation ‘y=x³+4x²+x-3’. Below is the graph of my equation.
We can find the roots by using the Newton-Raphson method. This is where we take a series of tangents to the graph. By taking a series of tangents, we see the tangents converging to the roots.
As can be seen from the graph, there are roots between -4 and -3, -2 and -1, and 0 and 1. The root between 0 and 1 is the first I will investigate.
The Newton-Raphson formula is xn+1 = xn-(f(xn)/f’(xn).
At the point x=1 on the graph:
f(x) = x³+4x²+x-3 = 3
f(‘x) = 3x2+8x+1 = 12
So using the NR method:
Xn+1 = 1-(3/12) = 0.75
I now will use f(0.75) to find a tangent which cuts closer to the root.
f(0.75) = x³+4x²+x-3 = 0.421875
f’(0.75) = 3x2+8x+1 = 8.6875
So using the NR method:
Xn+1 = 0.75-(0.421875/8.6875) = 0.7014388489
I will now use f(0.7014388489) to find a closer tangent.
f(x) = x³+4x²+x-3 = 0.146241425
f(‘x) = 3x2+8x+1 = 8.087560168
So using the NR method:
Xn+1 = 0.7014388489-(0.146241425/8.087560168) = 0.6833565816
Using f(0.6833565816):
f(x) = x³+4x²+x-3 = -0.1296272762
f(‘x) = 3x2+8x+1 = 7.867781306
So using NR method:
Xn+1 = 0. 6833565816-(-0.1296272762/7.867781306) = 0.6998322907
Using f(0.6998322907):
(x) = x³+4x²+x-3 = 0.00164675759
f(‘x) = 3x2+8x+1 = 8.067954031
Using NR method:
Xn+1 = 0.6998322907-(0.00164675759/8.067954031)=0.6996281798
Using f(0.6996281798):
(x) = x³+4x²+x-3 = 2.5410463 E-7
f(‘x) = 3x2+8x+1 = 8.065464208
So using NR method:
Xn+1 = 0. 6996281798-(2.5410463 E-7/8.065464208) = 0.6996281483
My last two answers are the same to 5sf. (0.69963) so I can conclude that the root lies here.
Below is a table I constructed to find the other two roots.
For the root between -2 and -1:
x | xn+1 |
-1 | -1.25 |
-1.25 | -1.23913 |
-1.23913 | -1.23912 |
-1.23912 | -1.23912 |
-1.23912 | -1.23912 |
So we can deduce from the table that the root between -2 and -1 lies at the point x = -1.23913.
For the root between -3 and -4:
n | xn+1 |
-3.0000 | -3.7500 |
-3.7500 | -3.5047 |
-3.5047 | -3.4620 |
-3.4618 | -3.4605 |
-3.4605 | -3.4605 |
-3.4605 | -3.4605 |
We can tell from the table the root between -3 and -4 lies at x=-3.4605 to 5sf.
I will test the error range to this point. My answer is correct to 5sf and if I test f(x) to 0.00005 either side of my answer, I would expect to see a change of sign either side (as the curve cuts the axis).
f(-3.4605-0.00005) = -4.1707 E-4
f(-3.4605+0.00005) =5.07047985 E-4
As can be seen there IS a change of sign, so we can tell that my answer is correct.
Sometimes however the NR method doesn’t work.
Below is the graph y=1/x-2.
The blue lines surrounding my graph represent the tangents usually used to find where the curve cuts the x-axis. The blue lines are trying to find the root between where x=0 and x=1.
The tangents however are diverging so they will never find a root for itself.
This can be proved in the table below:
n | xn+1 |
1.0000 | 2.0000 |
2.0000 | 3.5000 |
3.5000 | 5.2143 |
5.2143 | 7.0225 |
7.0225 | 8.8801 |
8.8801 | 10.7675 |
10.7675 | 12.6746 |
12.6746 | 14.5957 |
14.5957 | 16.5272 |
16.52721 | 18.4667 |
18.4667 | 20.41255 |
Conclusion
Having tested all three, there is no clear winner as to which is the best for finding the roots of equation.
Newton-Raphson method is extremely quick when using Autograph although it isn’t particularly accurate, stopping at 4 decimal places. Also Autograph is a specialist program which may not always be available to us. Newton Raphson can be done on a calculator too which is easy.
Decimal Search is, I believe, the easiest.
Once the equations are set up on Excel (a far more common program than Autograph) it is easy to find the roots by looking for the change in sign.
This can also be done on the table function of a calculator which is quick and easy too. The decimal search method is, I would say, more readily accessible as no rare programs are needed.
Finally is the rearrangement method. This, like the other two is not particularly complicated. It is the hardest of the three however. Once the curve has been rearranged it is easy to put into an Excel sheet but of the three it is the most likely to fail as it cannot cope with steep gradients.
Newton-Raphson is pretty robust although it can trip up on 1/x curves.
Of the three, decimal search is, in my opinion, the best as it is quick, simple and doesn’t fail easily.
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