• 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

Different methods of solving equations compared. From the Excel tables of each method, we know that method 1 (change of sign method) takes 28 steps to find the root, while method 2 (Newton-Raphson method) and method 3 (rearrangement) take 4 and 17 steps r

Extracts from this document...

Introduction

Numerical Methods

Method 1: Change of sign method

Equation 1: image00.png

             →  image01.png

  Use the Autograph and it gives us the overall view of the graph of the function.

image12.png

  If we zoom in on the x and y axes, we can see that the graph shows that the equation has a root between x=0 and x=1. Bisect the interval between 0 and 1, then bisect the new interval where the sign changes and we can see that the two boundary lines get closer and closer to each other and will meet at a point finally (in theory).

image23.png

  However, in practice, we are not able to find out the exact values of the roots but we can still use this method to find the approximate values. Excel can help us with that.

 As shown in the table below by inputting initial values of a=0, b=1, we can calculate that f(a)>0, f(b)<0. Then divide the interval in half and get the midpoint c, where c=image29.png=0.5, and also the value of f(c). Since f(c)>0, we then can get a subinterval between c and b. The previous steps are then repeated. This method is applied recursively to the subinterval where the sign change occurs.

  The table below shows the data with accuracy of 8 decimal places.

a

f(a)

b

f(b)

c

f( c)

Max. error

0.00000000

2.60000000

1.00000000

-0.80000000

0.50000000

1.00000000

1.70000000

0.50000000

1.00000000

1.00000000

-0.80000000

0.75000000

0.10625000

0.90000000

0.75000000

0.10625000

1.00000000

-0.80000000

0.87500000

-0.34765625

0.45312500

0.75000000

0.10625000

0.87500000

-0.34765625

0.81250000

-0.12060547

0.22695313

0.75000000

0.10625000

0.81250000

-0.12060547

0.78125000

-0.00711670

0.11342773

0.75000000

0.10625000

0.78125000

-0.00711670

0.76562500

0.04958649

0.05668335

0.76562500

0.04958649

0.78125000

-0.00711670

0.77343750

0.02123928

0.02835159

0.77343750

0.02123928

0.78125000

-0.00711670

0.77734375

0.00706232

0.01417799

0.77734375

0.00706232

0.78125000

-0.00711670

0.77929688

-0.00002694

0.00708951

0.77734375

0.00706232

0.77929688

-0.00002694

0.77832031

0.00351775

0.00354463

0.77832031

0.00351775

0.77929688

-0.00002694

0.77880859

0.00174542

0.00177235

0.77880859

0.00174542

0.77929688

-0.00002694

0.77905273

0.00085924

0.00088618

0.77905273

0.00085924

0.77929688

-0.00002694

0.77917480

0.00041615

0.00044309

0.77917480

0.00041615

0.77929688

-0.00002694

0.77923584

0.00019460

0.00022155

0.77923584

0.00019460

0.77929688

-0.00002694

0.77926636

0.00008383

0.00011077

0.77926636

0.00008383

0.77929688

-0.00002694

0.77928162

0.00002844

0.00005539

0.77928162

0.00002844

0.77929688

-0.00002694

0.77928925

0.00000075

0.00002769

0.77928925

0.00000075

0.77929688

-0.00002694

0.77929306

-0.00001310

0.00001385

0.77928925

0.00000075

0.77929306

-0.00001310

0.77929115

-0.00000617

0.00000692

0.77928925

0.00000075

0.77929115

-0.00000617

0.77929020

-0.00000271

0.00000346

0 .77928925

0.00000075

0.77929020

-0.00000271

0.77928972

-0.00000098

0.00000173

0.77928925

0.00000075

0.77928972

-0.00000098

0.77928948

-0.00000012

0.00000087

0.77928925

0.00000075

0.77928948

-0.00000012

0.77928936

0.00000032

0.00000043

0.77928936

0.00000032

0.77928948

-0.00000012

0.77928942

0.00000010

0.00000022

0.77928942

0.00000010

0.77928948

-0.00000012

0.77928945

-0.00000001

0.00000011

0.77928942

0.00000010

0.77928945

-0.00000001

0.77928944

0.00000005

0.00000005

0.77928944

0.00000005

0.77928945

-0.00000001

0.77928945

0.00000002

0.00000003

0.77928945

0.00000002

0.77928945

-0.00000001

0.77928945

