0% found this document useful (0 votes)
23 views12 pages

Numerical Integration Methods Overview

Uploaded by

Shivam Pal
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)
23 views12 pages

Numerical Integration Methods Overview

Uploaded by

Shivam Pal
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

Engineering Computing Lab (ME 502)

Module 03: Numerical Integration


Handout for Lab Session
Dept. of Mechanical Engg, IIT Guwahati

----------------------------------------------------------------------
Numerical Integration
----------------------------------------------------------------------

Consider definite integral


𝑏
𝐼 = ∫ 𝑓(𝑥)𝑑𝑥
𝑎

Take an example of 𝑓(𝑥) = sin 𝑥 and 𝑎 = 0 and 𝑏 = 𝜋/2. Then, the anti-derivative of 𝑓(𝑥) is -
cos 𝑥. Hence,
𝜋⁄
2
𝜋/2
∫ sin 𝑥 𝑑𝑥 = [− cos 𝑥]0 = −𝑐𝑜 𝑠(𝜋 /2) + cos 0 = 1
0

However, in many situations performing integration numerically is necessary instead


of integrating analytically as done above. The following cases are few cases, in which we need
to perform integration numerically.
Case1:

If the function 𝑓(𝑥) does not have anti-derivative which can be expressed in terms elementary
functions numerical integration is necessary. Example of elementary functions are
polynomials, trigonometric functions, logarithmic functions, etc. In such situations numerical
integration is necessary instead of finding the value analytically. One example of such functions
is error function or erf(𝑥).
𝑥
2 2
erf(𝑥) = ∫ 𝑒 −𝑡 𝑑𝑡
√𝜋 0

Anti-derivative of error function cannot be expressed in elementary functions. Hence, the


numerical integration is used to evaluate definite integral of this function.
Case2:

In some applications the values of the 𝑓(𝑥) at discrete 𝑥 values are available and mathematical
expression for 𝑓(𝑥) is not available. For example, during the flight of an aero plane travel if
we have velocity of flight at different time instances recorded from the aircraft velocity
measuring instrument, we calculate the total distance travelled by the flight by numerical
𝑇
integration ∫0 𝑉(𝑡)𝑑𝑡. In this example we do not have mathematical expression for 𝑉(𝑡)
because flight velocity is varied by the pilot according to the requirement of travel, weather
conditions, turbulence level in the air, etc. The velocity need not vary according to a function
which can be expressed in mathematical function. However, we have values of 𝑉(𝑡) at different
values of ‘𝑡’. This means in the absence of explicit mathematical expression for 𝑓(𝑡)
integration is performed numerically. The data we obtain from experiments usually contains
value of 𝑓(𝑥𝑖 ) at discrete sampling 𝑥𝑖 points and in such applications integration is performed
numerically instead of analytically.

Case3:

In some applications anti-derivatives of the function 𝑓(𝑥) may be available, but very complex
and difficult to evaluate analytically, compared to evaluating it numerically. For example,
evaluating anti-derivatives analytically becomes difficult when the anti-derivative involves
complex series and special functions.
Numerical integration is used in many scientific and engineering applications. For example,
they are used in FEM (Finite Element Method) to solve differential equations. The value of
𝑏
∫𝑎 𝑓(𝑥) 𝑑𝑥 represents geometrically the area under the curve the 𝑓(𝑥) between limits 𝑥 = 𝑎
and 𝑥 = 𝑏. In any numerical integration method, increasing number of sampling points
increases accuracy of the integration result.
Many methods are available for numerical integration. Different methods provide
different orders of accuracy and cost of computation. Higher order accurate methods usually
require higher number of computations than lower order accurate methods. In many
applications higher order methods are essential to obtain acceptable results. There are many
numerical methods such as
(a) Mid-point formula
(b) Trapezoidal rule
(c) Simpson's 1/3 rule
(d) Simpson's 3/8 rule
(e) Boole's method
(f) Gauss quadrature
Some group of numerical integration methods are referred as Newton – Cotes methods. In
Newton – Cotes method uniform intervals of 𝑥𝑖 is used. In the above list of methods, methods
from (a) to (e) come under Newton – Cotes category. However, for Gauss quadrature method
specific distribution of 𝑥𝑖 values with nonuniform intervals are used as sampling points.

Some numerical methods locally curve fit with polynomial function using local set of
consecutive points to find the curve fitted polynomial function 𝑓(𝑥) and find the definite
integration using the obtained polynomial function. Higher the order of polynomial function
used for curve fitting, higher the order of accuracy the numerical integration method provides.
To demonstrate how the curve fitting is performed. Consider the following example.

