Partial derivative using midpoint formula

Hi, im trying to find a formula which finds the partial derivative of a function using the midpoint method. I have wrote an r code for the midpoint method but im not sure how to make it work for partial derivitives.

midpoint_deriv <- function(f,x,h){
(f(x+h)-f(x-h))/(2*h)
}

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.