0% found this document useful (0 votes)
63 views9 pages

Gauss Quadrature

The document discusses Gauss quadrature, a numerical integration technique. It begins by explaining that Gauss quadrature finds a minimal number of integration points to exactly evaluate integrals of polynomials up to a certain degree. It then provides the number of integration points needed for polynomials from degree 1 to 11, and includes the corresponding abscissae (integration point locations) and weights. The document also gives an example comparing the accuracy of Gauss quadrature to the rectangle method of numerical integration.

Uploaded by

Ankur Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views9 pages

Gauss Quadrature

The document discusses Gauss quadrature, a numerical integration technique. It begins by explaining that Gauss quadrature finds a minimal number of integration points to exactly evaluate integrals of polynomials up to a certain degree. It then provides the number of integration points needed for polynomials from degree 1 to 11, and includes the corresponding abscissae (integration point locations) and weights. The document also gives an example comparing the accuracy of Gauss quadrature to the rectangle method of numerical integration.

Uploaded by

Ankur Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

11.6.

1 GAUSS QUADRATURE

The Gauss integration scheme is a very efficient method to perform numerical integration over
intervals. In fact, if the function to be integrated is a polynomial of an appropriate degree, then the
Gauss integration scheme produces exact results. The Gauss integration scheme has been
implemented in almost every finite element analysis software due to its simplicity and computational
efficiency. This section outlines the basic principles behind the Gauss integration scheme. For its
application to the finite element analysis method, please visit this section.
INTRODUCTION

Gauss quadrature aims to find the “least” number of fixed points to approximate the integral of a
function   such that:

  
where   and  . Also,   is called an integration point and   is
called the associated weight. The number of integration points and the associated weights are chosen
according to the complexity of the function   to be integrated. Since a general polynomial of
degree   has   coefficients, it is possible to find a Gauss integration scheme with   number of
integration points and   number of associated weights to exactly integrate that polynomial function on
the interval  . The following figure illustrates the concept of using the Gauss integration points to
calculate the area under the curve for polynomials. In the following sections, the required number of
integration points for particular polynomials are presented.
Gauss Integration for Polynomials of the 1st, 3rd and 5th Degrees
AFFINE FUNCTIONS (FIRST-DEGREE POLYNOMIALS): ONE INTEGRATION POINT

For a first-degree polynomial,  , therefore,  , so, 1 integration point is sufficient as will


be shown here. Consider   with  , then:

  
So, for functions that are very close to being affine, a numerical integration scheme with 1 integration
point that is   with an associated weight of 2 can be employed. In other words, a one-point
numerical integration scheme has the form:

  
THIRD-DEGREE POLYNOMIALS: TWO INTEGRATION POINTS

For a third-degree polynomial,  , therefore,  , so, 2 integration points are sufficient as


will be shown here. Consider  , then:

  
Assuming 2 integration points in the Gauss integration scheme yields:

  
For the Gauss integration scheme to yield accurate results, the right-hand sides of the two equations
above need to be equal for any choice of a cubic function. Therefore the multipliers of  ,  ,  ,
and   should be the same. So, four equations in four unknowns can be written as follows:

  
The solution to the above four equations yields  ,  ,  . The Mathematica
code below forms the above equations and solves them:

VIEW MATHEMATICA CODE VIEW PYTHON CODE


So, for functions that are very close to being cubic, the following numerical integration scheme with 2
integration points can be employed:

  
FIFTH-DEGREE POLYNOMIALS: THREE INTEGRATION POINTS
For a fifth-degree polynomial,  , therefore,  , so, 3 integration points are sufficient to
exactly integrate a fifth-degree polynomial.
Consider  , then:

  
Assuming 3 integration points in the Gauss integration scheme yields:

  

For the Gauss integration scheme to yield accurate results, the right-hand sides of the two equations
above need to be equal for any choice of a fifth-order polynomial function. Therefore the multipliers
of  ,  ,  ,  ,  , and   should be the same. So, six equations in six unknowns can be written as
follows:

  

The solution to the above six equations yields  ,  ,  ,  ,  ,


and  . The Mathematica code below forms the above equations and solves them:

VIEW MATHEMATICA CODE VIEW PYTHON CODE


So, for functions that are very close to being fifth-order polynomials, the following numerical
integration scheme with 3 integration points can be employed:

  
SEVENTH-DEGREE POLYNOMIAL: FOUR INTEGRATION POINTS

For a seventh-degree polynomial,  , therefore,  , so, 4 integration points are


sufficient to exactly integrate a seventh-degree polynomial. Following the procedure outlined above,
the integration points along with the associated weight:
  
So, for functions that are very close to being seventh-order polynomials, the following numerical
integration scheme with 4 integration points can be employed:

  
The following is the Mathematica code used to find the above integration points and corresponding
weights.

