Module-4: Numerical Differentiation and Integration
Module-4: Numerical Differentiation and Integration
Module-4: Numerical Differentiation and Integration
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:
and hence
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
(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 t0
Answer: Here t 0.1, t0 0 and h 0.1 . Therefore, u 1.
h
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
b
ba (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
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
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
ba (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