Click to See Complete Forum and Search --> : Rate of change of gradient
wossname
Nov 13th, 2004, 01:43 PM
Given any mathematical function what is the easiest way to find the rate of gradient change at any X value?
I am currently calculating the absolute gradient like this...
let A = small value such as 0.00001
Gradient = (f(x+A) - f(x-A)) / 2A
Is it just a matter of finding the gradient on either side of the X value and subtracting...
(GradientOnRightSide - GradientOnLeftSide) / 2A
opus
Nov 14th, 2004, 12:11 AM
Maybe I lost in translation, but as I remember that is just
f'(x) or the derivative of your function.
wossname
Nov 14th, 2004, 08:41 AM
No, I'm trying to calculate it algorithmically.
opus
Nov 14th, 2004, 11:00 AM
Understood!
In that case your formula and approach are looking good to me(if that is of any value).
Only your last statement makes me wonder.
Is it just a matter of finding the gradient on either side of the X value and subtracting...
(GradientOnRightSide - GradientOnLeftSide) / 2A
It should say: Is it just a matter of finding the value on either side of the X value and calculating the difference to get the gradient (Increse/Decrease) at the point X.
(ValueRightSide - ValueLeftSide) / 2A
wossname
Nov 15th, 2004, 03:20 AM
Originally posted by opus
Only your last statement makes me wonder.
Lets put it this way, a Y value at X might indicate instantaneous speed. The gradient at that same point would indicate the acceleration.
The rate of change of gradient would be to measure the amount of curvature at X. To continue the analogy, delta gradient would be called "jerk" or rate of change of acceleration.
Instead of measuring the Y value on either side of X (to find the gradient) I'd be measuring the gradient on either side of X. This should give me the rate of change of gradient (the curve at X).
I'm thinking about taking it a step further and measuring the rate of change of jerk too! (this would be called "Jounce").
opus
Nov 15th, 2004, 06:11 AM
OK, so your talking about the second derivative.
wossname
Nov 15th, 2004, 01:19 PM
Originally posted by opus
OK, so your talking about the second derivative.
Could be, I'm not really up on the lingo any more. So jounce would be the 3rd derivative then?
opus
Nov 15th, 2004, 11:34 PM
Lost in translation again, but OK. That would be the third derivative, although I can't give any verbal explantion above the first derivative (Acceleration/Deceleration). But you can jerk and jounce as you want, as long as you continue each step in the same logic.
Hey, that was the topic of my verbal exam when leaving school about 26 years ago!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.