Jump to content
  • Advertisement
Sign in to follow this  
Sansros

Need clarification on partial derivatives

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I get the general idea of partial derivatives, meaning you make everything else constant and solve for one for the partial derivatives of a function.

Let's say I have some surface whose Z is defined by function f which takes (x,y). If I find the partial derivative of f with respect to just x, I get a formula in which I can plug in some x and my constant y. The result is the slope of Z for that point on x. However, my x can be anything from 2 to 100 and my output will be slopes drastically different from one another. So I am failing to connect how a partial derivative means "it tells you how much Z changes for every change in X" to what I wrote above for any arbitrary X and its output.

Oh and I came back to brushing up on partial derivatives due to the GPU gems article on water (in the normals and tangents part)

http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html

so I am just trying to connect what I know above to what the article talks about.

Share this post


Link to post
Share on other sites
Advertisement
You compute the partial derivative of a function at a point. So you have a particular value of x and a particular value of y, then you think "if I were to vary x a little bit, what multiple of the change would the function change?". You can consider y to be fixed and x to be variable when you do the symbolic computation of the derivative, but you then evaluate the result at the particular point that you were interested in.

Does that make sense?

Share this post


Link to post
Share on other sites
"[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

[background=rgb(250, 251, 252)]"if I were to vary x a little bit, what multiple of the change would the function change?". You can consider y to be fixed and x to be variable"[/background]

[/font]

I think the above is mainly what I'm confused about. For example:



Z = x² + xy + y²



@z


---- = 2x +y


@x



Let's say now x = .2 and y = .3.



2(.2) + .3 = .7



I could have done this for any point of x and gotten different results for my output.



So is this saying that for every change of "something" in x, Z will increase by .7?



If I change X to 1.5 to get 2(1.6) + .3 = 1.1 so I'm confused in this sense.

Share this post


Link to post
Share on other sites
Perhaps you should ignore partial derivatives for a second and think of the derivative of a function of one real variable. For instance:

f(x) = x^2 + 0.3*x + 0.09

The derivative is

f'(x) = 2*x + 0.3

If you evaluate the derivative at x=0.2, it's

f'(0.2) = 2*0.2 + 0.3 = 0.7

This means that around x =0.2, the tangent of the graph of the function has a slope of 0.7. You can think of that as saying that a small change in x results in a change in f(x) that is about 0.7 times the change in x.

Of course if you were to evaluate f'(1.5) instead, you'll get the slope of the graph of the function at a different point of the curve, which is a different number. Does that still confuse you?

Share this post


Link to post
Share on other sites
I think it helps sometimes to think of partial derivates in terms of level curves or a contour map when first learning them as it is easy to visualize a hill or a mountain. Maybe this resource that I found online will help you to understand them better http://www.mast.queensu.ca/~math122/Notes/notes16_a.pdf

Share this post


Link to post
Share on other sites

You can think of that as saying that a small change in x results in a change in f(x) that is about 0.7 times the change in x.



Ok but isn't this relative to what your starting x value is? I mean, if I use 0.2 that is 0.2 units away from 0, not a small change relative to any arbitrary x value on the graph. In other words, if I use 0.2 as my delta but now have it relative to let's say, 1.5 instead of 0 on the x-axis, the output would now be:

2(1.7) + .3 = 3.7

"You can think of that as saying that a small change in x (0.2 away from 1.5 on the x-axis) results in a change in f(x) that is about 3.7 times the change in x."

The most general form I can think of it is like this:

"Any change in x will result in

[background=rgb(250, 251, 252)]2x +y for the Z output"[/background]

Share this post


Link to post
Share on other sites
I am not sure I should or can explain what derivatives mean in this forum. Perhaps you should try to find something from Khan Academy and see if that helps.

Share this post


Link to post
Share on other sites
Maybe I'm wrong, but can't you resolve your conundrum by considering that the surface you're describing is curved? IIRC partial derivatives are sort of like the linear approximation of the tangent at a particular point.

"So is this saying that for every change of "something" in x, Z will increase by .7?"

No, it's saying that at THAT specific point (x = 0.2, y = 0.3) the rate of change of z relative to the rate of change of x is 0.7. At a different point the rate of change may be difference, consider the derivative of y with respect to x dy/dx for a sine wave, at some points the derivative (slope of the function) is 0 (horizontal), and some points quite steep (closer to 1 or -1). This is the same "plugging different values of x gives me different partial derivatives" behaviour, because the surface isn't linear, it's curved.

Only if the surface is linear/planar (flat) will the partial derivative be constant regardless of where you evaluate it.

BUT: I'm quite rusty with my math so possible some or all of what I've said is wrong/mistaken.

Share this post


Link to post
Share on other sites

BUT: I'm quite rusty with my math so possible some or all of what I've said is wrong/mistaken.

That was all correct. But I don't know if it will help the OP, because I can't quite tell what part he is having trouble with. Perhaps if he thought of increments of x like 10^-10 instead of 0.2 his intuition would work better.

Share this post


Link to post
Share on other sites

Maybe I'm wrong, but can't you resolve your conundrum by considering that the surface you're describing is curved? IIRC partial derivatives are sort of like the linear approximation of the tangent at a particular point.

"So is this saying that for every change of "something" in x, Z will increase by .7?"

No, it's saying that at THAT specific point (x = 0.2, y = 0.3) the rate of change of z relative to the rate of change of x is 0.7. At a different point the rate of change may be difference, consider the derivative of y with respect to x dy/dx for a sine wave, at some points the derivative (slope of the function) is 0 (horizontal), and some points quite steep (closer to 1 or -1). This is the same "plugging different values of x gives me different partial derivatives" behaviour, because the surface isn't linear, it's curved.

Only if the surface is linear/planar (flat) will the partial derivative be constant regardless of where you evaluate it.

BUT: I'm quite rusty with my math so possible some or all of what I've said is wrong/mistaken.


Got it, that clarified it up when you mentioned curve vs planar surface.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!