Problem 3.1

A written solution of this problem is found here

Problem 3.2

Problem 3.3