The Art of Algebra from al-Khwarizmi to Viete: A Study in the Natural Selection of Ideas