solving helmholtz equation separation of variables