Implementation of math method FiniteDifference