Numerical differentiation

Published:

1.0 INTRODUCTION

The problem of numerical differentiation does not receive very much attention nowadays. Although the Taylor series plays a key role in much of classical analysis, the poor reputation enjoyed by numerical differentiation has led numerical analysts to construct techniques for most problems which avoid the explicit use of numerical differentiation. One may briefly and roughly define the term numerical differentiation as any process in which numerical values of derivatives are obtained from evaluations of the function at several abscissae near . These numerical differentiation methods are including:

1. Finite Difference Approximation of First and Second Derivative

2. Richardson's Extrapolation

2.0 OBJECTIVE OF THE REPORT

Objectives for this assignment are:

(a) To reduce the truncation error for approximating the derivative of a function f to coax the results of the higher accuracy out of some numerical formulas.

(b) To show how numerical method very useful in calculation

Lady using a tablet
Lady using a tablet

Professional

Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

(c) To expose students about the relationship of numerical method in programming and real condition in engineering field.

(d) To show how numerical method very useful in calculation.

(e) To prepare student for the real life problems.

(f) To build skills among students in order to complete the assignment.

3.0 FINITE DIFFERENCE APPROXIMATION OF FIRST DERIVATIVE

3.1 LITERATURE REVIEW

If a function is specified by means of a table of discrete values, rather than an algebraic expression, then the analytical methods described in earlier chapters cannot be used to determine derivatives. Such situations can occur when experimental measurements are used to obtain data, e.g. distance values at specific times for a moving object, and the function relating the data values is not known. In addition, the calculation of derivative values by means of computers tends to be done numerically, even when the function is known, by operating on discrete values obtained for the function. This topic describes how derivatives can be obtained in such situations.

There are two ways of considering the methods. One is in terms of considering lines joining data values to represent chords between points on a graph of the function. The other, which generates the same equations, involves representing the function by a series. We can represent a function by a series. We can represent a function by a polynomial series, the data values then being points which the series must be represent. In considering, in this topic, various degees of sophistication of numerical methods the equations are developed by both these methods.

3.2 THEORY

3.2.1 Taylor's series

The basic used in this topic for development of numerical methods based on representing a function by a series, is in terms of the Taylor's series. The following is a brief discussion of the series.

A function can be represented, provided enough terms are considered, by a polynomial series.

[1]where A, B, C, D, E, etc. are constants. Consider the value of this function at x=a. Then

[2]Equation [1] minus equation [2] enables us to eliminate constant A to give

[3]Differentiating equation [2] with respect to gives

[4]where is used to represent the . Multiplying this equation by and subtracting it from equation [3] eliminates to give

[5]Differentiating equation [4] with respect to gives

[6]where represents . Multiplying this equation by and subtracting it from equation [5] eliminates C and gives

=In general we can write

[7]where we have representing , representing , etc. The equation is known as Taylor's series or theorem

We can employ Taylor's series expansions to derive finite-divided-difference approximations of derivatives. We develop forward, backward and centered difference approximations of first and higher derivatives.

3.2.2 Finite difference approximations of first derivative

3.2.2.1 Forward difference approximation of first derivative

The Taylor's series can be expanded forward by utilizes data i and i+1 to estimate the derivative

So

And we have

Is known as two point forward difference formula.

3.2.2.2 Backward difference approximation of first derivative

The Taylor's series can be expanded backward to calculate a previous value on the basis of a present value, as in

So

And we have

Is known as two point backward difference formula.

3.2.2.3 Centered difference approximation of first derivative

Lady using a tablet
Lady using a tablet

Comprehensive

Writing Services

Lady Using Tablet

Plagiarism-free
Always on Time

Marked to Standard

Order Now

A third way to approximate the first derivative is to subtract the backward Taylor's series expansion from the forward Taylor's series expansion:

And we yield

Is known as two point central difference formula.

3.2.2.4 High-accuracy differentiation formulas

High-accuracy differentiation formulas can be generated by including additional terms from Taylor's series expansion

Use the following Taylor's series expansion:

Then,

And we yield

As forward difference approximation of accuracy O() and also known as three point backward difference formula.

Use the following Taylor's series expansion:

Then,

And we yield

As backward difference approximation of accuracy O() and also known as three point forward difference formula.

Use Taylor's series expansion for , , and:

=

So we yield a high-accuracy differentiation formula O()

