See problem 1 in chapter 1

See problem 2 in chapter 2