Best approximate quadratic integrals in stellar dynamics