Is also known as five point central difference formula.

3.2.3 Finite difference approximations of second derivative

3.2.3.1 Forward difference approximation of second derivative

Taylor's series expansion can also be used to derive numerical estimates of higher derivatives.

To do this, we add up two Taylor's series expansions and :

Then,

Hence, a forward difference formula for second derivative of O() is

3.2.3.2 Backward difference approximation of second derivative

Use the following Taylor's series expansion:

Then,

And we yield,

As backward difference approximation of accuracy O().

3.2.3.3 Centered difference approximation of second derivative

We add up two Taylor's series expansions and :

Hence,

So we yield,

Is known as three point central difference formula for second derivative.

3.2.3.4 High-accuracy differentiation formula

Use Taylor's series expansions for , , and :

So we yield a high-accuracy differentiation formula O() for second derivative

Is known as five point central difference formula for the second derivative.

3.3 ALGORITHM AND FLOWCHART

3.3.1 Algorithm

1. The differences formula are obtain from the Taylor's series expansion for function .

2. See the functions.

3. By given values of in the tables or directly, use the appropriate formula to solve the problem either or with the given and .

4. Differentiate the functions and calculate the actual values for or .

5. Find the absolute error value by subtract the actual value with calculation value (using formula).

3.3.2 Flowchart

3.4 EXAMPLE AND EXERCISE

3.4.1 Finite difference approximations of first derivative

Using h = 0.05 for each cases to solve the examples below.

Example 1 ( two point forward difference formula)

Given, find numerical approximations to the derivative, using two points and the forward difference formula.

From , thus,

= - 0.1108

Using two points and forward difference formula,

[Graphics:../Images/NumericalDiffMod_gr_253.gif]

Figure i : h = 0.05

=

=

= - 0 .1220

Absolute error = = 0.00112

>> syms x;

