• 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
  14. 14
    14
  15. 15
    15
  16. 16
    16
  17. 17
    17
  18. 18
    18
  19. 19
    19
  20. 20
    20
  21. 21
    21

Change of Sign Method.

Extracts from this document...

Introduction

Pure Mathematics 2                                                                                        Katie Ruck

Solution of Equations by Numerical Methods

Change of Sign Method

If we let f(x)=3x³-0.5x²-0.5x-1, in order to solve this equation and determine its roots, it is necessary for it to be written in the form 3x³-0.5x²-0.5x-1=0.

The root of the equation f(x)=0 is indicated where y=f(x) crosses the x-axis.

Roots of the equation 3x³-0.5x²-0.5x-1=0, will be found to a three decimal place accuracy.

image00.png

        Having illustrated the equation graphically using Autograph, it is evident that the equation has only root that lies between the interval [0,1].

        Before proceeding, it is necessary to check that there is a sign change in the above interval:

f(0) = 0-0-0-1= -1

f(1) = 3-0.5-0.5-1 =1

        The method that will be used for the numerical solution of the equation is the decimal search method.

        I will first take the increments in x of size 0.1 within the interval [0,1], calculating the value of the function 3x³-0.5x²-0.5x-1 for each one, until a change of sign is found.

x

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

f(x)

-1

-1.052

-1.096

-1.114

-1.088

-1

-0.832

-0.566

-0.184

0.332

        The above table illustrates that there is a sign change.  It can therefore be understood that the root lies in the interval [0.8,0.9].

        Having narrowed down the interval, I will continue with the decimal search, but now using increments of 0.01 within the interval [0.8,0.9].

x

0.80

0.81

0.82

0.83

0.84

f(x)

-0.184

-0.138727

-0.092096

-0.044089

0.005312

        This indicates that the root lies in the new interval [0.83,0.84].

I will continue the process using the increments of 0.001 within the interval [0.83,0.84].

x

0.830

0.831

0.832

0.833

0.834

0.835

f(x)

-0.044089

-0.039211927

-0.034320896

-0.029415889

-0.024496888

-0.019563875

x

0.836

0.837

0.838

0.839

f(x)

-0.014616832

-0.009655741

-0.004680584

0.000308657

The root therefore lies in the interval [0.838,0.839].  I shall now use increments of 0.0001 in the interval [0.838,0.839].

x

0.8380

0.8381

0.8382

0.8383

0.8384

0.8385

f(x)

-0.004680584

-0.00418229398

-0.0036838631

-0.00318529134

-0.00268657869

-0.00218772512

x

0.8386

0.8387

0.8388

0.8389

0.8390

f(x)

-0.00168873063

-0.00118959519

-0.00069031878

-0.00019090139

0.000308657

        Therefore the root lies between 0.8389 and 0.8390.  To three decimal places, the root = 0.839.

Error Bounds

        A change of sign method such as the one used, provides bounds within which a root lies so that the maximum possible error in a result is known.

When x = 0.8385, f(0.8385) = -0.00218772512

When x = 0.8395, f(0.8395) = 0.00280856463

The error bounds of the root 0.839 are 0.839 ± 0.0005.

        However, I am able to say that I have a more accurate solution, as I know that the root lies in the interval [0.8389,0.8390].

Failure of the Change of Sign Method

        There are a number of situations that can cause problems for change of sign methods.  For example, let y=f(x)=x³-2x²-x+2.63.  

        This curve is shown graphically below.

image01.png

        With this example I shall use the decimal search method to find a change of sign and so investigate the roots of the previous equation.  Integers will be used as the x-values.

x

-2

-1

0

1

2

3

f(x)

-11.37

0.63

2.63

0.63

0.63

