Derivation: two-point Gauss-Legendre

How imposing exactness up to degree 3 gives the nodes ±1/3\pm 1/\sqrt3 and weights 1 on [1,1][-1,1].

Exactness for 1, x, x² and x³

  1. Seek a symmetric rule on [1,1][-1,1] with nodes r-r and rr and equal weights cc, because the interval and the weight w(x)=1w(x)=1 are symmetric.

    11f(x)dxcf(r)+cf(r)\int_{-1}^{1}f(x)dx\approx c f(-r)+c f(r)
  2. Impose exactness for f(x)=1f(x)=1:

    2=2cc=12=2c\quad\Longrightarrow\quad c=1
  3. The odd functions xx and x3x^3 are automatically exact by symmetry. Impose exactness for f(x)=x2f(x)=x^2:

    11x2dx=23=r2+r2=2r2\int_{-1}^{1}x^2dx=\frac{2}{3}=r^2+r^2=2r^2
  4. Solving for r gives the two-point rule:

    r=13,11f(x)dxf ⁣(13)+f ⁣(13)r=\frac{1}{\sqrt{3}},\qquad \int_{-1}^{1}f(x)dx\approx f\!\left(-\frac{1}{\sqrt{3}}\right)+f\!\left(\frac{1}{\sqrt{3}}\right)