0.00000001

0.00000001

Error bound: ±0.000000005 (9dp)

The table below shows part of the formulas used in the Excel.

A

f(a)

b

f(b)

c

f( c)

0

=0.2*(A2-4)*(A2+2)*(2*A2-1)+1

1

=0.2*(C2-4)*(C2+2)*(2*C2-1)+1

=(A2+C2)/2

=0.2*(E2-4)*(E2+2)*(2*E2-1)+1

=IF(F2>0,E2,A2)

=0.2*(A3-4)*(A3+2)*(2*A3-1)+1

=IF(F2<0,E2,C2)

=0.2*(C3-4)*(C3+2)*(2*C3-1)+1

=(A3+C3)/2

=0.2*(E3-4)*(E3+2)*(2*E3-1)+1

=IF(F3>0,E3,A3)

=0.2*(A4-4)*(A4+2)*(2*A4-1)+1

=IF(F3<0,E3,C3)

=0.2*(C4-4)*(C4+2)*(2*C4-1)+1

=(A4+C4)/2

=0.2*(E4-4)*(E4+2)*(2*E4-1)+1

...read more.

Middle

0.68896484

-0.00016641

0.00025309

0.68896484

-0.00016641

0.68945313

0.00008753

0.68920898

-0.00003965

0.00012697

0.68920898

-0.00003965

0.68945313

0.00008753

0.68933105

0.00002389

0.00006359

0.68920898

-0.00003965

0.68933105

0.00002389

0.68927002

-0.00000790

0.00003177

0.68927002

-0.00000790

0.68933105

0.00002389

0.68930054

0.00000799

0.00001589

0.68927002

-0.00000790

0.68930054

0.00000799

0.68928528

0.00000005

0.00000794

0.68927002

-0.00000790

0.68928528

0.00000005

0.68927765

-0.00000393

0.00000397

0.68927765

-0.00000393

0.68928528

0.00000005

0.68928146

-0.00000194

0.00000199

0.68928146

-0.00000194

0.68928528

0.00000005

0.68928337

-0.00000095

0.00000099

0.68928337

-0.00000095

0.68928528

0.00000005

0.68928432

-0.00000045

0.00000050

0.68928432

-0.00000045

0.68928528

0.00000005

0.68928480

-0.00000020

0.00000025

0.68928480

-0.00000020

0.68928528

0.00000005

0.68928504

-0.00000008

0.00000012

0.68928504

-0.00000008

0.68928528

0.00000005

0.68928516

-0.00000002

0.00000006

0.68928516

-0.00000002

0.68928528

0.00000005

0.68928522

0.00000002

0.00000003

0.68928516

-0.00000002

0.68928522

0.00000002

0.68928519

0.00000000

0.00000002

0.68928519

0.00000000

0.68928522

0.00000002

0.68928520

0.00000001

0.00000001

0.68928519

0.00000000

0.68928520

0.00000001

0.68928520

0.00000000

0.00000000

0.68928519

0.00000000

0.68928520

0.00000000

0.68928519

0.00000000

0.00000000

0.68928519

0.00000000

0.68928519

0.00000000

0.68928519

0.00000000

0.00000000

  Since this method cannot find out all the roots, we say that it fails in this case. For the example above, it is because the three roots lie too close together. We usually ignore the other two roots when we find out one in the interval since we didn’t expect them all in such a small interval.

Method 2: Newton-Raphson method

Equation 2: image35.png

              → image02.png

  Here shows the overall view of the graph of the function.

image03.png

  Zoom in on the axes we can clearly see that using the Newton-Raphson method gives us one root efficiently.

image04.png

How does the Newton-Raphson method actually work?

image05.png

  The graph above shows a part of a function (the blue curve). Suppose we have an estimated value of a root, xn. Draw a tangent at where x=xn, which is shown in red, we can get another estimated root xn+1 which is a better approximation.

  Sinceimage06.png, we can deduce thatimage07.png.

  With the help of Excel, we can get the approximate value of the root shown above within just a few steps.

  The table below shows the data with accuracy of 8 decimal places.

x

f(x)

f'(x)

0.00000000

-1.00000000

6.00000000

0.16666667

-0.13425926

4.41666667

0.19706499

-0.00413017

4.14585394

0.19806121

-0.00000437

4.13707266

0.19806226

0.00000000

4.13706334

  And here’s the formulas used in the table:

