Juventus clinched the final Champions League place from Serie A, despite a win for Roma in the final match of Claudio Ranieri’s coaching career.