Functions Coursework - A2 Maths

Authors Avatar

C3 Coursework: Numerical Analysis

Change of sign method

I want to find the roots of the equation x3-3x-1=0 to five decimal places.

Consider the function f(x)=x3-3x-1; hence I want to find the roots of the equation f(x)=0.

If the function is continuous in the interval [a,b], where a and b are values x could take, and either:

f(a)<0 and f(b)>0

or:

f(a)>0 and f(b)<0

then there must be at least one root of the equation f(x)=0 in the interval [a,b]. Therefore we are looking for a change of sign, which will then indicate the interval in which there lies a root of the equation f(x)=0.

The table shows values of f(x) at integer values of x from -5 to 5.

We can identify 3 intervals which have a change of sign:

[-2,-1],[-1,0] and [1,2]

If we sketch the graph of the function, i.e. y=f(x), the x values at the point where y=0 are the roots to the equation f(x)=0, since y=f(x). Three roots are confirmed in these intervals i.e. each interval contains one root.

The gradient formula can be calculated: f′(x)=3x2-3

f′(5)=72, and after x=5, the gradient formula shows that the gradient just continues to increase with increasing x therefore the curve y=f(x) never crosses the x-axis after x=5.

f′(-5)=72, and for any x value lower than x=-5, the gradient formula shows that the gradient just continues to increase with decreasing x, therefore the curve y=f(x) never crosses the x-axis before x=-5.

Therefore there are no roots of the equation f(x)=0 with x>5 or x<-5. Therefore there are only 3 roots to the equation.

Using Microsoft Excel, one can conduct the decimal search method, which works by observing the change of sign, repeatedly to find the root to a few decimal places.

One can see that there is a change of sign, and therefore a root of f(x)=0, between x=1 and x=2. If I wanted to find the root of the equation between x=1 and x=2 to five decimal places, I would do the following:

The change of sign method will be applied for values of x between 1 and 2, taking 0.1 to be the interval in x values. The table shows values of f(x) at values of x from 1 to 2, with intervals of 0.1.

As one can deduce above, the root lies in the interval [1.8,1.9]. We have therefore found the root to 0 decimal places, which equals 2. One can not determine the root at this stage to 1 decimal place because either:

 x<1.85, in which case the root would be x=1.8 to 1 decimal place

or:

x≥1.85, in which case the root would be x=1.9 to 1 decimal place

This process can be repeated as many times to get the root to a desired number of decimal places.

To illustrate the fact that the root lies in the interval [1.8,1.9], part of the graph of y=f(x) is drawn.

Between x=1 and x=2, the graph crosses the x-axis visibly between x=1.8 and x=1.9. This means that between x=1 and x=2, y=f(x)=0 for a value of x in the interval [1.8,1.9], i.e. a root of the equation f(x)=0 lies in the interval [1.8,1.9].

The root lies in the interval [1.8,1.9]. The next table show values of f(x) at values of x from 1.8 to 1.9, with intervals of 0.01.

The root therefore lies in the interval [1.87,1.88].

To illustrate the fact that the root lies in the interval [1.87,1.88], part of the graph of y=f(x) is drawn.

The graph crosses the x-axis visibly between x=1.87 and x=1.88. This means that between x=1 and x=2, y=f(x)=0 for a value of x in the interval [1.87,1.88] i.e. a root of the equation f(x)=0 lies in the interval [1.87,1.88]. The rest of the method could also be illustrated graphically in this way.

The next table show values of f(x) at values of x from 1.87 to 1.88, with intervals of 0.001.

The root therefore lies in the interval [1.879,1.880]. The next table show values of f(x) at values of x from 1.879 to 1.880, with intervals of 0.0001.


The root therefore lies in the interval [1.8793,1.8794]. The next table show values of f(x) at values of x from 1.8793 to 1.8794, with intervals of 0.00001.

The root therefore lies in the interval [1.87938,1.87939]. The next table show values of f(x) at values of x from 1.87938 to 1.87939, with intervals of 0.000001.

Join now!

The root therefore lies in the interval [1.879385,1.879386]. Therefore the root of the equation f(x)=0, in the interval [1,2] is:

x=1.87939 to five decimal places.

I have confirmed that this root is correct to five decimal places because I have confirmed that it lies in the interval [1.879385,1.879386]. This means that

1.879385<x<1.879386;

This directly tells us that x>1.879385, therefore x is not less than 1.87939 to five decimal places because it is equal to at least 1.87939 to five decimal places.

It also implies that x<1.879395, confirming that x is not greater than or equal to 1.87940 ...

This is a preview of the whole essay