Does anyone know the formula to find the gradient at any point on any curve. Experts only.
Printable View
Does anyone know the formula to find the gradient at any point on any curve. Experts only.
You can differentiate a function f to get a function f' that gives the gradient of f at any point. It's not complicated, but does require some knowledge of the differential calculus (the easier part of calculus). Fo instance, the gradient m of f(x) = x² at any point is m = 2x.
If you want to differenctiate a specific function, then that's easy enough to do, but if you want a method for differentiating a general function, well.... go learn calculus.
And where do I do that? (Quickly?)
Hmm, well I'm not sure if there is a quick way of doing it. You probably ought to take A-Level maths. I guess you can skip the derivations and just get the idea though. www.quickmath.com probably has some explanations. I use their online maths tools to differentiate things when I'm feeling lazy.
In Americanese, we call it a derivative. Is gradient the English term?
In Americanese, gradient might be a synomyn, but I am not sure. I remember the context temperature gradient, referring to a metal rod forced to have different, but fixed, temperatures at opposite ends.
well in swedish terms gradient is a vector of the derivates of a multiple variable function, dunno but it might be the same globally, the derive is then a scalar
btw harry, do you think there's source out there that does differential calculus?
I found this site, www.calculus.net but it's pretty slow. All the documents are in .PDF format so you need Acrobat.
Well the terms 'gradient' and 'derivative' aren't exactly interchangeable... You might talk about the gradient of a slope, not in maths but in general life. Like the gradient of a set of stairs, how fast they descend. So yeah it is the derivative I guess, but a more basic word for it.
Anyway, what do you mean by a source that 'does' differential calculus Ked? Do you mean a tool that does it for a given function you provide, or a tutorial of some sort... or what? I find www.quickmath.com quite useful for tools.
OK. I sort of need an answer to this tonight. What is the formula(just write it out), and why does it work?
i meant source code, api's would be acceptable too.
http://www.quickmath.com/www02/pages...ic/index.shtml
theres a textbox you enter the expression you want to differentiate.
To differentiate without a tool you need a bunch of formulas and rules you use in combinations from case to case, nothing you'd learn in one day
Oh, yeah I expect there's something out there. Don't know where though.
What kind of functions do you want to differentiate in code? Simple ones shouldn't be too hard to figure out.
The explanation for it involves limits, taking gradients of lines drawn between ever closer points on the function you want to differentiate, eventually so close together that you don't consider them to be different points. Well I don't think that's exactly how a textbook would explain it but I suggest you go look it up. Why do you need to know? To be honest I doubt you need calculus for anything below A-Level maths standard.
As HarryW said, use differentiation.
When a function is differentiated, you multiply the term by the power, then take 1 from the power. Do this for each term in a fucntion.Code:f(x) = x^n
dy/dx = nx^(n-1) 'Gradient of function
i.e. Find the gradient at the point (1, 4) on the curve y = x^2+3x.
First, differentiate the function.
x^2+3x dy/dx = 2x+3
We have the point (1, 4), the x value is 1, so we substitute 1 into the differentiated function.
2*1+3 = 5
So at the point (1, 4) on the curve y = x^2+3x, the gradient is 5.
Hope this helps in some way.
Laterz
well similar to the one on the page, pass expression in a string and return derivative/integral expression, when possible, with respect to one variable, for any expression you can compose with vb that doesn't contain such like rnd or nonnumeric-aritmetical functions/operators