x

f(x)

f'(x)

0

=A2*(A2-2)*(A2-3)-1

=3*A2^2-10*A2+6

=A2-(B2/C2)

=A3*(A3-2)*(A3-3)-1

=3*A3^2-10*A3+6

=A3-(B3/C3)

=A4*(A4-2)*(A4-3)-1

=3*A4^2-10*A4+6

=A4-(B4/C4)

=A5*(A5-2)*(A5-3)-1

=3*A5^2-10*A5+6

=A5-(B5/C5)

=A6*(A6-2)*(A6-3)-1

=3*A6^2-10*A6+6

  Similarly, starting with another two points, we can get the approximate values of the other two roots. The tables below show the data with accuracy of 8 decimal places as well.

x

f(x)

f'(x)

x

f(x)

f'(x)

2.00000000

-1.00000000

-2.00000000

3.00000000

-1.00000000

3.00000000

1.50000000

0.12500000

-2.25000000

3.33333333

0.48148148

6.00000000

1.55555556

-0.00137174

-2.29629630

3.25308642

0.03168108

5.21684957

1.55495818

-0.00000012

-2.29589698

3.24701358

0.00017529

5.15915579

1.55495813

0.00000000

-2.29589694

3.24697960

0.00000001

5.15883361

3.24697960

0.00000000

5.15883360

...read more.

Conclusion

-0.00848389

0.39843750

0.01212597

0.39843750

0.01212597

0.40625000

-0.00848389

0.40234375

0.00181472

0.40234375

0.00181472

0.40625000

-0.00848389

0.40429688

-0.00333621

0.40234375

0.00181472

0.40429688

-0.00333621

0.40332031

-0.00076114

0.40234375

0.00181472

0.40332031

-0.00076114

0.40283203

0.00052669

0.40283203

0.00052669

0.40332031

-0.00076114

0.40307617

-0.00011725

0.40283203

0.00052669

0.40307617

-0.00011725

0.40295410

0.00020471

0.40295410

0.00020471

0.40307617

-0.00011725

0.40301514

0.00004373

0.40301514

0.00004373

0.40307617

-0.00011725

0.40304565

-0.00003676

0.40301514

0.00004373

0.40304565

-0.00003676

0.40303040

0.00000348

0.40303040

0.00000348

0.40304565

-0.00003676

0.40303802

-0.00001664

0.40303040

0.00000348

0.40303802

-0.00001664

0.40303421

-0.00000658

0.40303040

0.00000348

0.40303421

-0.00000658

0.40303230

-0.00000155

0.40303040

0.00000348

0.40303230

-0.00000155

0.40303135

0.00000097

0.40303135

0.00000097

0.40303230

-0.00000155

0.40303183

-0.00000029

0.40303135

0.00000097

0.40303183

-0.00000029

0.40303159

0.00000034

0.40303159

0.00000034

0.40303183

-0.00000029

0.40303171

0.00000003

0.40303171

0.00000003

0.40303183

-0.00000029

0.40303177

-0.00000013

0.40303171

0.00000003

0.40303177

-0.00000013

0.40303174

-0.00000005

0.40303171

0.00000003

0.40303174

-0.00000005

0.40303172

-0.00000001

0.40303171

0.00000003

0.40303172

-0.00000001

0.40303171

0.00000001

0.40303171

0.00000001

0.40303172

-0.00000001

0.40303172

0.00000000

0.40303171

0.00000001

0.40303172

0.00000000

0.40303172

0.00000000

0.40303172

0.00000000

0.40303172

0.00000000

0.40303172

0.00000000

  Use Autograph and Excel to find the required root, and we can see that it gives us the same value of 0.40303172 (correct to 8dp).

Newton-Raphson method

Equation 3: image13.png

  We are required to find the same root which lies between x=0 and x=1.

image30.png

x

f(x)

f'(x)

0.00000000

1.00000000

-2.00000000

0.50000000

-0.25000000

-2.50000000

0.40000000

0.00800000

-2.64000000

0.40303030

0.00000373

-2.63752066

0.40303172

0.00000000

