Solve exercises 3.14 and 3.15