An -node Gaussian quadrature formula chooses nodes and weights for an integral with a positive weight so that every polynomial of degree at most is integrated exactly. Its nodes are the zeros of the degree- orthogonal polynomial for that weight.
For the even weight , the monic orthogonal quadratic has the form . Orthogonality to follows from oddness; orthogonality to one gives
The nodes are . The equal weights sum to , hence each is . The two-node Gaussian quadrature with quadratic weight is therefore
To verify cubic exactness, divide any cubic as with . Orthogonality removes from the integral and its nodal values vanish; linear interpolation integrates exactly. This also proves the Gaussian property rather than merely matching two moments.