• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month

# 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. 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.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.8 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.83 0.831 0.832 0.833 0.834 0.835 f(x) -0.044089 -0.0392119 -0.0343209 -0.0294159 -0.0244969 -0.0195639
 x 0.836 0.837 0.838 0.839 f(x) -0.0146168 -0.00965574 -0.00468058 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.838 0.8381 0.8382 0.8383 0.8384 0.8385 f(x) -0.00468058 -0.00418229 -0.00368386 -0.00318529 -0.00268658 -0.00218773
 x 0.8386 0.8387 0.8388 0.8389 0.839 f(x) -0.00168873 -0.0011896 -0.000690319 -0.000190901 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. 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: 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. 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. The values that were obtained are as follows: ### 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. ### 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. My chosen starting value, x0, will be 2.

The following table was constructed using a Microsoft Excel spreadsheet with the formulae displayed: The values that were obtained are as follows: ...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. The values that were obtained are as follows: 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

# Related AS and A Level Core & Pure Mathematics essays

1.  ## The Gradient Function

5 star(s)

- Vx x + h -x h V (x+h) - Vx x (V (x+h) + Vx) = (x+h) - x h (V (x+h) + Vx) h (V(x+h) + Vx) I have multiplied this fraction to rationalize it, because (a-b) (a+b) = a� + b� = h = 1 = 1 h(V(x+h)

2. ## MEI numerical Methods

This will be significant later. However from this we can conclude that the false position method does not have a first order convergence. Method of bisection: If we apply the first order of convergence principles to this method we get the following: Unlike the secant and false position method, the method of bisection has a constant value of K, 0.5.

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

= 0. x -2 -1 0 1 2 3 f (x) -29 -1 5 1 -1 11 Table1.2 From the table1.2 above, it can be seen that the roots lie in the interval of [-1, 0], [1, 2] and [2, 3] Here, I can take a=1 and b=2, whereas the mid-value is taken as (a+b)

2. ## Best shape for gutter and further alegbra - using Excel to solve some mathematical ...

The benefit of the replication of formulae is also a benefit to using a spreadsheet in question 2. The first two rows were calculated first using the formula given in the table on the previous page. By filling down with this formula, the other rows contain the same calculation for

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

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 Failure in this method This method cannot always be applied to every equation successfully.

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

If my prediction is correct, my calculations above have found a wrong root (the blue arrow), which is not the root I want (the green arrow). The Decimal Search method has failed to find the root that I want from 5x^4+x�-2x�-0.1x+0.1=0.

1. ## Numerical integration can be described as set of algorithms for calculating the numerical value ...

If the number of rectangles is doubled M2n the height of each is halved (h/2). According to www.enm.bris.ac.uk the absolute error is proportional to h2. Absolute error ? h2 Absolute error = kh2 As a result in the first situation where Mn rectangles are used each of height h, the error is Mn= kh2.

2. ## The Gradient Fraction

16 9 4 1 0 1 4 9 16 y 16 9 4 1 0 1 4 9 16 This graph will have a parabola, as it is a graph of a quadratic equation. The powers in quadratic equations are always greater than 1. • Over 160,000 pieces
of student written work
• Annotated by
experienced teachers
• Ideas and feedback to
improve your own work 