Mostly maxima work to handle the calculus + almost brute force summing (runs in 20s).