Update CurveFitting.cpp

Correct example (the functor was incorrect) and use NumericalDiff which makes it much simpler.