How did the Romans defeat the Macedonian Phalanx?

In this account taken from Polybius's work the Histories he describes to us in detail some of the reasons why he thinks the Roman legion, was able to defeat the formidable Macedonian Phalanx and eventually conquer Greece.

Polybius (Greek: Πολύβιος) was a Greek historian of the Hellenistic period who lived from 200 BC to 118 BC. He is noted for his work The Histories, which covered the period of 264–146 BC and the Punic Wars in detail.