I am trying to write a program that takes a square matrix with given values and returns another matrix with the value of fxy at all of the locations. I need to find each cross derivative numerically because I am not given a function. I understand how to find it for points that are not on the edge of the matrix, however, I do not know how to make a somewhat accurate estimate of the cross derivative for the points in the corners and along the edges. I have searched all over google for an answer and haven't come up with anything. If anyone knows some sort of formula I could use that would be very helpful.