Least-squares derivation of extremum and weighted-residual methods for equations of reactor physics—I. The first-order Boltzmann equation and a first-order initial-value equation