8.63

        From the graph it is evident that the equation x³-2x²-x+2.63=0 has more than one root, i.e. roots that lie in the intervals [-2,-1] and [1,2].  However, the above table illustrates that the method used only detects one such root that lies in the interval       [-2,-1].

        In this case, using the method of decimal search has caused an incorrect conclusion to be reached.  This is because the curve touches the x-axis between x=1 and x=2, therefore there is no change of sign and consequently all change of sign methods are doomed to failure.

Fixed Point Iteration Method

        Let y=f(x)=x3+2x2-4x-4.58.  The graph is shown below:

image12.png

        The roots of the equation can be found where f(x)=0.  From the graph, it is evident that the roots of the equation lie in the intervals [-3,-2],[-1,0] and [1,2].

        Using a sign change search verifies that the intervals within which the roots lie are indeed [-3,-2],[-1,0] and [1,2]:

x

-4

-3

-2

-1

0

1

2

3

4

f(x)

-

-

+

+

-

-

+

+

+

...read more.

Middle

x0=-1 into the iterative formula to find the value of x.

image24.png

        A line is drawn from x0to equation 1, and then ‘followed across’ to the closest point on equation 2.  Repeating the former process will cause the values where the line meets each of the two equations to come closer together until they converge at the point where the two curves intersect, and therefore at a root.  The iterative formula calculates these values as they converge.

xr+1 = ¼( x3r+2x2r-4.58)

x1 = ¼(( -1)3+2(-1)2-4.58)

=¼(-1+2-4.58)

=¼(-3.58)

x1 = -0.895

        The following table was obtained using a Microsoft Excel spreadsheet, with the formulae shown.  The sequence works using this particular iterative formula because when the gradient of y=g(x) is less that 1, y=x is used as a ‘barrier’ and makes the sequence converge thus allowing the root to be found.

image25.png

        The values that were obtained are as follows:

image26.png

Error Bounds

        Therefore the root to the equation between the interval [-1,0] is –0.9172560 correct to seven decimal places.

        To check that this is correct, substitute

x= -0.91725595 into f(x)

= -0.00000031423

and

x= -0.91725605 into f(x)

= 0.000000200258

The above calculations illustrate that there is a change of sign.  Therefore the root is    -0.9172560±0.00000005.

image27.png

Failure of the Fixed Point Iteration Method

I will now attempt to find the root that lies in the interval [1,2] of the same equation.  As before, the Fixed Point Iteration method will be applied.

image28.png

        My chosen starting value, x0, will be 2.

The following table was constructed using a Microsoft Excel spreadsheet with the formulae displayed:

image29.png

The values that were obtained are as follows:

image02.png

...read more.

Conclusion

–0.917± 0.0005.

Fixed Point Iteration Method

        The equation has already been solved to find the root that lies in the interval    [-1,0] using this method.  The following steps show how this was done.  If y=f(x)=x3+2x2-4x-4.58 then the roots of the equation can be found where f(x)=0.  It is first necessary to look for a sign change between integer values so as to choose a suitable starting value.

x

-4

-3

-2

-1

0

1

2

3

4

f(x)

-

-

+

+

-

-

+

+

+

        I have chosen to find the root that lies in the interval [-1,0] and therefore an appropriate starting value, x0, for the approximation of the root would be –1.  When using the Fixed Point Iteration method, the previous equation must be rearranged into the form x=g(x):

x3+2x2-4x-4.58=0

x3+2x2-4.58=4x

¼( x3+2x2-4.58)=x

Therefore the iterative formula for this equation is:

xr+1 = ¼( x3r+2x2r-4.58)

        For the method to succeed, the iterative formula must converge for the chosen value of x.  To ensure that this is so, the iterative formula was differentiated, and it was checked that the x0 value gave a result that was less than one:

y=0.25x3+0.5x2-1.145

dy

   dx

substituting x=-1 gives 0.75(-1)2 + (-1)

= 0.75 – 1

= -0.25

        The fact that this value is less than 1, tells us that the chosen value of x0 will lead to a root of the equation.

        The following table was obtained using a Microsoft Excel spreadsheet, with the formulae shown.  

