0% found this document useful (0 votes)
85 views4 pages

Numerical Differentiation

This document discusses numerical differentiation and methods for calculating derivatives of functions from discrete data points. It presents Newton's forward and backward difference formulas for calculating the first, second and higher order derivatives at interior and endpoints of the data range. It also provides examples of applying these formulas to compute derivatives and solve problems involving interpolation and extrapolation of data.

Uploaded by

Diwas Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views4 pages

Numerical Differentiation

This document discusses numerical differentiation and methods for calculating derivatives of functions from discrete data points. It presents Newton's forward and backward difference formulas for calculating the first, second and higher order derivatives at interior and endpoints of the data range. It also provides examples of applying these formulas to compute derivatives and solve problems involving interpolation and extrapolation of data.

Uploaded by

Diwas Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Numerical Differentiation

It is the process of calculating the value of the derivative of a function at some assigned value of
‘x’ from the given set of values (𝑥𝑖 , 𝑦𝑖 ). To compute 𝑑𝑦⁄𝑑𝑥, we first replace the exact relation
𝑦 = 𝑓(𝑥) by the best interpolating polynomial 𝑦 = 𝜙(𝑥) and then differentiate the latter as many
times as we desire. The choice of the interpolation formula to be used, will depend on the
assigned value of ‘x’ at which 𝑑𝑦⁄𝑑𝑥 is desired.

If the values of ‘x’ are equispaced and 𝑑𝑦⁄𝑑𝑥 are required near the beginning of the table, we
employ Newton’s forward formula. If it is required near the end of the table, we use Newton’s
backward formula. For values near the middle of the table, 𝑑𝑦⁄𝑑𝑥 is calculated by means of
Stirling’s or Bessel’s formula. If the values of x are not equispaced, we use Lagrange’s formula
or Newton’s divided difference formula to represent the function. Hence corresponding to each
of the interpolation formulae, we can derive a formula for finding the derivative.

1.1 Formulae for Derivatives

Consider the function 𝑦 = 𝑓(𝑥) which is tabulated for the values 𝑥𝑖 = 𝑥0 + 𝑖ℎ ∀ 𝑖 =


0,1,2, … … … , 𝑛.

1.1.1 Derivatives using Newton’s forward difference formula

We have, Newton’s forward difference interpolation formula;

𝑝(𝑝 − 1) 2 𝑝(𝑝 − 1)(𝑝 − 2) 3


𝑦 = 𝑦𝑜 + 𝑝∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ … … … … … ….
2! 3!
Differentiating both sides with respect to p, we get
𝑑𝑦 2𝑝−1 3𝑝2 −6𝑝+2 4𝑝3 −18𝑝2 +22𝑝−6
= ∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ∆4 𝑦0 … … … … … … ….
𝑑𝑝 2! 3! 4!

𝑥−𝑥0
Since 𝑥 = 𝑥0 + 𝑝ℎ so that 𝑝 = ℎ

𝑑𝑝 1
Therefore,𝑑𝑥 = ℎ

Now,
𝑑𝑦 𝑑𝑦 𝑑𝑝 1 2𝑝−1 3𝑝2 −6𝑝+2 4𝑝3 −18𝑝2 +22𝑝−6
= 𝑑𝑝 ∙ 𝑑𝑥 = ℎ [∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0 + ∆4 𝑦0 … … … … … ] (1)
𝑑𝑥 2! 3! 4!

At 𝑥 = 𝑥0 , 𝑝 = 0 . hence, putting 𝑝 = 0in equation (1), we get


𝑑𝑦 1 1 1 1 1 1
(𝑑𝑥 )𝑥0 = ℎ [∆𝑦0 − 2 ∆2 𝑦0 + 3 ∆3 𝑦0 − 4 ∆4 𝑦0 + 5 ∆5 𝑦0 − 6 ∆6 𝑦0 + ⋯ … … … … … … . . ] (2)

Again differentiating (1) with respect to x, we get


𝑑2 𝑦 𝑑 𝑑𝑝 𝑑𝑦 1 1 2 6𝑝 − 6 3 12𝑝2 + 36𝑝 + 22 4
= ∙ ( ) = ∙ [∆ 𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ … … … … ]
𝑑𝑥 2 𝑑𝑝 𝑑𝑥 𝑑𝑥 ℎ ℎ 3! 4!

Putting p=0, we get

𝑑2𝑦 1 11 4 5 137 6
2
= 2 [∆2 𝑦0 − ∆3 𝑦0 + ∆ 𝑦0 − ∆5 𝑦0 + ∆ 𝑦0 … … … … … ]
𝑑𝑥 ℎ 12 6 180

Similarly, we can find higher order derivatives as we desire.

1.1.2 Derivatives using Newton’s backward difference formula

We have, Newton’s backward difference interpolation formula;

𝑝(𝑝 + 1) 2 𝑝(𝑝 + 1)(𝑝 + 2) 3


𝑦 = 𝑦𝑛 + 𝑝∇𝑦𝑛 + ∇ 𝑦𝑛 + ∇ 𝑦𝑛 + ⋯ … … … … … ….
2! 3!
Differentiating both sides with respect to p, we get
𝑑𝑦 2𝑝+1 3𝑝2 +6𝑝+2
= ∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ⋯ … … … … … ….
𝑑𝑝 2! 3!

