def indef2def(indefs, a, b):
    """
    Use the stored polynomial indefinite integral coefficients to calculate
    the definite integral of the polynomial over the interval [a,b].
    """
    # Evaluate a, b contributions using Horner's algorithm.
    aval = indefs[-1]
    for c in indefs[-2::-1]:
        aval  = c + a*aval
    aval *= a  # since const term dropped
    bval = indefs[-1]
    for c in indefs[-2::-1]:
        bval  = c + b*bval
    bval *= b  # since const term dropped
    return bval - aval