image21.png

        The values that were obtained are as follows:

image22.png

        Therefore the root to the equation between the interval [-1,0] is –0.917 correct to three decimal places.

When x = -0.9165,  f(-0.9165) = -0.00389006712

When x = -0.9175, f(-0.9175) = 0.00125526563

The error bounds of the root –0.917 are –0.917 ± 0.0005.

...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

    The Gradient Function

    5 star(s)

    However, here h tends to 0. All terms here contain an h value, apart from 3x�. So therefore it simplifies to... 3x� + (3 x 0 x x) + 0� = 3x�. Therefore, this is the gradient function. This also corresponds to the increment methods in the tables.

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

    =(B8+C8)/2 =(D8-1)*(D8+2)*(D8-3)-1 =ABS(C8-B8)/2 =A8+1 =IF(E8>0,D8,B8) =IF(E8<0,D8,C8) =(B9+C9)/2 =(D9-1)*(D9+2)*(D9-3)-1 =ABS(C9-B9)/2 =A9+1 =IF(E9>0,D9,B9) =IF(E9<0,D9,C9) =(B10+C10)/2 =(D10-1)*(D10+2)*(D10-3)-1 =ABS(C10-B10)/2 =A10+1 =IF(E10>0,D10,B10) =IF(E10<0,D10,C10) =(B11+C11)/2 =(D11-1)*(D11+2)*(D11-3)-1 =ABS(C11-B11)/2 =A11+1 =IF(E11>0,D11,B11) =IF(E11<0,D11,C11) =(B12+C12)/2 =(D12-1)*(D12+2)*(D12-3)-1 =ABS(C12-B12)/2 =A12+1 =IF(E12>0,D12,B12) =IF(E12<0,D12,C12) =(B13+C13)/2 =(D13-1)*(D13+2)*(D13-3)-1 =ABS(C13-B13)/2 =A13+1 =IF(E13>0,D13,B13) =IF(E13<0,D13,C13) =(B14+C14)/2 =(D14-1)*(D14+2)*(D14-3)-1 =ABS(C14-B14)/2 =A14+1 =IF(E14>0,D14,B14)

  1. MEI numerical Methods

    Formula used for spreadsheet: Proof of root: Another way to check the root is to check the upper and lower bounds of the interval in which my root lies in. The interval in which the root has to lie in is, 0.4797310065 < x < 0.4797310075 (this is due to the error being � 0.0000000005, as explained later)

  2. Experimentally calculating the wavelength of an He-Ne laser by means of diffraction gratings

    fringes for diffraction gratings Diffraction Grating Spacing Distance Between Central Beam and Fringes (� 0.002m) 1st order (� 0.002m) 2nd order (� 0.002m) 3rd order (� 0.002m) 600 lines/mm 2.080 N/A N/A 300 lines/mm 0.573 1.228 2.122 100 lines/mm 0.303 0.605 0.915 Note: the distance between the central beam and

  1. Using Decimal search

    -2.11397 Xn+1 -2.23301 -2.13110 -2.11441 -2.11397 -2.11397 - Graph 9 - We can express this information as; the root can be taken as -2.11397 with maximum error of + 0.000005. Therefore -2.113965 < X < -2.113975. To check for the different signs, f(-2.113965)

  2. Analyse the use of three methods which are called the: change of sign, Newton-Raphson ...

    However, if we use 4.d.p as a sensible level of accuracy, we wud say the root is= 1.0585 < x < 1.0586 Where the change of sign method fails However this method may not always be able to find the root of an equation.

  1. Different methods of solving equations compared. From the Excel tables of each method, we ...

    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

  2. The method I am going to use to solve x&amp;amp;#8722;3x-1=0 is the Change ...

    I can stop it as I just want a root correct to 3 decimal place only and the accuracy is reasonable as if I correct the 4 or even more decimal place, it will be too complicated to find as it need so many steps to repeat.

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