```python
from sympy.integrals.quadrature import gauss_legendre
```


```python
gauss_legendre(4, 17)
```




    ([-0.86113631159405258,
      -0.33998104358485626,
      0.33998104358485626,
      0.86113631159405258],
     [0.34785484513745386,
      0.65214515486254614,
      0.65214515486254614,
      0.34785484513745386])



Compare against:

https://github.com/certik/hfsolver/blob/0693c60abc8da820b9c626f2092bf9d767644a8b/src/quadrature.f90#L30

Points:

```fortran
   case(4)
      xi(1)=-0.86113631159405258_dp
      xi(2)=-0.33998104358485626_dp
      xi(3)=0.33998104358485626_dp
      xi(4)=0.86113631159405258_dp
```

Weights:

```fortran
   case(4)
      w(1)=0.34785484513745386_dp
      w(2)=0.65214515486254614_dp
      w(3)=0.65214515486254614_dp
      w(4)=0.34785484513745386_dp
```


```python
gauss_legendre??
```

a8f5b2bfa1f3f86bb7c83bca805f3dca6f2b7301
ipynb
Jupyter Notebook
applications/Applications -- Numerical Quadrature.ipynb
gvvynplaine/scipy-2016-tutorial
aa417427a1de2dcab2a9640b631b809d525d7929
BSD-3-Clause
2016-06-21T21:11:02.000Z
2021-02-04T07:51:03.000Z
applications/Applications -- Numerical Quadrature.ipynb
gvvynplaine/scipy-2016-tutorial
aa417427a1de2dcab2a9640b631b809d525d7929
BSD-3-Clause
2016-07-02T20:24:06.000Z
2016-07-11T11:31:44.000Z
applications/Applications -- Numerical Quadrature.ipynb
gvvynplaine/scipy-2016-tutorial
aa417427a1de2dcab2a9640b631b809d525d7929
BSD-3-Clause
2016-06-25T09:04:24.000Z
2021-08-09T06:46:01.000Z
Qwen/Qwen-72B
1. YES
2. YES