• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month
Page
1. 1
1
2. 2
2
3. 3
3
4. 4
4
5. 5
5
6. 6
6
7. 7
7
8. 8
8
9. 9
9
10. 10
10
11. 11
11
12. 12
12
13. 13
13

# 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

Not the one? Search for your essay title...
• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month

# Related AS and A Level Core & Pure Mathematics essays

1. ## C3 Coursework - different methods of solving equations.

5 star(s)

If the gradient function is zero, that will mean that the denominator is 0 and that is an impossible fraction. Comparisons of the methods: Now to compare the effectiveness of all the methods, I will attempt to solve exactly same equation, using all three methods.

5 star(s)

Here, it is a little hard to prove this in the normal sense as (x+h) is square rooted, so I will need to rationalize the numerator. V (x+h) - Vx = V (x+h) - Vx x + h -x h V (x+h)

1. ## MEI numerical Methods

=arctan(1-x(n))/k, the rearranged form can be described as H(x). In order to find the roots, I would use a sensible starting number, I will choose ?/4 and carry out multiple iterations on H(x) and g(x) to see if there's more than just one root. I will make a spreadsheet with formulas that satisfy both H(x)

2. ## Numerical solutions of equations

I choose my starting value of x (x1) to be about -1.3. x1 = -1.3 x2 = -4.22079 x3 = not defined x4 = Another example where the Newton-Raphson method would fail is with the function x3-5x+0.1=0. The graph of this, along with the calculations is shown below: f(x)

1. ## This coursework is about finding the roots of equations by numerical methods.

These are the error bounds. Approximate value of root The root is 2.5615 to 4 decimal places. Illustrate the method graphically x -3 -2 -1 0 1 2 3 4 F(x) -38 -6 4 4 0 -2 4 24 The fact that f(2)

2. ## C3 Numerical Solutions to Equations

5 and 6 using 5 as the starting point, the iterations converge on the root between 1 and 2. using 6 as the starting point causes the iterations to diverge away from the root. Both examples are shown below. Comparison of Methods The methods will be compared using the equation

1. ## C3 COURSEWORK - comparing methods of solving functions

Then Find the root between interval [0, 1], Let X1 be 1, n xn 1 1.00000 0.88889 2 0.88889 0.87945 3 0.87945 0.87939 4 0.87939 0.87939 5 0.87939 0.87939 The root is 0.87939±0.000005 f(0.879385) = 0.879385241 f(0.879395) = 0.879385241 The root is trapped between 0.879385 and 0.879395.

2. ## Evaluating Three Methods of Solving Equations.

This is because of the gradient at the root. If the gradient of the curve at the root is less than -1, then the cobweb expands, so the iterations will never approach the root. Comparisons: To make a comparison of the three methods, I decided to take the formula x3-3x2-15x-12 for which I have earlier applied the fixed point iteration method.

• Over 160,000 pieces
of student written work
• Annotated by
experienced teachers
• Ideas and feedback to