Update newton.cpp

Added #include <functional> since it uses std::plus or std::minus.