Public Group

# Partial derivatives of f(x,y)=z

This topic is 3588 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a height map that can be viewed as a function with two variables. I know every value of f(x,y) where 0<=x<=some max value and 0<=y<=some max value. How do i calculate(or approximate) the value of the partial derivatives of f at the point x,y? How do these derivatives look like?

##### Share on other sites
If you take the height values above and below your point (y - 1) & (y + 1), and determine dy for (y - 1)->(y) and (y) ->(y + 1), and average them, that's an approximation for your partial derivative with respect to y. Repeat for x.

You can omit one of the data points for less accuracy but more speed (eg: just do (y-1)->(y), and skip the second one and the average).

##### Share on other sites
Quote:
 Original post by NumsgilIf you take the height values above and below your point (y - 1) & (y + 1), and determine dy for (y - 1)->(y) and (y) ->(y + 1), and average them, that's an approximation for your partial derivative with respect to y. Repeat for x.You can omit one of the data points for less accuracy but more speed (eg: just do (y-1)->(y), and skip the second one and the average).

How did you figure out this approximation, what's the theory behind it?

##### Share on other sites
Well what you're calculating is the partial derivatives with respect to a particular variable...this case x and y. The partial derivative at any particular point would be the slope at that point, with the slope being the change in f as you change x or y. or in other words (f(xn, y) - f(xn-1, y))/(xn - xn-1). If xn is equal to xn-1 + 1, then the denominator is one and you can just evaluate the numerator. This gives you the partial derivative for the point in between xn and xn-1. If you calculate twice with xn-1 and xn+1, then you approximate the partial for xn.

##### Share on other sites
Thanks, i understand now.

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 29
• 40
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631740
• Total Posts
3001965
×