You are on page 1of 22

Module-4: Numerical Differentiation and Integration

(1). Numerical (differentiation) Derivatives using (a) Newton’s Forwarded Formula


(b) Newton’s Backward Formula
(c) Stirlling’s Formula
(2). Maxima & Minima for tabulated values
(3). Numerical integration (a) Trapezoidal rule
(b) Simpsons 1/3rd
(c) 3/8th rules
(d) Romberg’s method
(e) Two and Three point Gaussian quadrature formula

(1). Numerical (differentiation) Derivatives using:


 So, far we were finding polynomial function/curve y=f(x), passing through the (n+1) ordered
pairs (xi, yi); i=0,1,2,3,….n.
 Now, we are trying to get derivative value of such curves/functions at a given point x= xk
 [ x0 , x1 ] .
 To get the derivative, we first find curve/function y=f(x) using appropriate method and then
differentiate & get its required value at the point.

(a) Derivative using Newton forward interpolation formula:


By the Newton forward interpolation formula, we have

x  x0
where, u  x  x0  uh .
h
dy dy du dy 1 du 1
Now,  .  . , as u  x0  xh  
dx du dx du h dx h
Similarly, we can find…
(b). Derivative using Newton backward interpolation formula:

(c). Derivative using Stirling’s central difference formula:

 dy  1  Y0  Y1  (3u 2  1)  3Y1  3Y2  (4u 3  2u) 4 


      u  2
Y1      Y2  .....
 dx  x  x0 uh h  2  6  2  24 

and hence

 d2y  1  2  3Y1  3Y2  (6u 2  1) 4 


 2  2 
 Y1  u     Y2  .....
 dx  x  x0 uh h   2  12 
1. The population of a certain town (in lakhs) is shown in the following table

Year 1951 1961 1971 1981 1991

Population 19.96 38.65 58.81 77.21 94.61

Estimate the rate of growth of the population in the year 1961.

Solution: The difference table for the given data is

x (year) y  f ( x)  f ( x)  2 f ( x)  3 f ( x)  4 f ( x)
(population)

1951 19.96
18.69
1961 38.65 1.47
20.16 -3.23
1971 58.81 -1.76 3.99
18.4 0.76
1981 77.21 -1
17.4
1991 94.61

x  x0
Here x  1961, x0  1951and h  10 . Therefore, u  1.
h

The growth of the population in the year 1961 is

 (2u  1) 2 (3u 2  6u  2) 3 
  f ( x 0 )   f ( x0 )   f ( x0 ) 
 2 6 
 
dy 1  (4 u 3
 18 u 2
 22u  6) 
     4 f ( x0 )  ... 
 dx  x 1961 h  24 
 
 
 

 1 1 2 
1 18.69  (1.47)  (3.23)  (3.99) 
 2 6 24
10  
 

= 2.029 lakhs/year.
2. In a Machine, a slider moves a fixed straight rod. Its distance x cms along the rod is
given below for various values of the time t seconds. Find the velocity and the
acceleration of the slider when t=0.1seconds.

t 0 0.1 0.2 0.3 0.4 0.5 0.6

x 30.13 31.62 32.87 33.64 33.95 33.8 33.24

t  t0
Answer: Here t  0.1, t0  0 and h  0.1 . Therefore, u   1.
h

Velocity = 14.316 cm/sec.

Acceleration= -26.16 cm/sec2 .

3.

Slope dy/dx=5/8=0.625
4

Scanned by CamScanner
(2). Maxima & Minima for tabulated values

Scanned by CamScanner
Scanned by CamScanner
HW

Scanned by CamScanner
*Maxima & Minima for unequal interval example
(By Lagrange's Formula)

Scanned by CamScanner
(3) Numerical integration

Scanned by CamScanner
(a)

(b)

(c)

Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
(d)

Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Two and three points Guassian quadrature formulae:
1
1) Two point Gaussian quadrature formula for I   f ( x) dx is given by
1

 1   1 
1
I  f ( x) dx  f 
1

3
f 


3

1
2) Three point Gaussian quadrature formula for I   f ( x) dx is given by
1

OR I  0.55555555 f (0.77459667)  0.88888889 f (0)  0.55555555 f (0.77459667).

b
ba  (b  a ) t  (b  a ) 
1
Note: a f ( x) dx    f 
 2  1  2
 dt .

e
 x2
1. Evaluate cos x dx by Gaussian two and three point quadrature formulas.
1

Solution: Let f ( x)  e x cos x .


2

(i) By the Gaussian two point quadrature formula, we have


 1 
 1 
1

1
 f ( x) dx  f 
f 



3
3
 0.71653  0.71653
 1.43306
(ii) By the Gaussian three point quadrature formula, we have
1

 f ( x) dx  0.5555555 f (0.7745966)  0.88888889 f (0)  0.5555555 f (0.77459667)


1

 0.304867487  0.88888889  0.304867487


 1.498623865

1
1
2. Evaluate  1 x
0
2
dx by Gaussian two point quadrature formula.

1
Solution: Let f ( x)  . Here a  0 and b  1.
1  x2
We have
b
ba  (b  a ) t  (b  a ) 
1

a f ( x) dx    f 
 2  1  2
 dt

1
1 0   (1  0) t  (1  0) 
dx  
1
1
Therefore,   f   dt
0
1 x 2
 2  1  2 
 t 1
1
1

2  f 
1
 dt
2 
1
1 1

2 
1  t 1
2
dt
1  
 2 
1
1
 2 dt
1
t  2t  5
2

1
1
 2  g (t ) dt where g (t ) 
1
t  2t  5
2

 1   1 
 g  g 
 3  3
 0.7868
2

e
x
3. Evaluate dx by Gaussian two and three point quadrature formulas.
1

You might also like