• 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. Marked by a teacher

    Estimate a consumption function for the UK economy explaining the economic theory and statistical ...

    3 star(s)

    0.000 0.9962 sigma 8845.94 RSS 4.14728156e+009 R^2 0.99624 F(1,53) = 1.404e+004 [0.000]** log-likelihood -576.847 DW 0.498 no.of observations 55 no.of parameters 2 mean(C) 339918 var(C) 2.00545e+010 C = + 1.37e+004 + 0.9207*Y (SE) (3e+003) (0.00777) Figure1 Table 2 EQ (2) Modelling LC by OLS (using project12min.xls) The estimation sample is: 1948 to 2002 Coefficient Std.Error t-value t-prob Part.R^2 Constant 0.750412 0.09542 7.86 0.000 0.5385 LY 0.938329 0.007520 125.

  1. Change of Sign Method.

    To check this is correct, substitute x = -0.9165 into f(x) = -0.00389006712 x = -0.9175 into f(x) =0.00125526563 The above calculations illustrate that there is a change of sign and therefore the root is -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.

  2. Three ways of reading The Bloody Chamber.

    The sort of understanding that is required of the reader is one in which both the first and second order readings are presupposed and gone beyond. It therefore requires a certain knowing ness on the part of the reader. A recognition that a mythic or a Freudian interpretation is not

  1. Arctic Research (Maths Coursework)

    and direction Sin ? = opposite Hypotenuse Sin ? = 30 340 Sin ? = 0.088 ? = Sin - 0.088 = 5.06o In this case the pilot will have to fly on a bearing of 180o slightly southeast to arrive back at base camp.

  2. OCR MEI C3 Coursework - Numerical Methods

    -1.56004 1.75E-05 Change of sign indicates root exists in interval [-1.56005,-1.56004] x=-1.560045�0.000005 x=-1.560 (3d.p.) x f(x) -1.560050 -0.00024 -1.560049 -0.00021 -1.560048 -0.00019 -1.560047 -0.00016 -1.560046 -0.00014 -1.560045 -0.00011 -1.560044 -8.5E-05 -1.560043 -5.9E-05 -1.560042 -3.4E-05 -1.560041 -8.1E-06 -1.560040 1.75E-05 Change of sign indicates root exists in interval [-1.560041,-1.560040] x=-1.5600405�0.0000005 x=-1.56004 (5d.p.)

  1. Numerical Methods coursework

    * There is a connection between the Trapezium Rule and the Midpoint Rule which can be used to shorten calculations: * Quick calculation of using and * All three rules simplify the working out on the spreadsheet due to less difficult formulae Formula Application I used the programme "Microsoft Excel 2003" to produce the spreadsheet.

  2. newton raphson

    0,680760 -0,000056 0.67 -0,06939 0,687 0,040909 0,6807 -0,00045 0,680770 0,000010 0.68 -0,00501 0,688 0,047526 0,6808 0,000205 0,680780 0,000075 0.69 0,060803 0,689 0,054157 0,6809 0,000857 0,680790 0,000140 0.7 0,12807 0,69 0,060803 0,681 0,00151 0,680800 0,000205 I can express this interval using the Error bounds.

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