Solution to Problem (5) from Notes 2
(Solution courtesy of Geoffrey Dillon)