Analytic form of head-to-head domain walls in thin ferromagnetic cylinders