3.1 week 14, my solution to first problem

pict Mathematica notebook