Assume that we have values of 𝑦𝑜 , 𝑦1, 𝑦2, … 𝑦𝑛 at values of 𝑥0, 𝑥1, 𝑥2, … 𝑥𝑛 , respectively,
with uniform intervals of ℎ (ℎ = 𝑥𝑖+1 − 𝑥𝑖 ) . We want to find out the numerical integration
between 𝑥0 to 𝑥𝑛 . Consider to use second order polynomial for local curve fitting. Choose any
representative consecutive points (𝑥𝑖 , 𝑦𝑖 ), ( 𝑥𝑖+1 , 𝑦𝑖+1 ), (𝑥𝑖+2 , 𝑦𝑖+2 ) with 𝑥𝑖+1 = 𝑥𝑖+ℎ , 𝑥𝑖+2 =
𝑥𝑖+2ℎ . We want to curve fit second order polynomial through these points. We place local co-
ordinates 𝜉 = 𝑥 − 𝑥𝑖 such that the origin of 𝜉 coordinate is located at 𝑥𝑖 . The co-ordinates
𝑥𝑖, 𝑥𝑖 + ℎ, 𝑥𝑖 + 2ℎ are located at 𝜉 = 0, ℎ, 2ℎ, respectively. In terms of 𝜉, in new local co-
ordinate system the points (𝑥𝑖 , 𝑦𝑖 ), (𝑥𝑖+1 , 𝑦𝑖+1 ), (𝑥𝑖+2 , 𝑦𝑖+2 )are located at (0, 𝑦𝑖 ), (h, 𝑦𝑖+1), (2h,
𝑦𝑖+2 ), where 𝜉 = 𝑥 − 𝑥𝑖 . The second order polynomial for the local curve fitting can be
expressed

𝑦 = 𝑎0 + 𝑎1 𝜉 + 𝑎2 𝜉 2 (1)

In the above equation 𝑎0, 𝑎1, 𝑎2 are coefficients of the polynomial. To curve fit the polynomial
we need to find coefficients 𝑎0, 𝑎1, 𝑎2. The coefficients are found as following. Since all these
at (0, 𝑦𝑖 ), (h, 𝑦𝑖+1), (h, 𝑦𝑖+2 ) are on the curve represented by equation (1). Substitute (0, 𝑦𝑖 ) in
the above equation (1) we get

𝑦𝑖 = 𝑎0

Substituting (ℎ, 𝑦𝑖+1) in equation (1) we get

𝑦𝑖+1 = 𝑎0 + 𝑎1 ℎ + 𝑎2 ℎ2

𝑦𝑖+1 = 𝑦𝑖 + 𝑎1 ℎ + 𝑎2 ℎ2 (2)

Similarly, substituting (2ℎ, 𝑦𝑖+2 ) in equation (1) we get

𝑦𝑖+2 = 𝑎0 + 2𝑎1 ℎ + 4𝑎2 ℎ2

𝑦𝑖+2 = 𝑦𝑖 + 2𝑎1 ℎ + 4𝑎2 ℎ 2 (3)

in equations (2) and (3) 𝑦𝑖 , 𝑦𝑖+1, 𝑦𝑖+2 and ℎ are known values. Using equations (2) and (3) we
can get
4𝑦𝑖+1 − 3𝑦1 − 𝑦𝑖+2
𝑎1 =
2ℎ
𝑦𝑖 + 𝑦𝑖+2 − 2𝑦𝑖+1
𝑎2 =
2ℎ2
At this point we know the values of 𝑎0, 𝑎1, 𝑎2. Hence the definite integral between 𝑥𝑖 and 𝑥𝑖+2
can be evaluated as following

𝑦(𝜉) = 𝑎0 + 𝑎1 𝜉 + 𝑎2 𝜉 2

where 𝜉 = 0 𝑡𝑜 2ℎ
2ℎ 2ℎ

𝐼 = ∫ 𝑦(𝜉)𝑑 𝜉 = ∫ (𝑎0 + 𝑎1 𝜉 + 𝑎2 𝜉 2 )𝑑 𝜉
0 0

From which we get



𝐼= (𝑦 + 4𝑦𝑖+1 + 𝑦𝑖+2 )
3 𝑖
When we apply integration in the groups of 𝑖 = 0, 1, 2, 𝑖 = 2, 3, 4 and 𝑖 = 4, 5, 6 … so on and
sum them

