Differentiate the Legendre differential equation once and put :
Multiplying by gives its Sturm-Liouville form,
Thus the weight is , not one. For , is a nonzero polynomial; is a trivial solution rather than a nonzero eigenfunction.
Multiply the equations for by respectively, subtract and integrate. The resulting boundary term is , since all these derivatives are finite at the endpoints. For distinct nonnegative indices, , giving the weighted orthogonality of Legendre polynomial derivatives:
For the integral is zero simply because .