Compute the gradient vector of a polynomial function in x and y at a given point.
The gradient ∇f = (∂f/∂x, ∂f/∂y) points in the direction of steepest ascent. Its magnitude gives the rate of maximum increase. Computed numerically using central differences for each partial derivative.
Gradient vector
∇f = (∂f/∂x, ∂f/∂y)
Magnitude
|∇f| = sqrt((∂f/∂x)² + (∂f/∂y)²)
The gradient points in the direction of greatest increase of the function and its magnitude gives the rate of that increase.
Gradient descent moves in the negative gradient direction to find function minima, which is the basis of machine learning optimization.