I wrote code to deal with problem 5.
Wrote a wavelength solution here.