hw2 newton's method