modified the code of analytical solutions