Find the maximum rate of change of f(x, y) or f(x, y, z) at a point: the gradient, its magnitude and direction, plus any directional derivative.
- All Math and Numbers Calculators
- Rate of Change Calculator
- Vector Magnitude Calculator
- Vector Projection Calculator
- Lagrange Multipliers Calculator
Calculator Functions
The calculator finds the gradient of a function of two or three variables at a point, its length (the maximum rate of change) and the direction of fastest increase. It can also give the rate of change in any direction you choose. Select a function to open it in the calculator.
| Function | Use it when | You enter |
|---|---|---|
| Maximum rate of change | You need the steepest rate of increase and its direction | The function and the point |
| Directional derivative | You need the rate of change along a given direction | The function, the point and a direction vector |
Write the function with x, y and z, numbers, + − * / and ^ for powers, and sin, cos, tan, sqrt, exp, ln (natural log), log (base 10) and abs. A number next to a variable multiplies it, so 3xy means 3·x·y. Leave Point z blank for a function of x and y only.
Maximum Rate of Change Formulas
| ∇f | Gradient: the vector of partial derivatives ⟨fx, fy, fz⟩ at the point [2] |
| fx | Partial derivatives fx, fy, fz: the rate of change of f along x, y and z |
| |∇f| | The maximum rate of change: the length of the gradient, in units of f per unit distance |
The gradient points in the direction of fastest increase, given as the unit vector ∇f ÷ |∇f|. The fastest decrease is −|∇f|, in the opposite direction, and the rate of change is zero in any direction at right angles to the gradient [1]. For a function of x and y, fz is left out.
Directional derivative
u = v ÷ |v| [1]
v is the direction you enter and u is that direction scaled to length 1, so (1, 1) and (2, 2) give the same answer. The result is largest, equal to |∇f|, when u points along the gradient.
How the partial derivatives are found
This is the central-difference formula, with the other variables held fixed. It is used for each variable in turn with h = 0.001 (scaled up for coordinates larger than 1). The calculator repeats it with half the step and combines the two results, which removes most of the remaining error for smooth functions.
Worked example
For w = (x² + y²) ÷ 3 at (1, 2), the gradient is ⟨2x/3, 2y/3⟩ = ⟨2/3, 4/3⟩ [2]. Its length is √(4/9 + 16/9) = √20 ÷ 3 ≈ 1.4907, so w rises at most about 1.49 per unit distance, in the direction ⟨1, 2⟩ ÷ √5.
Limits of This Estimate
- The partial derivatives are numerical. For smooth functions they agree with the exact values to at least six significant figures. At a corner or sharp point, such as abs(x) at x = 0, the function has no derivative and the result does not mean anything.
- sin, cos and tan use radians. Convert degrees first, for example sin(x*pi/180).
- The function must have a real value at the point and nearby; ln and sqrt of zero or negative numbers do not.
Sources
- MIT OpenCourseWare, 18.02 Multivariable Calculus (Fall 2007), Lecture 12: Gradient: the directional derivative as the gradient dotted with a unit vector, and the gradient as the direction of fastest increase with its length as that rate
- MIT OpenCourseWare, 18.02SC Multivariable Calculus (Fall 2010), Gradient: Definition and Properties: the gradient of a function of two and three variables, and the worked example
- NIST Digital Library of Mathematical Functions, §3.4 Differentiation: the three-point formula behind the central difference
