• 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

Numerical Differentiation

Extracts from this document...

Introduction

Numerical Differentiation

Introduction

When finding the roots of an equation, the first thing you would try to do is factorise it. However sometimes factorizing does not find the root, therefore there are Numerical Methods that can be used to approximate the root, and the three different methods that I am using in this coursework are: Decimal search, Fixed Point Iteration, and Newton-Raphson.

image00.png

These are the three main curves that I am using:


image01.pngimage10.png

Change of Sign

image11.png

Change of sign works by taking increments between two values, then substituting the incremented values into the equation to get the y values. The intersection of the axis is found by the change of sign, because the line must have gone through the x-axis because it has changed from positive to negative or vice versa. The positive and negative values are then used as the bounds for the increments, and so the process is continued as you refine your search to the required degree of accuracy.

Finding the root of the equation between x=2 and x=3.

x

y

2

3

3

-3.5

2

<  x  <

3

x

y

2.0

3

2.1

2.206

2.2

1.428

2.3

0.672

2.4

-0.056

2.3

<  x  <

2.4

x

y

2.30

0.672

2.31

0.597841

2.32

0.523968

2.33

0.450387

2.34

0.377104

2.35

0.304125

2.36

0.231456

2.37

0.159103

2.38

0.087072

2.39

0.015369

2.40

-0.056

2.39

<  x  <

2.40

x

y

2.390

0.015369

2.391

0.008216971

2.392

0.001068288

2.393

-0.006077043

2.392

<  x  <

2.393

x

y

2.3920

0.001068288

2.3921

0.000353604

2.3922

-0.000361047

2.3921

<  x  <

2.3922

x

y

2.39210

0.000353604

2.39211

0.000282137

2.39212

0.000210671

2.39213

0.000139205

2.39214

6.77397E-05

2.39215

-3.72549E-06

2.39214

<  x  <

2.39215

x

y

2.392140

6.77397E-05

2.392141

6.05932E-05

2.392142

5.34467E-05

2.392143

4.63001E-05

2.392144

3.91536E-05

2.392145

3.20071E-05

2.392146

2.48606E-05

2.392147

1.7714E-05

2.392148

1.05675E-05

2.392149

3.42102E-06

2.392150

-3.72549E-06

2.392149

<  x  <

2.392150

x= 2.39215 (6s.f)


Error Bounds

...read more.

Middle

0

5.29

1

1.69

2

0.09

3

0.49

4

2.89

To show another limitation of The Decimal search method I have used the equation:

x

(x+3.9)(x–3.9)

image14.png

As you can see from the table below, there must be a sign change between x=3 and x=4, however looking at the graph shows that there is actually a discontinuity.

x

y

0

0

1

-0.070373

2

-0.1784121

3

-0.4830918

4

5.0632911

5

0.5107252

Newton-Raphson Method

xr+1 =  xr f (xr)  

                f ’(xr)

y= 4ln|x| - x + 2

dy= -1 + 4

dx

image15.png

x0

1

x0

6

x1

0.666666667

x1

15.50111363

x2

0.724372086

x2

12.08113601

x3

0.727506177

x3

11.90987844

x4

0.727514477

x4

11.90926753

x5

0.727514477

x5

11.90926752

α= 0.727514 (6s.f)

β= 11.9093 (6s.f)

Error Bounds

x= 0.727514 ± 0.0000005

f(0.7275145) = 4xln0.7275145-0.7275145+2

   = 1.04545x10-07         >0

f(0.7275135) = 4xln0.7275135-0.7275135+2

   = -4.39363 x10-06     <0

When the bounds are put into the formula, they show a change of sign which means that there is a root between the two intervals, therefore confirming that:

α= 0.727514 ± 0.0000005.

Therefore:

α= 0.727514 (6s.f.)

1.

image16.png

The first stage is to find the tangent to the curve at the point x0. This is done by differentiating the function. Then with the equation of the tangent the intersection with the x-axis is found.

2.

image02.png

The point of intersection x value is then used as the new point for the tangent of the line, and again the intersection of the axis with the tangent is found.

3.

image03.png

This process is repeated, and it converges very quickly to the value.

When Newton-Raphson does not work

image04.png

 y= 20x5– 3x2 + 0.1

dy= 100x4-6x

dx

x0= 0

x1= 0-(20x05-3x02+0.1)

          100x04-6x0

x1= 0-0.1

        0

Cannot divide by 0.


Fixed Point Iteration

My Function is:  

image05.png

This can be arranged to:

y= x

and either

g(x)= ln|-7+10x|

g(x)= 0.1ex+ 0.7

0 = 0.2ex2x+1.4

           -1.4+2x = 0.2ex

-7+10x = ex

          ln|-7+10x|= x

or

         0 = 0.2ex2x+ 1.4

                    2x = 0.2ex+ 1.4

                       x= 0.1ex+ 0.7

image06.png

image07.png

Using this rearrangement α cannot be found because its gradient is approximately 3.8. However β has a gradient between 1 and -1, therefore it can converge.

