You are on page 1of 5

Newton Rhapson coursework

4 x3 3x 2 7 x + 2

To find the roots to this function (which cannot be solved analytically) I am going to use the Newton Rhapson method for finding an equations root. As can be seen from the graph below the function has 3 roots. These lie between the intervals of [-2 and-1] [0 and 1] [1 and 2]

I will first use the method to find the interval at [-2 and -1] The Newton rapson method basically involves dividing the function of x by the differential of that function, graphically the method works via a process of tangent sliding, with each iteration of the method becoming more accurate. Put algebraically the method looks as shown below.

f ( xr ) xr +1 = xr f ' ( xr )
As we already know

f ( x) = 4 x 3 3x 2 7 x + 2
To find f(x) I differentiated the original f(x) function 2

f ' ( x) = 12 x 6 x 7

Seeing as the root is between -2 and -1 I will start with the value of -1.5 as a guess 3 2 4 x 3 xn 7 xn + 2 xn n 2 12 xn 6 xn 7 x1 = 1.5 143 116 x3 = 1.156364964 x2 = x4 = 1.149980148 x5 = 1.149936586 x6 = 1.149936584 x7 = 1.149936584

As the last two results matched the method has been successful in finding a root between [2 and -1] If I state that x= 1.149936584
1.1633805383 5 x < 1.1499365834 5

Then the maximum possible error is 0.0000000005

Newton rhapson method for the root in between

[0 and 1] Taking x1 to be 0.5 as a logical guess xn 4 xn 3 xn 7 xn + 2 2 12 xn 6 xn 7


3 2

x1 = 0.5 x2 = 0.25 33 124 x4 = 0.2661311988 x3 = x5 = 0.2661311988 If I state that x= 0.2661311988 0.2661311987 5 x < 0.2661311988 5 Therefore the maximum possible error is 0.00000000005

Newton Rhapson for the root between [1 and 2] Taking 1.5 as a logical guess xn 4 xn 3xn 7 xn + 2 12 x n 6 x n 7
2 3 2

x1 = 1.5 73 44 x3 = 1.634473835 x2 = x 4 = 1.633805872 x5 = 1.633805385 x6 = 1.633805385 If I state that x=1.633805385 Then 1.6338053845 x < 1.6338053855 The maximum possible error is therefore 0.0000000005

Below is a graphical illustration of the Newton Rhapson method when used to find my [0 and 1] root The purple represents the Newton Rhapson iterations
0.2 0.1 0.1 0.2 0.3

x 0.4

Failures of the Newton Rhapson method With certain graphs the Newton Rhapson method will fail to find a root

1 3 The function (5 x 4 x + 12) Is an example of such a failure 3 2

f ( x) = (5 x 3 4 x 2 + 12) 3 f ' ( x) =
1 (5 x 3 4 x 2 + 12) 3 (15 x 2 8 x) 3 2

Therefore the overall function is as stated below


3(5 x n 4 x n + 12 ) xn 15 x 2 8 x
3 2

So that

x1 = 0.2631579 x 2 = 11 .362115 x3 = 0.2369536 x 4 = 33 .961087 x5 = 0.2688072 x6 = 0.2688076

I can see the method is diverging from the root and alternating between two different values, illustrated above. This means that I would never achieve a root no matter how long I persisted for. It is in cases like this that the Newton Rhapson method fails.

You might also like