Application of the least-squares method for solving population balance problems in Rd+1