Final version of analytic solutions for ex2