Newton-Raphson method

X5-6x +2

The Newton raphson method is a fixed point estimation method. It is important to use an estimation of the root as a starting point.

I will give an estimation (x0) for a root of f(x) =0 I will then draw a tangent to the curve y=f(x) at the point (x0, f(x)). The point where the tangent cuts the x-axis gives a closer approximation for the root, and then the process is repeated

From this it is clear that D is a better estimation than B. We can continue this to get closer to A. From this a formula can arise to substitute the method of drawing the tangents.

The x-co-ordinate of B=x0 makes the co-ordinate of C= (x0, f(x)).

Explaining this using the triangle =

Letting DB=n and the x-co-ordinate of D be x, which means x0-n=x – the gradient of CD

= y step =f(x0)

X step n

Also =f(x0) = f ‘(x0)

n

This gives f(x0) = n

f ‘(x0)

Therefore the formula is x1= x0- f(x0)

f ‘(x0)

The interval that I am trying to find lies in the interval [1, 2]

My initial approximation is B=2

= f(x) = x5-6x+2

f ’ (x)= 5x4-6

x1= x0- x5-6x+2

5x4-6

x1= 2 – (2)5-6(2)+2

5(2)4-6

= 1.702702703

x2= 1.702702703 –(1.702702703)5- 6(1.702702703)+2

5(1.702702703)4-6

=1.533506547

x3= 1.533506547 – (1.533506547)5-6(1.533506547)+2

5(1.533506547)4-6

=1.474406026

x4= 1.474406026 – (1.474406026 )5-6(1.474406026 )+2

5(1.474406026)4-6

= 1.467530824

x5= 1.467530824– (1.467530824)5-6(1.467530824)+2

5(1.467530824)4-6

=1.467443081

After a while the values started to converge rapidly. I am confident that I can have this root to four decimal places giving error bounds.

Therefore the root is x = 1.467443089= 1.46745 + 0.00005

Results from other two roots

x0 = 0

x1 =0.334026333

x2 =0.615299538

x3 =0.348013325

x4 =0.334012999

x5 =0.334026363

x6 =0.334026364

x7 = 0.334026364

x1= -2

x2= -1.756756757

x3= -1.607996214

x4= -1.63240644

x5= -1.639214373

x6= -1.639214372

x7= -1.639214336

x8= -1.639214311

x9= -1.639214268

x10= -1.639214194

x11= -1.639214172

x12= -1.63921403

x13= -1.639213786

x14= -1.639212651

x15= -1.639212651

x16= -1.639211421

x17= -1.639209325

x18= -1.63919953

x19= -1.63919953

x20= -1.639188919

x21 = -1.639170721

.

Giving error bounds at this point -1.6391 to 4 d.p

= -1.6391+ 0.00005

Newton Raphson method failure

The Newton raphson method is a fixed point estimation method. It is important to use an estimation of the root as a starting point.

I will give an estimation (x0) for a root of f(x) =0. I will then draw a tangent to the curve y=f(x) at the point (x0, f(x)). The point where the tangent cuts the x-axis gives a closer approximation for the root, and then the process is repeated.

From this it is clear that D is a better estimation than B. we can continue this to get closer and closer to A.

From this a formula can be raised to substitute the method of drawing the tangents.

The x-co-ordinate of B=x0 makes the co-ordinate of C= (x0, f(x)).

Explaining this using the triangle =

Letting DB=n and the x-co-ordinate of D be x, which means x0-n=x – the gradient of CD

= y step =f(x0)

X step n

Also =f(x0) = f ‘(x0)

n

This gives f(x0) = n

f ‘(x0)

Therefore the formula is x1= x0- f(x0)

f ‘(x0)

The interval which the root that I am trying to find lies in [-3,-2]

Letting my initial approximation B= -2

= f(x) = x3-5x+2

f ’ (x)= 3x2-5

x1= x0- x3-5x+2

3x2-5

