Sturm–Liouville and Carroll: at the heart of the memory effect