calculate (a) pH