From 𝑖 = 0, 1, 2: (𝑦0 + 4𝑦1 + 𝑦2)
3


From 𝑖 = 2, 3, 4: (𝑦2 + 4𝑦3 + 𝑦4)
3


From 𝑖 = 4, 5, 6: (𝑦4 + 4𝑦5 + 𝑦6)
3




From 𝑖 = 𝑛 − 2, 𝑛 − 1, 𝑛: (𝑦𝑛−2 + 4𝑦𝑛−1 + 𝑦𝑛 )
3

Summing all above components, we get the expression for the integration value as

𝐼𝑠,1 = [𝑦 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ ) + 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ ) + 𝑦𝑛 ]
3 3 0
Which can be written in summation form as
ℎ 𝑛⁄ (𝑛⁄ )−1
𝐼𝑠,1 = [𝑓(𝑥0 ) + 4 ∑𝑖=12 𝑓(𝑥2𝑖−1 ) + 2 ∑𝑖=12 𝑓(𝑥2𝑖 ) + 𝑓(𝑥𝑛 )] (4)
3 3

where (ℎ = 𝑥𝑖+1 − 𝑥𝑖 )

The above formula is same as the formula of Simpson’s 1/3rd rule. The order of accuracy of
Simpson’s 1/3rd rule is 4.

Similarly, we can use 3rd order polynomial in the form

𝑓(𝜉) = 𝑎0 + 𝑎1 𝜉 + 𝑎2 𝜉 2 + 𝑎3 𝜉 3

and locally curve fit using 4 consecutive points and find out the coefficients 𝑎0, 𝑎1, 𝑎2, 𝑎3.
Then we can integrate 𝑓(𝜉) between 𝜉 = 0 to 𝜉 = 3ℎ, by following the similar procedure
explained above. Then, we get the following integration formula.
3ℎ
𝐼𝑠,3 = [𝑓(𝑥0 ) + 3𝑓(𝑥1 ) + 3𝑓(𝑥2) + 𝑓(𝑥3 )] (5)
8 8

This above formula is same as the formula of Simpson’s 3/8 rule. The order of accuracy
of Simpson’s 3/8 rule is 5.
Similarly, we can curve fit using five consecutive points and derive the integration formula
which will give you the following expression.
2ℎ
𝐼𝑏 = [7𝑓(𝑥0) + 32𝑓(𝑥1 ) + 12𝑓(𝑥2 ) + 32𝑓(𝑥3) + 7𝑓(𝑥4 )] (6)
45

The above expression is same as the expression of numerical integration given by Boole’s
rule method. The order of accuracy of Boole’s rule is 6th order.

Curve fitting methods explained above comes under group of numerical methods referred
as Newton – Cotes Methods. In the Newton – Cotes Formula sampling points are uniformly
placed (meaning h = 𝑥𝑖+1 − 𝑥𝑖 is constant for all 𝑖 values from 1 to n).

Midpoint rule

Midpoint rule approximate the function as constant where the constant value of 𝑓(𝑥) is
evaluated at midpoint between 𝑥0 and 𝑥1. Since 𝑓(𝑥) is considered to be constant between
consecutive intervals the polynomial is of zero-degree.

Fig.: Graphical representation of the Midpoint rule (ref [3])

The integral can be approximated as


𝑥𝑖 + 𝑥𝑖+1
𝐼 ≈ 𝐼𝑚𝑖𝑑 = ℎ ∑𝑛−1
𝑖=0 𝑓( ) (7)
2

where ℎ = 𝑥𝑖+1 − 𝑥𝑖
In a graphically the midpoint rule approximates the area under the curve with rectangle. This
differs from the Trapezoidal rule, in which the area under the curve approximated as trapezoids.
When the interval is subdivided into n subintervals the integration can be approximated as

1
𝐼 ≈ 𝐼𝑐𝑚𝑖𝑑 = ℎ ∑𝑛−1
𝑖=0 𝑓(𝑥0 + (𝑖 + 2) ℎ) (8)
The advantage of the Mid-point rule over the trapezoidal rule is that the Midpoint rule can be
used more effectively for finding the integrals near an integrable singularity.

Trapezoidal rule
In Trapezoidal rule the curve approximated as a straight line through two consecutive points
(𝑥0, 𝑦1), (𝑥1, 𝑦1) which is a polynomial of the first order. It treats the area under the curve as a
series of trapezoids rather than exact segments of the curve. When we use first order polynomial
for interpolation, we get expression for integration by trapezoidal rule.