Conversely with this rearrangement α is possible to work out because the g(x) has a magnitude between 1 and -1, however β has a root with a magnitude greater than 1.

Therefore both functions must be used to find all the roots of the equation.

image08.png

x0

0

x1

0.8

x2

0.922554093

x3

0.951570754

x4

0.958977437

x5

0.960902721

x6

0.961405517

x7

0.961536984

x8

0.96157137

x9

0.961580364

x10

0.961582717

x11

0.961583332

x12

0.961583493

x13

0.961583535

x14

0.961583546

α= 0.961584 (6s.f.)

x0

3

x1

3.135494216

x2

3.192734792

x3

3.215965511

x4

3.225241724

x5

3.228921883

x6

3.230378172

x7

3.23095386

image09.png

x8

3.231181344

x9

3.231271221

x10

3.231306729

x11

3.231320756

x12

3.231326297

x13

3.231328487

β= 3.32133 (6s.f.)

...read more.

Conclusion

x

EXE

Then pressing execute again repeats the calculation so you can work it out very quickly.

Decimal Search

Decimal search takes the longest to converge with 41 iterations, however the method contains the easiest calculations. Decimal search is a bit more difficult to set up on calculators than the other two methods. Graphical calculators with a table function are probably the easiest to set up. If a calculator with a table function is not available the values would need to be written down to keep track of the calculations. With a good knowledge of a spreadsheet program such as Microsoft Excel and using IF and THEN statements, would take the human error out, and speed up the process. The main problems with Decimal search is that the process stops when one sign change is found, therefore other roots are missed, and when the root is repeated or just goes through the axis but comes back out before the next increment.

On my calculator these are the steps used to set it up:

0.2eX-2x+1.4

This is inputting the function into the calculator.

RANG

Strt: 0

End: 10

Ptch: 1

EXE

Pressing the RANG button allows you to edit the range of the table. I set it to go from 0 to 10 in intervals of 1.

EXE

This runs the table and gives you the x and f(x) values. Then all that is needed is to change the range of the table to the bounds from the sign change and change the intervals.

        -  -

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

    The Gradient Function

    5 star(s)

    � - 2x� = 2(x� +3x�h + 3h�x+h�) - 2x� = 2x� + 6x�h + 6h�x +h� - 2x� x + h - x h h = 6x�h + 6h�x +h� = 6x� + 6hx + h� = 6x� + (6)(0x) + 0� = 6x� h I need not explain this any further.

  2. Marked by a teacher

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

    3 star(s)

    (0.0954) (0.00752) Figure 2 Table 3 EQ( 3) Modelling LC by OLS (using project12min.xls) The estimation sample is: 1950 to 2002 Coefficient Std.Error t-value t-prob Part.R^2 Constant 0.687284 0.1279 5.37 0.000 0.3613 LYP 0.945289 0.01008 93.8 0.000 0.9942 sigma 0.0311461 RSS 0.0494741152 R^2 0.994231 F(1,51) = 8789 [0.000]** log-likelihood 109.676 DW 0.439 no.

  1. C3 Coursework: Numerical Methods

    The Ease of Use of the Software To carry out my calculations for the Change of Sign, x=g(x) and Newton Raphson methods, I used the spreadsheet programme Microsoft Excel. In order to use the decimal search method to look for a change of sign it was very simple to input my formulae and intervals between my points into Excel.

  2. MEI numerical Methods

    the upper bounds and lower are two opposite signs the root must lie within the range of values of the interval. As K varies As we proved above, if K = 1 the root is 0.479731007. However what if K, was 2, 3 etc, could a pattern be distinguished, the

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

    + f(?????h?]?h??????[f(?+2h) + f(?????h?]?h??? + [f(?+3h) + f(?????h?]?h?????? [f(??????[f(??h) + f(?????h????f(?????h?] + f(?????h?] Thus the general approximation to for n trapezia is: Tn= (h/2) [f0 + 2(f1 + f2 + f3 +...+ fn-1) + fn] where f0 is the first strip and is the last fn strip. Notice that f1, f2, f3 ect.

  2. Numerical Method (Maths Investigation)

    to find the approximation root value. Although Newton-Raphson method may need less steps to reach the approximation root value, it has to find more items in order to get the approximation root value. Items, like drawing tangent and find the equation of the tangent.

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

    taken as the 'standard deviation over the previous four years of the growth of real personal income.'4 This meant that our equation looks as follows: ?ct = c0+c1?yt+c2st-1+c3?t+c4HPt+c5Ut This left the derived consumption function as: ?ct = 0.02213 + 0.3729?yt + 0.07338st-1 - 0.00179?t + 0.0009742HPt - 4.439x10-8Ut As you

  2. Solving Equations. Three numerical methods are discussed in this investigation. There are advantages and ...

    - Output of the function when x=b - The mid point of a and b - Output of the function when x=c - Possible error can occur in the result. n a f(a) b f(b) C f(c) error 1 0 2 2 -2 1 2 1 2 1 2 2

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