Add 2D linear function to test the Newton method