Fig.: Graphical representation of Trapezoidal rule (ref [3]).


The area under the curve between two consecutive points is given by

𝑥 +ℎ 1 ℎ
𝐼 ≈ 𝐼𝑡 ≈ ∫𝑥 0 𝑓(𝑥)𝑑𝑥 = ℎ (𝑦0 + 2
(𝑦1 − 𝑦0 )) = 2
(𝑦0 + 𝑦1 )
0


𝐼𝑡 = 2
[𝑓(𝑥0 ) + 𝑓(𝑥1 )] (9)

To increase accuracy, the Composite Trapezoidal rule can be used. This involves breaking the
total interval into '𝑛' equi-spaced sub-intervals, applying the trapezoidal rule to each, and
summing the results.

The composite formula is given as


𝑥 +𝑛ℎ ℎ
𝐼 ≈ 𝐼𝑐𝑡 ≈ ∫𝑥 0 𝑓(𝑥)𝑑𝑥 = [(𝑦0 + 𝑦𝑛 ) + 2(𝑦1 + 𝑦2 + ⋯ + 𝑦𝑛−1 )]
0 2


𝐼𝑐𝑡 = [𝑓(𝑥0 ) + 2 ∑𝑛−1
𝑖=1 𝑓(𝑥𝑖 ) + 𝑓(𝑥𝑛 )] (10)
2

where 𝑦0 and 𝑦𝑛 are the function values at the overall interval's endpoints.
Gauss quadrature rule
Gauss quadrature rule is also known as Gauss integration methos. In Gauss quadrature method
𝑥𝑖 values are sampled at a specific distribution with nonuniform intervals.

Gauss Integration method is prescribed for numerical integration of function g(𝜉) in the
interval of 𝜉 = −1 to 𝜉 = +1. Gauss quadrature is evaluated at a specific 𝜉 sample values.
The specific values of 𝜉 used as sampling depend on number of total sampling points ‘n’.

For 𝑛 = 1, 𝜉1 = 0

For 𝑛 = 2, 𝜉1 = −0.57735 , 𝜉2 = +0.57735

For 𝑛 = 3, 𝜉1 = +0.77460 , 𝜉2 = 0.0000 , 𝜉3 = −0.77460

The sampling points used in Gauss quadrature are referred as Gaussian points. The expression
for numerical integration using Gaussian quadrature is given by
+1
𝐼 = ∫−1 𝑔( 𝜉)𝑑𝜉 = ∑𝑖=𝑛
𝑖=1 𝑊𝑖 𝑔(𝜉𝑖 ) (11)

Hence 𝑊𝑖 are weights of integration corresponding to Gaussian points 𝜉𝑖 which are referred as
Gaussian point weights. The value of weights also depends on total number of sampling points
‘n’.

For 𝑛 = 1, 𝑊1 = 2

For 𝑛 = 2, 𝑊1 = 1.000 , 𝑊2 = 1.000

For 𝑛 = 3, 𝑊1 = 0.55556 , 𝑊2 = 0.88889 , 𝑊3 = 0.55556


Table: The values of weights sampling points for different total number of sampling points n
for Gauss quadrature.

𝑛 𝑖 or 𝑗 or 𝑘 𝑊𝑖 or 𝑊𝑗 or 𝑊𝑘 𝜉𝑖 or 𝜂𝑗 or 𝜁𝑘
1 1 2 0
2 1 1.00000 -0.57735
2 1.00000 +0.57735
3 1 0.55556 +0.77460
2 0.88889 0.00000
3 0.55556 -0.77460

For 2-dimensional and 3-dimensional Gauss integration formula is given by


+1 +1 𝜉 𝑛𝜂 𝑛
∫−1 ∫−1 g(𝜉, 𝜂)𝑑𝜉𝑑𝜂 = ∑𝑖=1 ∑𝑗=1 𝑊𝜉 𝑊𝜂 g(𝜉𝑖 , 𝜂𝑗 ) (12)

