• 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
  22. 22
    22
  23. 23
    23

C3 COURSEWORK - comparing methods of solving functions

Extracts from this document...

Introduction

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)image12.png

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]

x³+3x²–3

-3

-3

Change of sign

-2

1

-1

-1

Change of sign

0

-3

Change of sign

1

1

2

17

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)

image12.png

Roots to f(x) =0

y= x³+3x²–3

x

x³+3x²–3

0

-3

0.1

-2.969

0.2

-2.872

0.3

-2.703

0.4

-2.456

0.5

-2.125

0.6

-1.704

0.7

-1.187

0.8

-0.568

Change of sign

0.9

0.159

1

1

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

x

y=x³+3x²–3

0.8

-0.568

0.81

-0.50026

0.82

-0.43143

0.83

-0.36151

0.84

-0.2905

0.85

-0.21838

0.86

-0.14514

0.87

-0.0708

Change of sign

0.88

0.004672

0.89

0.081269

0.9

0.159

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

x

y=x³+3x²–3

0.87

-0.0708

0.871

-0.0633

0.872

-0.05579

0.873

-0.04827

0.874

-0.04074

0.875

-0.0332

0.876

-0.02565

0.877

-0.01809

0.878

-0.01051

0.879

-0.00293

Change of sign

0.88

0.004672

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

x

y=x³+3x²–3

0.879

-0.00293

0.8791

-0.00217

0.8792

-0.00141

0.8793

-0.00065

Change of sign

0.8794

0.000112

0.8795

0.000872

0.8796

0.001632

0.8797

0.002392

0.8798

0.003152

0.8799

0.003912

0.88

0.004672

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

x

y=x³+3x²–3

0.8793

-0.00065

0.87931

-0.00057

0.87932

-0.0005

0.87933

-0.00042

0.87934

-0.00034

0.87935

-0.00027

0.87936

-0.00019

0.87937

-0.00012

0.87938

-4E-05

Change of sign

0.87939

3.61E-05

0.8794

0.000112

...read more.

Middle

4

-3.52734

-3.52688

5

-3.52688

-3.52688

6

-3.52688

-3.52688

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]:image19.png

We now are using the Newton Raphson and Autograph to find the other two roots.

I can see that the other roots lie within these intervals [-1, 0] and [0, 1]:

From the table below, I can find out that the root in the interval of [-1, 0] is near to             0-3.5269 of 5 significant figures.

n

xn

image03.png

1

-1.00000

-0.30000

2

-0.30000

-0.20283

3

-0.20283

-0.19613

4

-0.19613

-0.19609

5

-0.19609

-0.19609

On the other hand, from the table below, I can find out that the root in the interval of        [0, 1] is near to –0.19609 of 5 significant figures.

n

xn

image03.png

1

1.00000

0.78571

2

0.78571

0.72753

3

0.72753

0.72300

4

0.72300

0.72297

5

0.72297

0.72297

6

0.72297

0.72297

Graphical Interpretation of the Newton Raphson method

Example: y=2x y=0.5x³+1.5x²–x–0.25    

Graph of y=f(x)image20.png

I will first use the method to find the root at the interval [-3, -4]

y=0.5x³+1.5x²–x–0.25

X2

X3

X4

X1

At first, let’s start with a close approximation, let  X1= -3, on the x-axis (shown on the graph above), draw a verticle line until it meet y=0.5x³+1.5x²–x–0.25.

When the line met the curve, a tangent is drawn and extended until it meets the x-axis and there is a new point on the x-axis, called X2, which is equal to -3.7858.

From X2, draw a vertical line until it meet the curve y=f(x). When the line met the curve, a tangent is drawn and extended until it meets the x-axis and it is a new point on the x-axis, called X3, which is equal to -3.5566.

From X3, draw a vertical line until it meet the curve y=f(x). When the line met the curve, a tangent is drawn and extended until it meets the x-axis and it is a new point on the x-axis, called X4, which is equal to -3.5273.

This procedure is repeated and the points generated on the x axis get nearer and nearer to the root.

At last, I can see that Newton Raphson converges to a value near to -3.5269.

Error Bounds

We need to use the change of sign method to trap the root between two solution bounds

I evaluate f(-3.52695) and f(-3.52685):

f(-3.52685)=-0.00051

f(-3.52695)=0.000193

This change of sign shows that the root must be between these two values. Therefore,