x1= -2- (-2)3-5(-2)+2

3(-2)2-5

Rearranging method

The equation that I will be using is: x5-4x+2

The first-step with an equation f(x) =0 is to rearrange it into the form x=g(x). Therefore, any value of x for which x=g(x) is a root of the original equation.

My equation x5-4x+2 can be rearranged in a number of different ways.

One way is 4x= x5+2 which gives x= g(x) x5 + 2

4

Plotting the graph of y=x and y=g(x) will show where the roots lie, as where the two lines cross is where the roots are.

The intervals in which my roots lie are: [-2,-1], [0, 1] [1, 2]

Consequently the interactive formula is

Xn+1= x5 + 2

4

I am now going to find the root lies in the interval [0, 1]

Taking x=1 as my starting point:

X1= 1

X2= 0.75

X3= 0.559326171

X4= 0.513685659

X5= 0.508941846

X6= 0.508536519

X7= 0.50850258

X8= 0.508499743

X9= 0.508499506

X10= 0.508499486

X11= 0.508499484

X12= 0.508499484

In this case the interaction has converged quickly for which 1 was looking for.

I will show how the convergence of the rearrangement to the root occurred, by demonstrating it graphically by a staircase diagram.

It can be said that as the gradient of the graph y=g(x) decreases it comes closer to the root

Rearranging failure

I have found that if I tried to find the root within the intervals [-2,-1] or [1, 2] I would not be able to find out as this rearrangement is not suitable because the gradient is greater than one therefore it would diverge.

For example:-

Finding root in interval [-2,-1]

Taking x= -1 as starting point

X1= -1

X2= 0.25

X3= 0.050024414

It is clear that this is a failure and is diverging to the root I found earlier

Comparison of method

to compare the effectiveness of these numerical methods, I am going to select the Newton-Rpahson I used and use the decimal search and rearranging f(x)=0 in the form x=g(x) to find the root.

The equation is x5-6x+2 and I am going to find the root that lies in the interval [1,2]

Using decimal search

Therefore root is between 1.467 and 1.468

To 3 d.p = 1.4675 + 0.0005

Using rearranging

X5 + 2

6

x1=2

x2= 5.6666666767

x3= 974.1721536

This is a failure as within the interval [1,2] the gradient is greater than 1.

Consequently, I am going to use a different rearrangement

X5-6x+2 can be rearranged into the form.

Y= g(x) =

Making the iterative formula

Xn+1=

X1= 2

X2= 1.584893192

X3= 1.496651121

X4= 1.474924955

X5=1.469374182

X6=1.467942484

X7=1.467572301

X8=1.467476526

X9=1.467451742

X10=1.467445329

X11=1.467443669

X12=1.467443239

To 3.d.p = 1.4675 + 0.0005

This rearrangement was successful due to the gradient between [1, 2] being smaller than 1.

Comparing speed of convergence

After using the function x5-6x+2 for all of the three methods I can confidently say that using the decimal search method gave the faster convergence. For instance, for x3 of decimal search I got 1.4675+ 0.0005. For Newton Raphson I got at x3 1.474406026 and for the rearrangement I got x3 1.496651121. Although Newton Raphson and the rearrangement were more accurate as it is to more decimal places. Even though the decimal search method was the most efficient it took longer to do.

Comparing methods in terms of ease of use with hardware and software

With all three methods I used a graphical calculator as my hardware. With the decimal search method I only had to be aware of where the roots lie in the intervals to be able to use the method. With Newton-Raphson method I just had to be able to check on the graphics calculator what the roots were to know whether it was converging towards the root or diverging from the root. This made me use the arrow buttons to move the curser to where the roots lie. On the contrary, with rearranging I had to plot the y=x and the function on the same graph and for this I had to use Microsoft excel. In conclusion in terms of ease of use with involved hardware and software; the decimal search was the most efficient method to use, then Newton- Raphson and the most involved one was the rearranging method.