Analytical solution for the Hubble parameter