+1 +1 +1 𝜉 𝜂 𝑛 𝜁𝑛 𝑛
∫−1 ∫−1 ∫−1 g(𝜉, 𝜂, 𝜁)𝑑𝜉𝑑𝜂𝑑𝜁 = ∑𝑖=1 ∑𝑗=1 ∑𝑘=1 𝑊𝜉 𝑊𝜂 𝑊𝜁 g(𝜉𝑖 , 𝜂𝑗 , 𝜁𝑘 ) (13)
Accuracy of Gauss quadrature
If the integrand g(𝜉) is a polynomial of order 𝑝, and we use n number of sampling points such
that 𝑝 = 2𝑛 − 1, the numerical integration value obtained from Gauss quadrature will be exact.
A numerical solution is exact means the result which we obtain numerically is exactly equal to
the integral value obtained using analytical method even though, in numerical method, we use
values of function at discrete points instead of continuous values as in analytical method. Here,
the error is exactly equal to zero rather than small.

For example, if the integrand g(𝜉) is a 4th order polynomial such as


+1

𝐼 = ∫ (𝑎4 𝜉 4 + 𝑎3 𝜉 3 + 𝑎2 𝜉 2 + 𝑎1 𝜉 + 𝑎0 ) 𝑑𝜉
−1

In this case 𝑝 = 4. From 𝑝 = 2𝑛 − 1 we get 𝑛 = 2.5. But since 𝑛 is an integer, the value 𝑛 is
approximated to nearby higher integer value, that is 𝑛 = 3. This means for the above 4th order
polynomial Gauss quadrature yields exact solution if we use just 𝑛 = 3 sampling points. If we
use more than three sampling points, the method would still give the exact solution but takes
higher number of calculations.
Similarly for the polynomials of the order 1, 2, 3, the number of minimum sampling points
needed for exact solution are 1, 2, 2, respectively.

If the integrand g(𝜉) is not a polynomial, Gauss quadrature integration method provides far
higher accurate results compared to Newton-Cotes methods for a given number of sampling
points.
Gauss quadrature is specified for integration in which x ranges in [-1 +1]. If the x range is not
[-1 +1], then 𝑥 variable is linearly transformed into a different variable 𝜉 such that 𝜉 ranges in
[-1 +1]. The integration expression in terms of x is converted into integration in terms of ξ
coordinates completely and then the integration is performed using the transformed coordinate
𝜉.
Composite formulae for numerical integration
Following are the composite formulae for different methods of numerical integration. The
following methods fall under Newton cotes methods and the sampling points are equally
spaced. For all of the following methods we have

𝑥1 = 𝑥0 + ℎ, 𝑥2 = 𝑥0 + 2ℎ … 𝑥𝑖 = 𝑥0 + 𝑖ℎ.

Trapezoidal rule
𝑥 +𝑛ℎ ℎ
𝐼 ≈ ∫𝑥 0 𝑓(𝑥)𝑑𝑥 = [(𝑦0 + 𝑦𝑛 ) + 2(𝑦1 + 𝑦2 + ⋯ + 𝑦𝑛−1 )]
0 2

which can also be expressed in summation form as


𝐼= [𝑓(𝑥0 ) + 2 ∑𝑛−1
𝑖=1 𝑓(𝑥𝑖 ) + 𝑓(𝑥𝑛 )] (14)
2

Simpson’s 1/3 rule


n should be an even integer number

𝐼= [𝑦 + 4(𝑦1 + 𝑦3 + 𝑦5 + ⋯ ) + 2(𝑦2 + 𝑦4 + 𝑦6 + ⋯ ) + 𝑦𝑛 ]
3 0
which can also be expressed in summation form as
ℎ 𝑛⁄ (𝑛⁄ )−1
𝐼𝑠,1 = [𝑓(𝑥0 ) + 4 ∑𝑖=12 𝑓(𝑥2𝑖−1 ) + 2 ∑𝑖=12 𝑓(𝑥2𝑖 ) + 𝑓(𝑥𝑛 )] (15)
3 3

Simpson’s 3/8 rule