-2.63751948

 It also finds the same value of the root which is corrected to 8dp successfully.

  From the Excel tables of each method, we know that method 1 (change of sign method) takes 28 steps to find the root, while method 2 (Newton-Raphson method) and method 3 (rearrangement) take 4 and 17 steps respectively. In terms of speed of convergence, we can say that the Newton-Raphson method is the most efficient one.

  However, if we compare them in terms of ease of use with available hardware and software, the change of sign method is the easiest one to use, since it involves least calculation. In change of sign method, we just need the original equation, however, in Newton-Raphson method, we need to calculate its derivative and in rearrangement method we need to rearrange the equation to get g(x). It can be illustrated more clearly in the following table.

steps

formulas involved

Change of sign method

28

f(x)

Newton-Raphson method

4

f(x), f’(x)

Rearrangement

17

f(x), g(x)

...read more.

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

See related essaysSee related essays

Related AS and A Level Core & Pure Mathematics essays

  1. Marked by a teacher

    C3 Coursework - different methods of solving equations.

    5 star(s)

    After 19 iterations, I found the root of the equation as from then on, it repeats. So the root of the equation x=G(x) against y = x graph. Failure of Rearrangement method There are situations where this method doesn't work.

  2. Marked by a teacher

    Estimate a consumption function for the UK economy explaining the economic theory and statistical ...

    3 star(s)

    Use the same data as the previous equation to gain the equatipon.we can gain new equation as below: LC=+1.001*LY_1-0.002921*p According to the tests which display in the Table 6, we can see that the coefficients of both parameters are significant as the value of t-test are quit high.

  1. Investigate the number of winning lines in the game of connect 4.

    F=aW+b Because there are 2 layers we put in the 'First number' twice. 7=a4+b (1) 11=a5+b (2) 4=a (2)-(1) Substitute 'a' back into (1) 7=4x4+b 7=16+b B= -9 Substitute 'a' and 'b' back into original equation F=4W-9 that is the equation for getting the first number.

  2. Numerical solution of equations, Interval bisection---change of sign methods, Fixed point iteration ---the Newton-Raphson ...

    between the 2 values of interval [a, b], two columns showing f (a) < 0 and f (b) > 0 will be added on the spreadsheet. n a f(a) > 0 b f(b) < 0 m f(m) Max. possible error 1 1 1 2 -1 1.5 -1 0.5 2 1

  1. MEI numerical Methods

    must equal negative and f(b) must be positive. In the question we are provided with an interval which is 0 < x < ?/2. Lets assume K = 1 F(0) = -1 F(?/2) = a very large positive number. Our current interval is 0 < x < ?/2, in order to get a better approximation we must find the midpoint of the interval (h), and do the f(h).

  2. I am going to solve equations by using three different numerical methods in this ...

    -1.80065 0.001538(positive) Therefore, my answer is correct and it lies between this interval. Below shows the formulae for using in the Excel: A B f(a)<0 f(b)>0 (a+b)/2 y=2x�-3x�-8x+7 -2 -1 =2*B4^3-3*B4^2-8*B4+7 =2*C4^3-3*C4^2-8*C4+7 =(B4+C4)/2 =2*F4^3-3*F4^2-8*F4+7 =IF(G4>0,B4,F4) =IF(G4>0,F4,C4) =2*B4^3-3*B4^2-8*B4+8 =2*C4^3-3*C4^2-8*C4+8 =(B4+C4)/3 =2*F4^3-3*F4^2-8*F4+8 =IF(G4>0,B4,F5)

  1. Solving Equations. Three numerical methods are discussed in this investigation. There are advantages and ...

    0.025129 0.007813 9 1.523438 0.025129 1.53125 -0.00827 1.527344 0.008436 0.003906 10 1.527344 0.008436 1.53125 -0.00827 1.529297 8.43E-05 0.001953 11 1.529297 8.43E-05 1.53125 -0.00827 1.530273 -0.00409 0.000977 12 1.529297 8.43E-05 1.530273 -0.00409 1.529785 -0.002 0.000488 13 1.529297 8.43E-05 1.529785 -0.002 1.529541 -0.00096 0.000244 14 1.529297 8.43E-05 1.529541 -0.00096 1.529419 -0.00044 0.000122

  2. C3 COURSEWORK - comparing methods of solving functions

    Otherwise, it is possible for us to miss the other roots. Newton Raphson y=0.5x³+1.5x²–x–0.25 Example y=0.5x³+1.5x²–x–0.25 Graph of y=f(x) function There are roots in the intervals [-4, -3], [-1, 0] and [0, 1]. I am going to find the root in interval [-4, -3].

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