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)
}