example of Newton's Method in 1D.