work on analytic solution