Date post: | 16-Jul-2015 |
Category: |
Documents |
Upload: | sheikh-fatema |
View: | 53 times |
Download: | 0 times |
of 17
Numerical Method CSE 257Numerical DifferentiationSalekul Islam North South University
Click to edit Master subtitle styleCSE 257
22
Todays Agenda
Numerical differentiation based on equalinterval interpolation order derivative based on Lagranges
Differentiation Second
Differentiation
interpolation
CSE 257
Numerical Method CSE 257 Numerical
33
Introduction
We are familiar with differentiation when analytical formrelation between independent variable x and dependent variable yis given. How about if only tabular format values are given? Numerical differentiation means calculating the derivatives from a set of given value Replace a complicated, unknown function with an interpolating polynomial and then differentiate the polynomialCSE 257 Numerical Method CSE 257 Numerical
44
Newton Forward Difference Interpolation Formula
CSE 257
Numerical Method CSE 257 Numerical
55
Numerical Differentiation
Let be the values of a function corresponding to the values Let p(x) be the interpolating polynomial whose graph passes through these points If the points are equally spaced the function is represented by any one of the formulae such as Newtons or Stirlings or Bassels formula.
CSE 257
Numerical Method CSE 257 Numerical
66
Differentiation based on EqualInterval Interpolation
Let the interpolating points xi (i = 0, 1, . . . , n) be equally spaced with spacing h Let y = f(x) be represented by y = p(k) where x = x0 + k.h
From Newtons forward difference formula,
We have,
CSE 257
Numerical Method CSE 257 Numerical
77
Differentiation based on EqualInterval Interpolation
By differentiating with respect to x,
When x = x0 , i.e. k = 0
For different values of n (i.e. number of points), approximate formulae for For n = 1,CSE 257 Numerical Method CSE 257 Numerical
=
88
Differentiation based on EqualInterval Interpolation
Geometrically, by taking the slope of the chord joining as an approximation to
By taking, n = 2CSE 257
Numerical Method CSE 257 Numerical
99
Second Order Derivative
By differentiating the first derivative,
At x = x0 , i.e. k = 0
Retaining the first term only,
CSE 257
Numerical Method CSE 257 Numerical
1010
Example
From the following table, find f (1.4). Compare your result with f (1.4) = cosh(1.4) = 2.1509.
The error term E = 2.1509 - 2.25 = -0.0991CSE 257 Numerical Method CSE 257 Numerical
1111
Example contd.
For better approximation taking n = 2,
The error here, E = 2.1509 - 2.1435 = 0.0074
CSE 257
Numerical Method CSE 257 Numerical
1212
Another Example
In the previous example, use to find f (1.4).
First, we have to find out thethe table we The From differences. difference table is have, Substituting these values in the equation,
CSE 257
Numerical Method CSE 257 Numerical
1313
More Example
Find the first and second order derivative of the function tabulated below at x = 3.
The difference table is,
From the following relation (h = 0.2),
CSE 257
Numerical Method CSE 257 Numerical
1414
Lagranges Interpolation Formula
Lagranges Interpolation Formula (See section 4.20 on page 123 for more details)
It is clear that f(x) is a polynomial in n.CSE 257 Numerical Method CSE 257 Numerical
1515
Example on Lagranges Interpolation Formula
CSE 257
Numerical Method
1616
Example on Lagranges Interpolation Formula
CSE 257
Numerical Method
1717
Differentiation from Lagranges Interpolation Formula
From Lagranges Interpolation Formula
CSE 257
Numerical Method CSE 257 Numerical