Marcus du Sautoy investigates the ways in which Europe replaced the Middle East as the world's powerhouse of mathematical ideas by the 17th century.