>> diff ( exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> subs (ans,x,1)

ans =

-0.1108

>> syms x;

>> num = exp(-x-h)*sin(x+h)-exp(-x)*sin(x);

>> denom = h;

>> f = num/denom

f =

(exp(-x-h)*sin(x+h)-exp(-x)*sin(x))/h

>> subs(f,h,0.05)

ans =

20*exp(-x-1/20)*sin(x+1/20)-20*exp(-x)*sin(x)

>> subs(ans,x,1.0)

ans =

-0.1203

Example 2 (two point backward difference formula)

Given, find numerical approximations to the derivative, using two points and the backward difference formula.

From , thus,

= - 0.1108

Using two points and backward difference formula,

[Graphics:../Images/NumericalDiffMod_gr_253.gif]

Figure i : h = 0.05

=

=

= -0.100

=Absolute error = = 0.0108

>> syms x;

>> diff ( exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> subs (ans,x,1)

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

ans =

-0.1108

>> syms x;

>> num = exp(-x)*sin(x)-exp(-x+h)*sin(x-h);

>> denom = h;

>> f = num/denom

f =

(exp(-x)*sin(x)-exp(-x+h)*sin(x-h))/h

>> subs(f,h,0.05)

ans =

20*exp(-x/20)*sin(x/20)-20*exp(-x+1/20)*sin(x-1/20)

>> subs(ans,x,1.0)

ans =

-0.1004

Example3 (two point central difference formula)

Given, find numerical approximations to the derivative, using two points and the central difference formula.

From , thus,

= - 0.1108

Using two points and central difference formula,

[Graphics:../Images/NumericalDiffMod_gr_274.gif]

Figure i : h = 0.05

=

=

= -0.111

Absolute error = = 0.0002

>> syms x;

>> diff ( exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> subs (ans,x,1)

ans =

-0.1108

>> syms x;

>> num = exp(-x-h)*sin(x+h)-exp(-x+h)*sin(x-h);

>> denom = h;

>> f = num/denom

f =

(exp(-x-h)*sin(x+h)-exp(-x+h)*sin(x-h))/h

>> subs(f,h,0.05)

ans =

20*exp(-x-1/20)*sin(x+1/20)-20*exp(-x+1/20)*sin(x-1/20)

>> subs(ans,x,1.0)

ans =

-0.01104

2. Using h = 0.05 for each case, calculate the following examples by applying three points difference formula.

Example 4 (three point forward difference formula)

Given, find numerical approximations to the derivative, using three points and the forward difference formula.

From , thus,

= - 0.110794

Using three points and forward difference formula,

[Graphics:../Images/NumericalDiffMod_gr_316.gif]

Figure i : h = 0.05

=

=

= -0.111

Absolute error = = 0.0002

>> syms x;

>> diff ( exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> subs (ans,x,1)

ans =

-0.1108

>> syms x;

>> num = 3*exp(-x)*sin(x)-4exp(-x-h)*sin(x+h)-exp(-x+2*h)*sin(x-2*h);

>> denom = 2*h;

>> f = num/denom

f =

3*exp(-x)*sin(x)-4exp(-x-h)*sin(x+h)-exp(-x+2*h)*sin(x-2*h)/2*h

>> subs(f,h,0.05)

ans =

10*3*exp(-x)*sin(x)-4exp(-x-1/20)*sin(x+1/20)-exp(-x+2*1/20)*sin(x-2*1/20)

>> subs(ans,x,1.0)

ans =

-0.01117

3.4.2 Finite difference approximations of second derivative

Using h = 0.05 for each cases to solve the problems below.

Example 1 (three points backward difference formula)

Given, find numerical approximations to the second derivative, using three points and the backward difference formula.

From , thus, , and

= - 0.3975

Using three points and backward difference formula,

[Graphics:../Images/NumericalDiffMod_gr_379.gif]

Figure i : h = 0.05

=

=

= - 0.44

Absolute error = = 0.0425

>> syms x;

>> diff(exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> diff(ans)

ans =

-2*exp(-x)*cos(x)

>> subs(ans,x,1)

ans =

-0.3975

>> >> syms x;

>> num = exp(-x)*sin(x)-2exp(-x+h)*sin(x-h)+exp(-x+2*h)*sin(x+2*h);

>> denom = h*h;

>> f = num/denom

f =

= exp(-x)*sin(x)-2exp(-x+h)*sin(x-h)+exp(-x+2*h)*sin(x+2*h)/h*h

>> subs(f,h,0.05)

ans =

4*exp(-x)*sin(x)-2exp(-x+1/20)*sin(x-1/20)+exp(-x+2*1/20)*sin(x+2*1/20))

>> subs(ans,x,1.0)

ans =

-0.4500

Example 2 (three points forward difference formula)

Given, find numerical approximations to the second derivative, using three points and the forward difference formula.

From , thus, and

= - 0.3975

Using three points and forward difference formula,

[Graphics:../Images/NumericalDiffMod_gr_358.gif]

Figure i : h = 0.05

=

=

= - 0.32

Absolute error = = 0.0775

>> syms x;

>> diff(exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> diff(ans)

ans =

-2*exp(-x)*cos(x)

>> subs(ans,x,1)

ans =

-0.3975

>> >> syms x;

>> num = exp(-x)*sin(x)-2exp(-x+h)*sin(x-h)+exp(-x+2*h)*sin(x+2*h);

>> denom = h*h;

>> f = num/denom

f =

= exp(-x)*sin(x)-2exp(-x-h)*sin(x+h)+exp(x-2*h)*sin(x+2*h)/h*h

>> subs(f,h,0.05)

ans =

4* exp(-x)*sin(x)-2exp(-x-1/20)*sin(x+1/20)+exp(x-2*1/20)*sin(x+2*1/20)

>> subs(ans,x,1.0)

ans =

-0.3483

>>

Example 3 (three points central difference formula)

Given, find numerical approximations to the second derivative, using three points and the central difference formula.

From , thus, and

= - 0.3975

Using three points and central difference formula,

[Graphics:../Images/NumericalDiffMod_gr_400.gif]

Figure i : h = 0.05

=

=

= - 0.40

Absolute error = = 0.0025

>> syms x;

>> diff(exp(-x)*sin(x))

ans =

-exp(-x)*sin(x)+exp(-x)*cos(x)

>> diff(ans)

ans =

-2*exp(-x)*cos(x)

>> subs(ans,x,1)

ans =

-0.3975

>> >> syms x;

>> num = exp(-x+h)*sin(x)-2exp(-x)*sin(x)+exp(-x-h)*sin(x+h);

>> denom = h*h;

>> f = num/denom

f =

= exp(-x+h)*sin(x)-2exp(-x)*sin(x)+exp(-x-h)*sin(x+h)/h*h

>> subs(f,h,0.05)

ans =

4* exp(-x+1/20)*sin(x)-2exp(-x)*sin(x)+exp(-x-1/20)*sin(x+1/20)

>> subs(ans,x,1.0)

ans =

-0.3979

4 .0 RICHARDSON'S EXTRAPOLATION

4.1 LITERATURE REVIEW

Richardson's extrapolation is the technique introduced by a mathematician named Lewis Fry Richardson in the early 20th century. Richardson's extrapolation is the technique to approximate the value of the derivative of the function f to the higher accurate one. This method is also very useful in practical application included in Romberg integration which applies Richardson's Extrapolation to the trapezium rule and ordinary differential equations later.

4.2 THEORY

From the previous, we know that,

fx+h-fx-h=2hf'(x)+2h33!f⁽³⁾x+2h55!f(5)x+… [1]

Rearranged back the equation above, we get:

f'x=fx+h-f(x-h)2h-13!h2f3x+15!h4f5x+… [2]

Let us consider Eq. [2] as:

f'x=fx+h-f(x-h)2h+a2h²+a4h4+a6h6+… [3]

where a2, a4, a6,… depend on f(x), not h.

and then,

f'x=fx+h-f(x-h)2h+O(h2) [4]

where O(h) called ‘big O notation of h' denotes the truncation error term of order h, so the truncation error can be decreased by decreasing h.

We can use equation [3] as Richardson's extrapolation to generate results of higher accuracy to approximate f'(x).

Thus, we can define,,

Dj,0=fx+hj-f(x-hj)2hj, j = 0, 1, 2, …

where hj=h2j shows that h or the size of interval is decreasing when j is increasing.

Using Eq. [3],

f'x=Dj,0+a2hj 2+a4hj 4+a6hj 6+… [5]

f'x=Dj+1,0+a2hj22+a4hj24+a6hj26+… [6]

f'x=Dj+2,0+a2hj222+a4hj224+a6hj226+… [7]

⋮

4 x Eq. [6]: 4f'x=4Dj+1,0+a2hj 2+a44hj 4+a616hj 6+… [8]

Eq. (2.8) - Eq. [5]: f'x=4Dj+1,0-Dj,03+b4hj 4+b6hj 6+… [9]

Apply the same method [(4 x Eq. [7]) - Eq. [6]] to eliminate the term hj 2 yields:

f'x=4Dj+2,0-Dj+1,03+b4hj24+b6hj26+… [10]

⋮

We can define,

Dj,1=4Dj,0-Dj-1,03, j = 1, 2, 3, …

Thus, we can write Eq. [9] and Eq. [10] as:

f'x=Dj+1,1+b4hj 4+b6hj 6+… [11]

f'x=Dj+2,1+b4hj24+b6hj26+… [12]

⋮

Next step, the term hj 4 from Eq. [12] is eliminated by using the similar method,

[(4² x Eq. [12]) - Eq. [11]] results:

f'x=4²Dj+2,1-Dj+1,14²-1+c6hj 6+… [13]

⋮

Thus, we can define,

Dj,2=4²Dj,1-Dj-1,14²-1, j = 2, 3, 4, …

Eq. (2.13) can be written as:

f'x=Dj+2,2+c6hj 6+…

⋮

The same process can be continue and will result in,

Dj,k=4kDj,k-1-Dj-1,k-14k-1 , k≤j, j = 1, 2, 3, …

Then, we can construct Richardson's Extrapolation table to show all the computation,

j

hj=h2j

Dj,0

Dj,1

Dj,2

⋯

0

h0

D0,0

1

h0

D1,0

D1,1

2

h0

D2,0

D2,1

D2,2

⋮

⋮

⋮

⋮

⋮

⋱

Table 1: Richardson's Extrapolation table

The iteration can be stopped if Dj,k-Dj,k-1<ε and the answer taken is f'(x)≈Dj,k as the better approximation of f'(x).

4.3 ALGORITHM AND FLOWCHART

4.3.1 Algorithm

1. Identify h, x, ε and the function f(x).

2. Construct Richardson's Extrapolation table.

3. Find hj .

4. Find Dj,0, Dj,1,…, Dj,k using Richardson's Extrapolation method.

5. Insert the values into the Richardson's Extrapolation table.

6. Continue to find all the values until Dj,k-Dj,k-1<ε .

7. Write the answer as f'x≈Dj,k .

4.3.2 Flowchart

4.4 EXAMPLE AND EXERCISE

Example 1

Approximate the derivative of the function fx=(e-xsinx) at the point x = 1.0 using Richardson's Extrapolation starting with h = 0.5 and continuing using ε=0.0001.

Solution:

D0,0=f1.0+0.5-f(1.0-0.5)2(0.5)=f1.5-f(0.5)1.0=0.2226-0.29081.0=-0.0682

D1,0=f1.0+0.25-f1.0-0.2520.25=f1.25-f0.750.5=0.2719-0.32200.5

=-0.1002

D1,1=4D1,0-D0,03=4-0.1002-(-0.0682)3=-0.1109

D2,0=f1.0+0.125-f1.0-0.12520.125=f1.125-f0.8750.25=0.2929-0.32000.25

=-0.1084

D2,1=4D2,0-D1,03=4-0.1084-(-0.1002)3=-0.1111

D2,2=4²D2,1-D1,14²-1=16-0.1111-(-0.1109)15=-0.1111

j

hj=h2j

Dj,0

Dj,1

Dj,2

0

h0=0.520= 0.5

- 0.0682

1

h1=0.521= 0.25

- 0.1002

- 0.1109

2

h2=0.522= 0.125

- 0.1084

- 0.1111

- 0.1111

D2,2-D2,1=-0.1111-(-0.1111)=0.0000<ε

Thus, we choose the best answer which is f'1.0≈D2,2≈-0.1111.

Example 2

Let fx=xex. Approximate the derivative at x = 2.0 starting with h = 0.2 using Richardson's Extrapolation. (ε = 0.0001)

Solution:

D0,0=f2.0+0.2-f2.0-0.220.2=f2.2-f1.80.4=19.8550-10.88940.4

=22.4140

D1,0=f2.0+0.1-f2.0-0.120.1=f2.1-f1.90.2=17.1490-12.70320.2

=22.2290

D1,1=4D1,0-D0,03=422.2290-(22.4140)3=22.1673

D2,0=f2.0+0.05-f2.0-0.0520.05=f2.05-f1.950.1=15.9242-13.70590.1

=22.1830

D2,1=4D2,0-D1,03=422.1830-(22.2290)3=22.1677

D2,2=4²D2,1-D1,14²-1=1622.1677-(22.1673)15=22.1677

j

hj=h2j

Dj,0

Dj,1

Dj,2

0

h0=0.220= 0.2

22.4140

1

h1=0.221= 0.1

22.2290

22.1673

2

h2=0.222= 0.05

22.1830

22.1677

22.1677

D2,2-D2,1=22.1677-22.1677=0.0000<ε

The solution for derivative of f is f'2.0≈D2,2≈22.1677.

Example 3

Use h = 0.5 and ε = 0.00001 to approximate the derivative of fx=sinxx at x = 1.0 using Richardson's Extrapolation method.

Solution:

D0,0=f1.0+0.5-f(1.0-0.5)2(0.5)=f1.5-f(0.5)1.0=0.66500-0.958851.0=-0.29385

D1,0=f1.0+0.25-f1.0-0.2520.25=f1.25-f0.750.5=0.75919-0.908850.5

=-0.29932

D1,1=4D1,0-D0,03=4-0.29932-(-0.29385)3=-0.30114

D2,0=f1.0+0.125-f1.0-0.12520.125=f1.125-f0.8750.25=0.80202-0.877190.25

=-0.30068

D2,1=4D2,0-D1,03=4-0.30068-(-0.29932)3=-0.30113

D2,2=4²D2,1-D1,14²-1=16-0.30113-(-0.30114)15=-0.30113

j

hj=h2j

Dj,0

Dj,1

Dj,2

0

h0=0.520= 0.5

- 0.29385

1

h1=0.521= 0.25

- 0.29932

- 0.30114

2

h2=0.522= 0.125

- 0.30068

- 0.30113

- 0.30113

D2,2-D2,1=-0.30113-(-0.30113)=0.0000<ε

The conclusion is the derivative of f at x = 1.0 is f'1.0≈D2,2≈-0.30113.

Example 4

Using the Richardson's Extrapolation, determine the derivative of the function y=ex at x = 2.5 starting with h = 0.1. Show the calculation in four decimal places (4DP). (ε = 0.0001)

Solution:

D0,0=f2.5+0.1-f(2.5-0.1)2(0.1)=f2.6-f(2.4)0.2=13.4637-11.02320.2=12.2025

D1,0=f2.5+0.05-f2.5-0.0520.05=f2.55-f2.450.1=12.8071-11.58830.1

=12.1880

D1,1=4D1,0-D0,03=412.1880-(12.2025)3=12.1832

D2,0=f2.5+0.025-f2.5-0.02520.025=f2.525-f2.4750.05=12.4909-11.88170.05

=12.1840

D2,1=4D2,0-D1,03=412.1840-(12.1880)3=12.1827

D2,2=4²D2,1-D1,14²-1=1612.1827-(12.1832)15=12.1827

j

hj=h2j

Dj,0

Dj,1

Dj,2

0

h0=0.120= 0.1

12.2025

1

h1=0.121= 0.05

12.1880

12.1832

2

h2=0.122= 0.025

12.1840

12.1827

12.1827

Since D2,2-D2,1=12.1827-(12.1827)<ε, f'2.5≈D2,2≈12.1827.

Example 5

Given f(x) = 0.2 + 25x - 200x2 + 675 x3 - 900 x4 + 400x5. By the method of Richardson's Extrapolation, determine the value of f' (0.65). Let h0= 0.2 and use 5 decimal places in the calculation.

Solution:

D0,0=f0.65+0.2-f0.65-0.220.2=f0.85-f0.450.4=-0.83913-2.934880.4

=-9.43503

D1,0=f0.65+0.1-f0.65-0.120.1=f0.75-f0.550.2=1.37188-3.528880.2

=-10.78500

D1,1=4D1,0-D0,03=4-10.78500-(-9.43503)3=-11.23499

D2,0=f0.65+0.05-f0.65-0.0520.05=f0.7-f0.60.1=2.36300-3.464000.1

=-11.01000

D2,1=4D2,0-D1,03=4-11.01000-(-10.78500)3=-11.08500

D2,2=4²D2,1-D1,14²-1=16-11.08500-(-11.23499)15=-11.07500

D3,0=f0.65+0.025-f0.65-0.02520.025=f0.675-f0.6250.05=2.75983-3.312790.05

=-11.05920

D3,1=4D3,0-D2,03=4(-11.05920)-(-11.01000)3=-11.07560

D3,2=4²D3,1-D2,14²-1=16-11.07560-(-11.08500)15=-11.07497

D3,3=43D3,2-D2,243-1=64-11.07497-(-11.07500)63=-11.07497

j

hj=h2j

Dj,0

Dj,1

Dj,2

Dj,3

0

h0=0.220= 0.2

- 9.43503

1

h1=0.221= 0.1

- 10.78500

- 11.23499

2

h2=0.222= 0.05

- 11.01000

- 11.08500

-11.07500

3

h2=0.223= 0.025

- 11.05920

- 11.07560

- 11.07497

- 11.07497

Since D3,3-D3,2=-11.07497-(-11.07497)<ε, f'0.65≈D3,3≈-11.07497.

5 .0 DISCUSSION

5.1 ADVANTAGES AND DISADVANTAGES

There are several reasons for believing that, in the present-day computing environment, numerical differentiation might find a useful role. The first is that, by present standards, it is rather a small scale calculation, so its cost may well be negligible compared with any overall saving in cost that might result from its use. Secondly, the assignment of a step length h is now generally open. One does not have to rely on tabular data. Thirdly, although the amplification of round-off error is an integral part of the calculation, its effect can be measured reliably and automatically by the routine at the time of the calculation.

5.2 COMPARISON

FINITE DIFFERENCE APPROXIMATION

RICHARDSON'S EXTRAPOLATION

1. Easier and faster by using the formula

1. Complex and time consuming

2. Less accurate value

2. More accurate value

6 .0 CONCLUSION

The conclusions obtained from this project were as follows:

1. We can solve the numerical differentiation problems using both Finite Difference Approximation and Richardson's Extrapolation.

However, Richardson's Extrapolation produces a more accurate answer compare to Finite Difference Approximation.

2. We can solve the numerical differentiation problems by using MATLAB software to a avoid tedious calculations.

3. Based from the algorithm and flowchart of each method, all methods have specific procedures in solving numerical differentiation problems.

4. Both methods has advantages and disadvantages, giving one various options in solving SLE problems, depending on the condition of the problems