In this problem, we implement preconditioning, line minimization, and conjugate gradients. To track the convergence properties of the various techniques, each function will return, as an optional second argument, the list of energies at each stage of the minimization. We begin by adding this capability to sd().