  We introduce optimal quadrature rules for spline spaces that are frequently
used in Galerkin discretizations to build mass and stiffness matrices. Using
the homotopy continuation concept [6] that transforms optimal quadrature rules
from source spaces to target spaces, we derive optimal rules for splines
generated above finite domains. Starting with the classical Gaussian quadrature
for polynomials, which is an optimal rule for a discontinuous odd-degree space,
we derive rules for target spaces of higher continuity. We further show how the
homotopy methodology handles cases where the source and target rules require
different numbers of optimal quadrature points. We demonstrate it by deriving
optimal rules for various odd-degree spline spaces, particularly with
non-uniform knot sequences and non-uniform multiplicities. We also discuss
convergence of our rules to their asymptotic counterparts, that is, the
analogues of the midpoint rule of Hughes et al. [34], that are exact and
optimal for infinite domains. For spaces of low continuities, we numerically
show that the derived rules quickly converge to their asymptotic counterparts
as the weights and nodes of a few boundary elements differ from the asymptotic
values.
