It was while Galileo was under house arrest that he wrote one of his finest works, Two New Sciences , in which he summarised the work he had done some forty years earlier, on the two sciences now called kinematics and strength of materials .