Critical points, Lauricella functions and Whitham-type equations