Theory of secular perturbations of asteroids including terms of higher orders and higher degrees