Numerical Differentiation
Numerical Differentiation
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.
𝑥−𝑥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!
𝑑2𝑦 1 11 4 5 137 6
2
= 2 [∆2 𝑦0 − ∆3 𝑦0 + ∆ 𝑦0 − ∆5 𝑦0 + ∆ 𝑦0 … … … … … ]
𝑑𝑥 ℎ 12 6 180
𝑥−𝑥𝑛
Since 𝑥 = 𝑥𝑛 + 𝑝ℎ so that 𝑝 = ℎ
𝑑𝑝 1
Therefore,𝑑𝑥 = ℎ
Now,
𝑑𝑦 𝑑𝑦 𝑑𝑝 1 2𝑝+1 3𝑝2 +6𝑝+2
= 𝑑𝑝 ∙ 𝑑𝑥 = ℎ [∇𝑦𝑛 + ∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ⋯ … … … … ] (1)
𝑑𝑥 2! 3!
𝑑2𝑦 1 11 4 5 137 6
= [∇2 𝑦𝑛 + ∇3 𝑦𝑛 + ∇ 𝑦𝑛 + ∇5 𝑦𝑛 + ∇ 𝑦𝑛 … … … … … ]
𝑑𝑥 2 ℎ2 12 6 180
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 ).
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.
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:
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.