C3 COURSEWORK - comparing methods of solving functions

Authors Avatar by hugo0309 (student)

Change of signs

First of all, I would like to use change of signs method to find the roots of the function y=x³+3x²–3.

It is presented by the graph of y=f(x)

y= x³+3x²–3

By using the change of signs method, we can find out that there are 3 changes of signs in the range  [-3, -2], [-2, -1] and [0, 1]

The first 2 calculations of x³+3x²–3:

The change of sign here tells us that there is a root in the interval [0, 1], where roots are not trivial.  (f (x) not equal to zero)

Roots to f(x) =0

y= x³+3x²–3

The change of sign here tells us that there is a root in the interval [0.8, 0.9].

The change of sign here tells us that there is a root in the interval [0.87, 0.88].

The change of sign here tells us that there is a root in the interval [0.879, 0.880].

The change of sign here tells us that there is a root in the interval [0.8793, 0.8794].

The change of sign here tells us that there is a root in the interval [0.87938, 0.87939].

So to 4 d.p. the root has value 0.8794.

The solution bounds are 0.87938and 0.87939.

Error bounds: 0.879385± 0.000005.

y= x³+3x²–3

The fact is that f (0) is negative and f (1) is positive, which tells us that the graph must cross along the x axis between 0 and 1. Hence there must be a root in the range [0, 1]

F (0.87939) is positive

F (0.87938) is negative

 

This graph shows us how the root is finally trapped in the range [0.87938,0.87939].

Roots cannot be found by integer search- Failure

Reason for failure: roots are very close together in the same integer range.

y=0.7x³+3x²+2x–2.5

An integer search gives the table previous.

It shows that there is only one root in the interval [0, 1] but in fact, there are 3. Therefore, we might miss the other two after finding the first one. This reason is that the two points are too close to each other.

There are 3 root in the graph, 2 in the same interval [-3, -2] and 1 in the interval [0, 1]. However, if we do the integer search, we can only get 1 change of sign.

The search will find the first root 0.61074687 in this interval [0, 1].

In order to find all the change of signs, we better draw a graph. Otherwise, it is possible for us to miss the other roots.

Join now!

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

By using the Newton Raphson method:

If

 

Then


Therefore,

To find the root between interval [-4, -3]

Let x1=-3

 

 

 

We can see that root is near to -3.5269 to 5 sf

Using Newton Raphson and Autograph to find the root in the interval [-4,-3]:

We ...

This is a preview of the whole essay