modified to check sol with analytical in leveque book