I can state that the error bounds are -3.52695 and -3.52685

I can also write the solution bounds as the error bounds-3.5269±0.00005

I can see that all values in the range (-3.52685, -3.52695) round to -3.5269. Therefore, I can say that the root is -3.5269to 5 sig.figs.

Failure Case

Example: y= (0.5x³+1.5x²–x–0.25)1/3

Reason cause to failure is that the graph crosses the x axis with a very steep gradient

Graph is y=f(x)

The steep crossing points were caused by the power 1/3

On the graph, the Newton Raphson method will fail to reach a rootimage21.png

y= (0.5x³+1.5x²–x–0.25)1/3

X3

X2

X1

Newton Raphson method does not work everytime. Newton Raphson method will fail when I consider operating the process on the function f(x) = x1/3, start with the initial value x=-3.

As you can see, from the start point of -3, the values of Xn become further and further away from the root between -3.52695 and -3.52685. This is because of the steep gradient where the graph crosses the x-axis, meaning that the resulting tangent is directed further away from the root.

x=g(x) method

image22.png

y=0.8x³+2x²–x–1

I am now using the example y=0.8x³+2x²–x–1 to illustrate the method of x=g(x).

Graph of y=f(x) function

Now, rearrangement of the equation f(x) =0 to the form x = g(x)

I have got the function y=0.8x³+2x²–x–1,

Therefore, 0.8x³+2x²–x–1= 0

                   0.8x³= -2x²+x+1

image05.png

At last, I can see that image06.png

Use the example 0.8x³+2x²–x–1= 0 and find the root in the interval [-3, -2], let X1 = -3,

image07.png

image08.png

By using x=g(x), I can find the root in the interval [-3,-2]

X

image06.png

-3

-2.924017738

-2.924017738

-2.875647098

-2.875647098

-2.844605553

-2.844605553

-2.824579887

-2.824579887

-2.811616438

-2.811616438

-2.803205853

-2.803205853

-2.797741161

-2.797741161

-2.794187153

-2.794187153

-2.79187434

-2.79187434

-2.790368641

-2.790368641

-2.789388135

-2.789388135

-2.788749524

-2.788749524

-2.788333544

-2.788333544

-2.788062564

-2.788062564

-2.787886031

-2.787886031

-2.787771023

-2.787771023

-2.787696097

-2.787696097

-2.787647282

-2.787647282

-2.787615479

-2.787615479

-2.787594759

-2.787594759

-2.787581259

-2.787581259

-2.787572464

-2.787572464

-2.787566734

-2.787566734

-2.787563001

-2.787563001

-2.787560569

-2.787560569

-2.787558984

-2.787558984

-2.787557952

-2.787557952

-2.787557279

-2.787557279

-2.787556841

-2.787556841

-2.787556555

-2.787556555

-2.787556369

-2.787556369

-2.787556248

-2.787556248

-2.787556169

-2.787556169

-2.787556118

-2.787556118

-2.787556084

From the table above, I can see that root is near to -2.7876 to 5 sf

Illustrating the convergence using x = g(x) by using Autograph.image13.png

y= x

X1

X2

X3

X4

X5

y=  image09.png

First of all, we can see that the root is near -1, so start at a point x1 , which is -1, on the x axis line and draw a line vertically downwards to meet the curve y=f(x).

When the line meets the curve y= f(x), a horizontal line is drawn to meet the line y= x.

The x co-ordinate of this new point becomes x2

From x2, we draw a line vertically downwards until it meet the curve y= f(x) again. And a horizontal line is drawn and meet the straight line y=x.

The x co-ordinate of this new point becomes x3

These steps will repeat and new points are generated nearer and nearer to the point of interception of y=x and y=g(x) which is the root of equation of f(x) =0

Examining g’(x) graphically

y=x so gradient 1

image13.png

We can see 0<g’(x)<1

Root to f(x) =0

Since 0<g’(x)<  1 we expect to get staircase convergence and it is a success staircase and the result is the same as the expectations.

A rearrangement of the same equation is applied in a situation where the iteration fails to converge to the required root

Roots are given by 0.8x³+2x²–x–1= 0,

Then, make a new rearrangement of the function f(x)= 0 to the form x = g(x)

0.8x³+2x²–x–1= 0

Then x= 0.8x³+2x²–1

xn+1= 0.8xn3+2 xn2-1