𝑥−𝑥𝑛
Since 𝑥 = 𝑥𝑛 + 𝑝ℎ so that 𝑝 = ℎ

𝑑𝑝 1
Therefore,𝑑𝑥 = ℎ

Now,
𝑑𝑦 𝑑𝑦 𝑑𝑝 1 2𝑝+1 3𝑝2 +6𝑝+2
= 𝑑𝑝 ∙ 𝑑𝑥 = ℎ [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ⋯ … … … … ] (1)
𝑑𝑥 2! 3!

At 𝑥 = 𝑥𝑛 , 𝑝 = 0 . hence, putting 𝑝 = 0in equation (1), we get


𝑑𝑦 1 1 1 1 1 1
(𝑑𝑥 )𝑥𝑛 = ℎ [∇𝑦𝑛 + 2 ∇2 𝑦𝑛 + 3 ∇3 𝑦𝑛 + 4 ∇4 𝑦𝑛 + 5 ∇5 𝑦𝑛 + 6 ∇6 𝑦𝑛 + ⋯ … … … … … … . . ] (2)

Again differentiating (1) with respect to x, we get

𝑑2𝑦 𝑑 𝑑𝑝 𝑑𝑦 1 1 2 6𝑝 + 6 3 12𝑝2 + 36𝑝 + 22 4


= ∙ ( ) = ∙ [∇ 𝑦𝑛 + ∇ 𝑦𝑛 + ∇ 𝑦𝑛 + ⋯ … … … … ]
𝑑𝑥 2 𝑑𝑝 𝑑𝑥 𝑑𝑥 ℎ ℎ 3! 4!

Putting p=0, we get

𝑑2𝑦 1 11 4 5 137 6
= [∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇ 𝑦𝑛 + ∇5 𝑦𝑛 + ∇ 𝑦𝑛 … … … … … ]
𝑑𝑥 2 ℎ2 12 6 180

Similarly, we can find higher order derivatives as we desire.


Numerical Problems: (solve transcendental equations)

1. Find the root of the equation 𝑥 3 − 𝑥 − 4 = 0 which lies between 1 and 2 by bisection method correct to three decimal
places (with accuracy of 10−4 ).
2. Find the root of the equation 𝑥𝑙𝑜𝑔10 𝑥 = 1.2 by bisection method correct to three decimal places (with accuracy of
10−4 ).
3. Find the root of the equation 𝑥 3 + 𝑥 2 − 1 = 0 by iteration method lying between [0,1] correct to three decimal places
(with accuracy of 10−4 ).
4. Find the root of the equation 𝑥 4 − 𝑥 − 9 = 0 by Newton-Raphson method correct to three decimal places (with
accuracy of 10−4 ).

Problems related to interpolation and extrapolation:

1. Find the cubic polynomial which takes the values y(0)=1, y(1)=0, y(2)=1, y(3)=10. And obtain y(4)=? Use Newton’s
forward difference formula.
2. Show that a curve 𝑦 = 𝑓(𝑥), where 𝑓(𝑥) is of the fourth degree, can be drawn through the points given by:
X -1 0 1 2 3 4 5
𝑓(𝑥) 23 13 3 1 34 148 408
Use Newton’s forward difference formula to find y exactly when x=1.2.
3. A) Compute the difference table for the following set of data points:
X 0.00 0.25 0.50 0.75 1.00
𝑓(𝑥) 0.0000 0.2763 0.5205 0.7112 0.8427
B) Use Newton’s forward difference formula to pass a fourth degree polynomial through the above data.

[Ans: 0.2763𝑝 − 0.125𝑝2 + 0.0008𝑝3 − 0.0006𝑝4]

C) Use the above polynomial to interpolate for f (0.125). [ans:0.1351]

4. Use Newton’s backward difference interpolation formula to estimate the value of f(1.45) from the following data:
X 2 4 6 8 10 12 14
𝑓(𝑥) 23 93 259 569 1071 1813 2843
[Ans:1727]
5. Fit a polynomial using Lagrange’s formula to the following data:
1
(1, 4), (3, 7), (4, 8) and (6, 11). [Ans: (2𝑥 3 − 21𝑥 2 + 103𝑥 + 36)]
30
• Use the polynomial to estimate a value for x=5. [ Ans:9]
6. Given the data:

x 300 304 305 307


y 2.4771 2.4829 2.4843 2.4871
Find y (301) using Lagrange’s formula.

7. Extrapolate the production of rice for 2005 from the following data:
Year 1980 1985 1990 1995 2000
Production in tonnes 251 279 319 361 439
8. Find the area bounded by x = 2 and x = 7 by using Trapezoidal rule for
x 2 3 4 5 6 7
y 0.66667 0.75 0.8 0.8333 0.8571 0.875
1
9. Evaluate  0 1
1
+ x dx corrected to three decimal place taking h = 0.5, 0.25 and 0.125.
1
Use Trapezoidal rule and Simpson 3 rule.

You might also like