2. Unit-V Numerical Integration and Numerical Differentiation
Content
NUMERICAL INTEGRATION—Trapezoidal method & it’s problems method, Simpson’s one
third and three-eight rules & Problem based on Simpson’s one third and three-eight rules.
NUMERICAL DIFFERENTIATION—Solution of ordinary differential equations by following
methods: Euler’s Method, Picard’s Method and forth-order Runge- Kutta methods & it’s
problems
3. Unit-V Numerical Integration and Numerical Differentiation
1.1 Numerical Integration— The process of evaluating a definite integral from a set of
tabulated values of the integrand ( ) is called numerical integration. When this process is
applied to a function of single function is called quadrature.
Consider the definite integral∫ ( ) representsthe area between = ( ) with random
= and = .This integration is possible only when ( ) is explicitly given or otherwise it
is not possible to evaluate.
In numerical integration for given set of ( + 1) paired values of the function taking the
values , , … corresponding to the values , , … , where ( ) is not known
explicitly, it is possible to compute∫ ( ) by numerical integration by using various method.
1. Trapezoidal method
2. Simpson’s one third rule
3. Simpson’s three-eight rule
1.2 Newton-Cote’s quadrature— Let
= ( )
Where ( ) takes the values , , … , for , , … divide the interval ( , ) into n
sub-interval of width h, so that = , = + ℎ, = + 2ℎ, = + ℎ = .
Then = ∫ ( )
Putting = + ℎ
⟹ = ℎ
∴ = ℎ ( + ℎ)
By Newton’s forward interpolation formula
= ℎ + ∆ +
( − 1)
2!
∆ +
( − 1)( − 3)
3!
∆ + ⋯
Integration term by term, we get
4. Unit-V Numerical Integration and Numerical Differentiation
( )
= ℎ +
2
∆ +
(2 − 3)
12
∆ +
( − 2)
24
∆ + ⋯ … … ( )
This equation is known as Newton-Cote’s quadrature formula. Being a general formula, we
deduce many formula’s from this by taking = 1,2,3 …
1.3 Trapezoidal method— Assume that ( ) is continuous on [ , ] and divide [ , ] into n
subinterval of equal length.
∆ =
−
Using ( + 1) points = , = + ∆ , = + 2∆ , = + ∆ =
Computing the values of ( ) at these points
= ( ), = ( ), = ( ), = ( )
Approximate integral by using n trapezoids formed by using straight line segments between two
points ( , ) and ( , ) for 1 ≤ ≤ as shown in the figure:
Area of a trapezoid is obtained by adding the areas of rectangles and triangles.
= ∆ +
1
2
( − )∆ =
( )∆
2
Adding area of the n trapezoids, the approximation is
( ) ≈
( + )∆
2
+
( + )∆
2
+
( + )∆
2
+ ⋯ +
( + )∆
2
5. Unit-V Numerical Integration and Numerical Differentiation
This simplifies the trapezoidal rule.
( ) ≈
∆
2
( + 2 + 2 + ⋯ + 2 + )
≈
∆
[( + ) + 2( + + ⋯ + )]
We can also replace ∆ withℎ. So the formula will be
( ) =
ℎ
2
[( + ) + 2( + + ⋯ + )]
≈ [( ℎ ) + 2( ℎ )]
Another Procedure—
Putting = 1in ( ) and taking the curve through ( , ) and ( , ) as straight line. i.e.
Polynomial of first order so that differences of order higher than first become zero, we get
( ) = ℎ +
1
2
∆ =
ℎ
2
( + )
Similarly
( ) = ℎ +
1
2
∆ =
ℎ
2
( + )
⋮
( ) =
ℎ
2
( )
( + )
Adding these n integrals, we obtain
( ) =
ℎ
2
[( + ) + 2( + + ⋯ + )]
This is known as the trapezoidal rule.
6. Unit-V Numerical Integration and Numerical Differentiation
Example—Evaluate∫ by using Trapezoidal rule. Verify result by actual integration.
Solution—given that ( ) =
Interval length ( – ) = (3 – (−3) ) = 6
So we divide 6 equal intervals with ℎ = 6/6 = 1.0
And tabulate the values as below
-3 -2 -1 0 1 2 3
= 81 16 1 0 1 16 81
We know that—
( ) ≈
ℎ
2
[( + ) + 2( + + ⋯ + )]
≈
1
2
[(81 + 81) + 2 (16 + 1 + 0 + 1 + 16)] =
162 + 68
2
= 115
By actual integration ∫ = − − = + = = 97.5
Example— Evaluate ∫ ( )
by using Trapezoidal rule with h = 0.2.
Solution— Given ( ) = ( )
and interval length ( – ) = (1 – 0 ) = 1.
So we divide 6 equal intervals with h= 0.2
We know ∫ ( ) ≈ [( + ) + 2( + + ⋯ + )]
1
(1 + )
≈
0.2
2
[(1 + 0.5000) + 2(0.96154 + 0.86207 + 0.73529 + 0.60976)]
=(0.1)[ (1.05) + 6.33732 ]
= 0.783732
0 0.2 0.4 0.6 0.8 1
y =
1
(1 + x )
1 0.96154 0.86207 0.73529 0.60976 0.5000
7. Unit-V Numerical Integration and Numerical Differentiation
1.4 Simpson’s one third rule— Putting = 2 in ( ) and taking the curve through
( , ), ( , ) and ( , ) as a parabola, i.e. a polynomial of second order so that differences
of higher than second vanish, we get
( ) = 2ℎ + ∆ +
1
6
∆ =
ℎ
3
( + 4 + )
Similarly
( ) =
ℎ
3
( + 4 + )
⋮
∫ ( ) =( )
( + 4 + ), is even.
Adding these n integrals, we have when is even
( ) =
ℎ
3
[( + ) + 4( + + ⋯ + ) + 2( + + ⋯ + )]
=(ℎ/3) [ (sum of the irst and last ordinates ) + 2 (Sum of remaining even ordinates)
+4 ( sum of remaining odd ordinates) ]
This is known as the Simpson’s one third rule or simply Simpson’s rule.
1.4 Simpson’s three-eight rule — Putting = 3 in ( ) and taking the curve through
( , ): = 0,1,2,3 as polynomial of third order so that the differences above the third order
vanish, we get
( ) = 3ℎ +
3
2
∆ +
3
2
∆ +
1
8
∆ =
3ℎ
8
( + 3 + 3 + )
Similarly, ∫ ( ) = ( + 3 + 3 + ) and so on.
adding all these expressions from to + ℎ, where n is multiple of 3, we obtain
( ) =
3ℎ
8
[( + ) + 3( + + + … + ) + 2( + + ⋯ + )]
= (3ℎ/8) [ (sum of the irst and last ordinates )
+ 2 (Sum of multiples of three ordinates) + 3 ( sum of remaining ordinates)]
Which is known as Simpson’s three-eight rule.
8. Unit-V Numerical Integration and Numerical Differentiation
Example— Evaluate∫ by using Simpson’s one third rule and Simpson’s three-eight
rule. Verify result by actual integration.
Solution—We are given that ( ) =
Interval length ( – ) = (3 – (−3) ) = 6
So we divide 6 equal intervals with ℎ = 6/6 = 1.0 and tabulate the values as below
-3 -2 -1 0 1 2 3
= 81 16 1 0 1 16 81
By Simpson’s one third rule
=
ℎ
3
[( + ) + 4( + + ) + 2( + )]
= [(81 + 81) + 4(16 + 0 + 16) + 2(1 + 1)] = = 98
By Simpson’s three-eight rule
=
3ℎ
8
[( + ) + 3( + + + ) + 2 )]
= [(81 + 81) + 3(16 + 1 + 1 + 16) + 2 × 0] = = 99
By actual integration ∫ x dx = − − = + = = 97.5
Example—Evaluate∫
.
by using Trapezoidal rule, Simpson’s one third rule and
Simpson’s three-eighth rule.
Solution—We are given that ( ) = Interval length ( – ) = (5.2 – 4 ) = 1.2.So
we divide 6 equal intervals with ℎ = 0.2 and tabulate the values as below
4.0 4.2 4.4 4.6 4.8 5.0 5.2
= 1.39 1.44 1.48 1.53 1.57 1.61 1.65
By Trapezoidal rule
=
.
ℎ
2
[( + ) + 2( + + ⋯ + )]
=
0.2
2
[(1.39 + 1.65) + 2 (1.44 + 1.48 + 1.53 + 1.57 + 1.61)]
= (0.1) [ 3.04 + 2(7.63) ]
= 1.83
9. Unit-V Numerical Integration and Numerical Differentiation
By Simpson’s one third rule
.
=
ℎ
3
[( + ) + 4( + + ) + 2( + )]
= (0.2/3) [ (1.39 + 1.65) + 2 (1.48 + 1.57) + 4 (1.44 + 1.53 + +1.61) ]
= (0.0667) [ 3.04 + 2(3.05) + 4 (4.58) ]
= 1.83
By Simpson’s three-eight rule
.
=
3ℎ
8
[( + ) + 3( + + + ) + 2 )]
= (
× .
)[ (1.39 + 1.65) + 2 (1.53) + 3 (1.44 + 1.48 + 1.57 + +1.61) ]
= (0.075 ) [ 3.04 + 3.06 + 3 (6.1) ]
= 1.83
2 Numerical Differentiations—
2.1 Picard’s Method— Let us considers the first order differential equation = ( , ) and
( ) = then from the Picard’s method, nth
approximation to the solution of Initial value
problem eq (i) is
= +∫ ( , )
Example —Use Picard’s method to solve = − upto the fourth approximation, when
(0) = 1.
Solution—Given differential equation is = − , when (0) = 1.
Picard’s formula says
= +∫ ( , )
= − = 1 − × 1 = 1 −
2
= − = 1 − 1 −
2
= 1 − −
2
= 1 −
2
+
8
= − = 1 − 1 −
2
+
8
= 1 − −
2
+
8
= 1 −
2
+
8
−
48
16. Unit-V Numerical Integration and Numerical Differentiation
Exercise
1. If = 2 − and = 2when = 1, perform three iterations of Picard’s method to estimate a value
for y when x= 1.2. Work to four places of decimals throughout and state how accurate is the result of the
third iteration.
2. Solve ′ = − ,and y(0) = 1, determine the values of y at x =(0.01)(0.01)(0.04) by Euler’s method.
3. Obtain the values of y at x= 0.1, 0.2 using R.K. method of fourth order for the differential equation ′
=
− , given y(0) =1.5.
4. Apply Rungakutta method to find an approximation value of , when = 0 given that = − , =
0,when = 0 with ℎ = 0.1
5. Find y (0.2) given = – , (0) = 2 taking h = 0.1. by Runge –Kutta method.
6. Evaluate y(1.4) given = + , (1.2) = 2. By Runge-Kutta Method.
17. Unit-V Numerical Integration and Numerical Differentiation
Reference
1. http://en.wikipedia.org/wiki/File:Integral_as_region_under_curve.svg
2. http://www.google.co.in/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0CAcQ
jRw&url=http%3A%2F%2Fcalculator.mathcaptain.com%2Ftrapezoidal-rule-
calculator.html&ei=z7qnVKa5DsiNuATbtoHoCQ&bvm=bv.82001339,d.c2E&psig=AFQjCNHqSN98kFMHM
wdx482zLm5KtRJA6A&ust=1420364847649006
3. Numerical Method for Science and Computer science by M.K. Jain, S.R.K. Iyenger, R.K. Jain
4. Higher Engineering Mathematics, B.S. Grewal, Khanna Publishers.
5. Higher Engineering Mathematics, B V Ramana, McGraw Hill Education