Update HW 5

Edited the gradient and hessian functions. Were way wrong.