Function Repository Resource:

Get a numerically sorted list of abscissa-weight pairs for Fejér quadrature

Contributed by: Jan Mangaldan
 ResourceFunction["FejerQuadratureWeights"][m,n,{a,b}] gives a list of the n pairs {xi,wi} of the n-point Fejér formula for quadrature of type m on the interval a to b, where wi is the weight of the abscissa xi. ResourceFunction["FejerQuadratureWeights"][m,n,{a,b},prec] uses the working precision prec.

## Details and Options

Fejér quadrature approximates the value of an integral as a linear combination of values of the integrand evaluated at abscissas xi: .
Possible types m of Fejér quadrature are 1 and 2.
Type-1 Fejér quadrature uses the roots of the Chebyshev polynomial ChebyshevT as the abscissas.
Type-2 Fejér quadrature uses the extrema of the Chebyshev polynomial ChebyshevT as the abscissas.
You can use "I" or "II" for the types 1 and 2, respectively.
The precision argument acts similarly to the WorkingPrecision option used in many Wolfram Language numeric functions; it is not at all like the PrecisionGoal option. If the n argument is too small to allow for a high-precision result, extra precision in a result will not be meaningful.

## Examples

### Basic Examples (3)

The abscissas and weights for a 10-point type-1 Fejér quadrature on a given interval:

 In[1]:=
 Out[1]=

The abscissas and weights for a 10-point type-2 Fejér quadrature on a given interval:

 In[2]:=
 Out[2]=

Use the specified precision:

 In[3]:=
 Out[3]=

### Scope (1)

Use "I" or "II" to specify the type of Fejér quadrature:

 In[4]:=
 Out[4]=
 In[5]:=
 Out[5]=

### Applications (6)

Use Fejér quadrature to approximate the area under a curve. First define a function:

 In[6]:=
 Out[6]=

Plot the curve over a given interval:

 In[7]:=
 Out[7]=

Approximate the area under the curve using n-point type-1 Fejér quadrature:

 In[8]:=
 In[9]:=
 Out[9]=

Compare to the output of NIntegrate:

 In[10]:=
 Out[10]=
 In[11]:=
 Out[11]=

Approximate the area under the curve using n-point type-2 Fejér quadrature:

 In[12]:=
 In[13]:=
 Out[13]=

Compare to the output of NIntegrate:

 In[14]:=
 Out[14]=
 In[15]:=
 Out[15]=

### Properties and Relations (2)

The abscissas of type-1 n-point Fejér quadrature are the roots of the Chebyshev polynomial Tn(x):

 In[16]:=
 Out[16]=
 In[17]:=
 Out[17]=

The abscissas of type-2 n-point Fejér quadrature are the extrema of the Chebyshev polynomial Tn+1(x):

 In[18]:=
 Out[18]=
 In[19]:=
 Out[19]=

## Version History

• 1.0.0 – 05 January 2021