VIEW MATHEMATICA CODE VIEW PYTHON CODE


NINTH-DEGREE POLYNOMIAL: FIVE INTEGRATION POINTS

For a ninth-degree polynomial,  , therefore,  , so, 5 integration points are sufficient to


exactly integrate a ninth-degree polynomial. Following the procedure outlined above, the integration
points along with the associated weight:

  
So, for functions that are very close to being ninth-order polynomials, the following numerical
integration scheme with 5 integration points can be employed:

  
The following is the Mathematica code used to find the above integration points and corresponding
weights.

VIEW MATHEMATICA CODE VIEW PYTHON CODE


ELEVENTH-DEGREE POLYNOMIAL: SIX INTEGRATION POINTS

For an eleventh-degree polynomial,  , therefore,  , so, 6 integration points are


sufficient to exactly integrate an eleventh-degree polynomial. Following the procedure outlined above,
the integration points along with the associated weight:
  
So, for functions that are very close to being eleventh-order polynomials, the following numerical
integration scheme with 6 integration points can be employed:

  
The following is the Mathematica code used to find the above integration points and corresponding
weights. Note that symmetry was employed to reduce the number of equations.

VIEW MATHEMATICA CODE VIEW PYTHON CODE


We can continue determining more integration points (abscissae) and weights for Gauss quadrature.
In this page, the integration points and weights up to 64 points are available. Note that 64 integration
points of Gauss quadrature is associated with a polynomial of degree 127.
IMPLEMENTATION OF GAUSS QUADRATURE

Gauss quadrature is very easy to implement and provides very accurate results with very few
computations. However, one drawback is that it is not applicable to data obtained experimentally as
the values of the function at the specific integration points would not be necessarily available. In order
to implement the Gauss integration scheme in Mathematica, first, the following table is created which
contains the integration points and the corresponding weights. Row number   contains the Gauss
integration scheme with   integration points. Then, a procedure is created in Mathematica whose
input is a function  , and the requested number of integration points. The procedure then calls the
appropriate row in the “GaussTable” and calculates the weighted sum of the function evaluated at the
appropriate integration points.

VIEW MATHEMATICA CODE VIEW PYTHON CODE


EXAMPLE

Calculate the exact integral of   on the interval   and find the relative error if a Gauss 1, 2,
3, and 4 integration points scheme is used. Also, calculate the number of rectangles required by the
midpoint rule of the rectangle method to produce an error similar to that produced by the 3 point
integration scheme, then evaluate the integral using the midpoint rule of the rectangle method with the
obtained number of rectangles.

SOLUTION
The exact integral is given by:

  
Employing a Gauss integration scheme with one integration point yields:

  
Employing a Gauss integration scheme with two integration points yields:

  
Employing a Gauss integration scheme with three integration points yields:

  

Employing a Gauss integration scheme with four integration points yields:

  
Using a three point integration scheme yielded an error of:

  
Equating the upper bound for the error in the midpoint rule to the error produced by a three-point
Gauss integration scheme yields:

  
With  , and  . Therefore:
  
Therefore, the required number of rectangles is:

  
With 75 rectangles the rectangle method yields an integral of  . It is important
to note how accurate the Gauss integration scheme is compared to the rectangle method. For this
example, it would take 75 divisions (equivalent to 75 integration points) to reach an accuracy similar to
the Gauss integration scheme with only 3 points!

VIEW MATHEMATICA CODE VIEW PYTHON CODE


MATLAB files: File 1 (ex11_8.m)File 2 (gauss_quad.m)
ALTERNATE INTEGRATION LIMITS

The Gauss integration scheme presented above applies to functions that are integrated over the
interval  . A simple change of variables can be used to allow integrating a function   
where  . In this case, the linear relationship between   and   can be expressed as:

  
Therefore:

  
Which means the integration can be converted from integrating over   to integrating over   as
follows:

  
where

  
Therefore:

  
The integration can then proceed as per the weights and values of the integration points with   
given by:

  
EXAMPLE
Calculate the exact integral of   on the interval   and find the absolute relative error if a Gauss
1, 2, 3, and 4 integration points scheme is used.

SOLUTION

First, to differentiate between the given function limits, and the limits after changing variables, we will
assume that the function is given in terms of   as follows:

  
The exact integral is given by:

  
Using a linear change of variables   we have:

  
Therefore:

  
Employing a Gauss integration scheme with one integration point yields:

  
Employing a Gauss integration scheme with two integration points yields:

  

Employing a Gauss integration scheme with three integration points yields:


  
where,

  
In the following Mathematica code, the procedure IGAL applies the Gauss integration scheme with   
integration points to a function   on the interval 

You might also like