Skip to main content

LegendreGaussQuadrature

This routine computes the n Gauss-Quadrature points.

All Gauss-Quadrature points are inside (1,1)(-1, 1)

Interface

INTERFACE
MODULE SUBROUTINE LegendreGaussQuadrature(n, pt, wt)
INTEGER(I4B), INTENT(IN) :: n
!! It represents the order of Legendre polynomial
REAL(DFP), INTENT(OUT) :: pt(:)
!! the size is 1 to n
REAL(DFP), OPTIONAL, INTENT(OUT) :: wt(:)
!! the size is 1 to n
END SUBROUTINE LegendreGaussQuadrature
END INTERFACE

Some Legendre Gauss Quadrature points

n = 1

PointWeight
02

n = 2

PointWeight
-0.577351
0.577351

n = 3

PointWeight
-0.77460.55556
3.71231E-160.88889
0.77460.55556

n = 4

PointWeight
-0.861140.34785
-0.339980.65215
0.339980.65215
0.861140.34785

n = 5

PointWeight
-0.906180.23693
-0.538470.47863
2.66893E-170.56889
0.538470.47863
0.906180.23693

n = 6

PointWeight
-0.932470.17132
-0.661210.36076
-0.238620.46791
0.238620.46791
0.661210.36076
0.932470.17132

n = 7

PointWeight
-0.949110.12948
-0.741530.27971
-0.405850.38183
1.88509E-160.41796
0.405850.38183
0.741530.27971
0.949110.12948

n = 8

PointWeight
-0.960290.10123
-0.796670.22238
-0.525530.31371
-0.183430.36268
0.183430.36268
0.525530.31371
0.796670.22238
0.960290.10123

n = 9

PointWeight
-0.968168.12744E-02
-0.836030.18065
-0.613370.26061
-0.324250.31235
2.76366E-170.33024
0.324250.31235
0.613370.26061
0.836030.18065
0.968168.12744E-02

n = 10

PointWeight
-0.973916.66713E-02
-0.865060.14945
-0.679410.21909
-0.43340.26927
-0.148870.29552
0.148870.29552
0.43340.26927
0.679410.21909
0.865060.14945
0.973916.66713E-02