Cosmology beyond linear perturbations