0% found this document useful (0 votes)
230 views

SMA 3261 - Lecture 4 - Numerical - Differentiation

This document discusses numerical differentiation, which is a method for calculating derivatives of functions using discrete data points rather than an analytical expression. It presents formulas for calculating derivatives using forward, backward, and central difference methods for equally and unequally spaced data points. Examples are worked through applying these formulas to tabulated data sets. Exercises are also provided for the reader to practice applying numerical differentiation.

Uploaded by

Honsyben Brians
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views

SMA 3261 - Lecture 4 - Numerical - Differentiation

This document discusses numerical differentiation, which is a method for calculating derivatives of functions using discrete data points rather than an analytical expression. It presents formulas for calculating derivatives using forward, backward, and central difference methods for equally and unequally spaced data points. Examples are worked through applying these formulas to tabulated data sets. Exercises are also provided for the reader to practice applying numerical differentiation.

Uploaded by

Honsyben Brians
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Numerical Methods Lec.

NUMERICAL DIFFERENTIATION
Dr. Ndung’u Reuben M.
This approach is used to differentiate;
a) a function given by a set of tabular values,
b) complicated functions.
Definition
Numerical differentiation is the process of computing the value of the derivative for
some particular value of from the given data when the form of the function is not known.
It is developed by fitting approximating functions to a set of data and differentiating the
approximating function.

Thus,

Procedure;
i) Fit an approximating function to the discrete data.
ii) Differentiate the function
If is required at a point near the end of the table, we use NFDIF.
If is required at a point near the end of the table, we use NBDIF.
If is required at the middle of the table, a suitable central difference interpolation
formula is used.
DERIVATIVES FOR EQUALLY SPACED INTERVALS
Suppose is known at equispaced points and they are
respectively, i.e. , .
Let be the given data points and ( is the spacing).
Derivatives using Forward Difference Formula

Suppose the tabulated function is is replaced by NFDIF passing through the


points .
Then NFDIF is

where , and for . Here which implies that .

Differentiating we get,

DEKUT-MPS Page 1 of 10
Numerical Methods Lec. 4

Therefore,

Differentiating once again, we get

Special case: when we require at a basic tabulated point we choose so that


. Then we have

and so on

Worked example

1. Find from the following data using an appropriate Newton’s difference interpolating
formula. Work with decimal places.

Solution

DEKUT-MPS Page 2 of 10
Numerical Methods Lec. 4

Exercises
1. From the following table of values, estimate and :

2. A slider in a machine moves along a fixed straight rod. Its distance cm along the rod is
given below for various values of time (seconds). Find the velocity of the slider and its
acceleration when .

3. Using Newton’s forward interpolation formula find the value of from the following
data.

Derivatives using Backward Difference Formula

Using NBDIF, and applying a similar procedure, we can obtain

DEKUT-MPS Page 3 of 10
Numerical Methods Lec. 4

In particular when , we get

Worked example

1. Find the value of at from the following data, using Newton’s formula.

Solution

Here , , , . Thus,

2. Find the value of at from the following data, using an appropriate formula.

Solution

DEKUT-MPS Page 4 of 10
Numerical Methods Lec. 4

Here , , , . Thus,

Exercises
1. Given that

Find and at .

2. The population of a certain town is shown in the following table:

Year
Population (in 000)
Find the rate of growth of population in .
Derivatives using Central Differentiation Formula

If derivatives are near the middle of a difference table, it is better to use a central difference
formula.
Any of the central difference interpolation formula can be used to give a central difference
differentiation formula
Based on Stirling formula

DEKUT-MPS Page 5 of 10
Numerical Methods Lec. 4

Differentiating with respect to , we get (where since , )

Special case: when , we have and get

Differentiating again, we have

DEKUT-MPS Page 6 of 10
Numerical Methods Lec. 4

Putting , implies that , thus

Worked example

1. Find from the following data using Stirling’s formula.

Solution

, and ,
By Stirling’s formula,

Exercises

1. The voltage in an electrical circuit obeys the equation , where is


the inductance and is the resistance. If , and at time is given by the
table

DEKUT-MPS Page 7 of 10
Numerical Methods Lec. 4

Find by numerical differentiation and compute .

2. The deflection , measured at various distances from one end of a cantilever, is given by

Find .
3. The following table gives values of the current in a certain circuit at various times :

Use Stirling’s formula to find when .

DERIVATIVES WHEN DATA IS UNEQUALLY SPACED


If the values are not equally spaced, we use Newton’s divided difference formula or the
Lagrange’s Interpolation Formula.
Differentiation based on Lagrange’s Interpolation Formula
Obtained by differentiating the Lagrange’s interpolation formula.
Differentiation based on Newton’s General Divided Differences Formula
Let be values of a function corresponding to the arguments
with intervals not necessarily equispaced.
Then, differentiating the Newton’s General Divided Differences Formula, we get

Which is the formula for finding derivatives using Newton’s General divided difference formula.

Worked example
1. Find a polynomial satisfied by and . Use it to
evaluate .
Solution
Divided difference table is

DEKUT-MPS Page 8 of 10
Numerical Methods Lec. 4

Exercises

1. Find from the following table

2. Using divided differences, construct and recursively and use the to interpolate .

3. By means of Newton’s divided difference formula, find the value of and form the
following table.

DEKUT-MPS Page 9 of 10
Numerical Methods Lec. 4

4. Find from the following data using divided difference formula: , ,


and .

Combined Exercises
1) Using the data given in the table find (a) , , (b) and :

2) The function is tabulated in the scheme below. Find the derivatives at the points ,
and .

3) Find for using the following data:

4) Use Stirling formula to find the first derivative of the function tabulated below at
the point .

Compare with the value which is . { }

5) Find and of at , from the following table: { }

6) A rod is rotating in a plane. The following table gives the angle (radians) through which
the rod has turned for various values of the time second.

Calculate the angular velocity and the angular acceleration of the rod, when second.

DEKUT-MPS Page 10 of 10

You might also like