To find root in the interval [0, -1]

Let X1=0,

n

x

0.8xn3+2 xn2-1

1

0

-1

2

-1

0.2

3

0.2

-0.9136

4

-0.9136

0.05929

5

0.05929

-0.9928

6

-0.9928

0.188464

7

0.188464

-0.92361

...read more.

Conclusion

Nevertheless, if we cannot see there is going to be a clear change of signs, Newton Raphson method would probably the quickest method among three of them, though it may be a bit complicated.

If you also have Excel

All these methods can be carrying out simply by using the spreadsheet such as Excel. But among the three methods, I think change of signs method should be chosen as the easiest and quickest one. There isn’t any iteration and rearrangement involved in the formulae and it is very easy to enter all the information into Excel.

Whereas we need to rearrange the formulae for Newton Raphson method and x=g(x) method, which we may enter the wrong figure into Excel by mistake and it is really complicated.

If you also have Autograph

Obviously, we can find the roots in no time by using Autograph. For change of signs method, we simply draw a graph by using Autograph and find the roots when f(x) = 0.  It’s very easy for us to use autograph and it just involves one step. After finding the roots, we can leave Autograph and use Excel to proof the rest of the change of signs method.

For other two methods, we need to do more steps. For example, we need to set up another equation y=x in x=g(x) so that we can continue to do the rest of the x=g(x) method.

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

    formula. This method is slightly complex even on easy formulas, but when we get really complicated when harder formulas are introduced. This is the hardest bit of the method as the iteration part is really simple, especially with the use of automated software/computer.

  2. OCR MEI C3 Coursework - Numerical Methods

    Finding the root using Newton-Raphson f'(x)=5x4-4 xn F(xn) f'(xn) x1 -2 -21 76 x2 -1.72368 -5.32084 40.1368 x3 -1.59112 -0.83341 28.0463 x4 -1.56140 -0.03491 25.71855 x5 -1.56004 -7E-05 25.61534 x6 -1.56004 -2.8E-10 25.61513 -1.56004 (5d.p.) is therefore a root of f(x)=0.

  1. Methods of Advanced Mathematics (C3) Coursework.

    x f(x) x f(x) -4 -301 -4 -301 -3.5 -197.875 -3 -121 -3 -121 -2 -31 -2.5 -66.625 -1 -1 -2 -31 0 -1 -1.5 -10.375 1 -1 -1 -1 2 29 -0.5 0.875 3 119 0 -1 4 299 0.5 -2.875 1 -1 1.5 8.375 2 29 2.5 64.625

  2. Numerical Methods coursework

    This can be proved by looking on the diagram below. The distance between and is 4 times smaller than the distance between and , where X represents the actual solution. To get the next distance between and we multiply the "multiplier" 0.25 with the distance between and .

  1. Change of Sign Method.

    I will continue the decimal search, now using increments of 0.01 within the interval [-1, -0.9]. x -1.00 -0.99 -0.98 -0.97 -0.96 -0.95 f(x) 0.42 0.369901 0.319608 0.269127 0.218464 0.167625 x -0.94 -0.93 -0.92 -0.91 f(x) 0.116616 0.065443 0.014112 -0.037371 This indicates that the root lies in the new interval [-0.92, -0.91].

  2. MEI numerical Methods

    So therefore the higher the rate of convergence the quicker the method reaches the final approximation. First order of convergence: The formula to work out the first order of convergence is: Absolute error in x1 / Absolute error in x2 In order to find absolute error, we usually do (x(approximation)

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

    Zoom in on the axes we can clearly see that using the Newton-Raphson method gives us one root efficiently. How does the Newton-Raphson method actually work? The graph above shows a part of a function (the blue curve). Suppose we have an estimated value of a root, xn.

  2. Newton Raphson Method for Solving 6x3+7x2-9x-7=0

    = -0.0808 f '(x2) = -10.6991 x3 = -0.63486 3 x3 = -0.63486 f(x3) = -0.000200809 f '(x3) = -10.63319005 X4 = -0.63488 Solving 6x3+7x2-9x-7=0 for third root f(x) is negative The root lies between -1.6473 and -1.64725 -1.64735 -1.6473 -1.64725 f(-1.64735)= -0.000611049 f(1.6473)=0.00013765 f(-1.64725)=0.001067206 X=-1.6473 (5 sig fig)

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