  The parton distribution function for a b quark in the B meson (called the
shape function) plays an important role in the analysis of the B -> X_s gamma
and B -> X_u l nu data, and gives one of the dominant uncertainties in the
determination of |Vub|. We introduce a new framework to treat the shape
function, which consistently incorporates its renormalization group evolution
and all constraints on its shape and moments in any short distance mass scheme.
At the same time it allows a reliable treatment of the uncertainties. We
develop an expansion in a suitable complete set of orthonormal basis functions,
which provides a procedure for systematically controlling the uncertainties due
to the unknown functional form of the shape function. This is a significant
improvement over fits to model functions. Given any model for the shape
function, our construction gives an orthonormal basis in which the model occurs
as the first term, and corrections to it can be studied. We introduce a new
short distance scheme, the "invisible scheme", for the kinetic energy matrix
element, lambda_1. We obtain closed form results for the differential rates
that incorporate perturbative corrections and a summations of logarithms at any
order in perturbation theory, and present results using known
next-to-next-to-leading order expressions. The experimental implementation of
our framework is straightforward.
