Mathematics and Engineering at the Rise of Capitalism in Spain