n should be an integer number which is multiple of 3.
3ℎ
𝐼𝑠,3 = [𝑓(𝑥0 ) + 3𝑓(𝑥1 ) + 3𝑓(𝑥2) + 𝑓(𝑥3 )]
8 8
3ℎ 𝑛⁄ 𝑛⁄ (𝑛⁄ )−1
𝐼𝑠,3 = 8
[∑00 0 + 𝑓(𝑥0) + 3 ∑𝑖=13 𝑓(𝑥3𝑖−2 ) + 3 ∑𝑖=13 𝑓(𝑥3𝑖−1 ) + 2 ∑𝑖=13 𝑓(𝑥3𝑖 ) + 𝑓(𝑥𝑛 )] (16)
8
References
1. R. L. Burden and J.D. Faires, Numerical Analysis, Ninth Edn., Thomson
Brooks/Cole,2011.
2. K. E. Atkinson, An Introduction to Numerical Analysis, Second Edn., Wi ley,2008.
3. Advance Engineering Mathematics : B. S. Grewal.
4. M. T. Heath, Scientific Computing-An Introductory Survey, Revised Second
Edition, SIAM,2018.
5. S. D. Conte and C. deBoor, Elementary Numerical Analysis, Third Edition, Tata
McGraw-Hill Education,2005.
6. J. D. Hoffman, Numerical Methods for Engineers and Scientists, Second Edn., CRC
Press,2001.
7. G. M. Phillips and P. J. Taylor, Theory and Applications of Numerical Analysis,
Second Edition, Academic Press,1996.
8. F. B. Hildebrand, Introduction to Numerical Analysis, Second (Revised) Edition,
Courier Dover Publications,1987.
9. R. W. Hamming, Numerical Methods for Scientists and Engineers, Second Edition,
Dover,1986.
Instructions
1. Separate C-language codes should be written for numerical integration methods
(a) Trapezoidal rule (use Eq. (14)). Name the file as ‘trepizoidal.c’
(b) Simpson’s 1/3 (use Eq. (15)). Name the file as ‘simpson1_3.c’
(c) Simpson’s 3/8 rule (use Eq. (16)). Name the file as ‘simpson3_8.c’
(d) Gauss quadrature 1D (use Eqs (11)). Name the file as ‘gause1d.c’
(e) Gauss quadrature 2D (use Eqs (12)). Name the file as ‘gause2d.c’
(f) Gauss quadrature 3D (use Eqs (13)). Name the file as ‘gause3d.c’
2. For evaluating values f(𝑥), f(𝑥, 𝑦), f(x,y,z) etc, use C-language functions feature. This
will enable you to use the same code for integration of any other functions by just
modifying f(x) expression within the function .
3. Compare your numerical results with exact solutions wherever it is possible.
4. Experiment with different number of sample points n and see how the error (difference
between numerical values and exact value) varies with 𝑛.
5. When you find f(x) at x0, x1, x2, …, xn for substituting in the integration formulae, it is
better practice to find all f(x) values at a time using c language functions and store them
in an array before using them in the integration formula. During evaluation of the
integration formulae use the values of f(x) which are stored in the array mentioned
above.
Practice questions

6
1) Evaluate the integral 𝐼 = ∫0 𝑥 sec 𝑥 𝑑𝑥 using the trapezoidal rule.
6 1
2) Compute the integral 𝐼 = ∫0 1+ 𝑥 2
𝑑𝑥 using the composite trapezoidal rule for (a) n = 2
and (b) n = 4. Compare your result with exact result.
10
3) Compute the integral 𝐼 = ∫0 (1 − 𝑒 −𝑥⁄2 ) 𝑑𝑥 using the composite trapezoidal rule for
∆x = 0.5. Compare your result with exact result.
1.4
4) Evaluate the integral 𝐼 = ∫0.2 (sin 𝑥 − log 𝑥 + 𝑒 𝑥 ) 𝑑𝑥 using Simpson’s 1/3 rule and
𝜋/2
Simpson 3/8 rule while the integral ∫0 √cos 𝑥 𝑑𝑥 using composite Simpson’s 1/3
rule.
𝜋/2
5) Evaluate correct to 4 decimal places, by Simpson’s 3/8th rule 𝐼 = ∫0 𝑒 sin 𝑥 𝑑𝑥 .
6) Evaluate the following integral by using Gauss three-point quadrative formulae
1
𝐼 = ∫ (1 + 2𝑥)1/2 𝑑𝑥
0
+1
7) Evaluate the integral ∫−1 (𝜉 2 − 3𝜉 + 7) 𝑑𝜉 using Gauss quadrature rule so that the
result is exact.
+1 +1
8) Evaluate the integral ∫−1 ∫−1 (𝜉 3 − 1)(𝜂 − 1)2 𝑑𝜉𝑑𝜂 using Gauss quadrature rule so
that the result is exact.
+1 +1 +1
9) Evaluate the integral ∫−1 ∫−1 ∫−1 𝜉 2 (𝜂2 − 1)(𝜁 4 − 2) 𝑑𝜉𝑑𝜂𝑑𝜁 using Gauss quadrature
rule so that the result is exact.

You might also like