See this classic work for a detailed discussion of anti-cavalry problems by another heavy infantry formation- the Hellenic phalanx, including the weaknesses of the hollow square formation.