Homework 1, problem 2, attempt 2.