How to Find the Gradient Using Differentiation
At a glance
- 1. Identify the function
For a curve y = f(x), the gradient at a point means the slope of its tangent there.
- 2. Differentiate
Find f'(x) using the appropriate differentiation rules.
- 3. Substitute the point
Evaluate f'(x) at the x-coordinate where you want the gradient.
- 4. Interpret the result
The value is the tangent slope; for a function of several variables, use its gradient vector instead.
In single-variable calculus, the gradient of a curve at a point is its tangent slope. To find it, differentiate the function and evaluate the derivative at the point’s x-coordinate. This article works through that method and explains the related, but different, meaning of gradient for functions of several variables.
Gradient as the slope of a curve
If a curve is given by , its gradient at is
The derivative gives the gradient at each input . Substituting a particular input gives the gradient at that point. A positive result means the tangent slopes upward there; a negative result means it slopes downward. A derivative of zero means the tangent is horizontal, if the derivative exists.
Geometrically, the derivative is the limit of the slopes of secant lines as their endpoints approach one another:
provided the limit exists. In most routine problems, differentiation rules are quicker than evaluating this limit directly.
How to find the gradient step by step
- Write down the function and identify the x-coordinate where you need the gradient.
- Differentiate the function with respect to , using rules such as the power rule, product rule, or chain rule.
- Substitute the x-coordinate into the derivative.
- State the gradient as a number, including its sign.
For example, if the point is given as , use its x-coordinate . You do not need to differentiate the coordinates of the point; you differentiate the function that describes the curve.
Worked example
Find the gradient of at .
First differentiate each term:
Now evaluate the derivative at :
So the gradient of the curve at is 7. The corresponding point on the curve is , because . If you also need the tangent line, use point-slope form:
or .
What if the function has several variables?
For a function such as , the gradient usually means the gradient vector, not one slope. It contains the partial derivative with respect to each variable:
For instance, let . Differentiate with respect to one variable at a time, treating the other as constant:
At this becomes . For a differentiable function in the usual Euclidean setting, a nonzero gradient points in the direction of steepest increase, and its length gives the maximum rate of increase over unit directions. If the gradient is zero, all directional derivatives are zero, so there is no unique steepest-increase direction. In contrast, for a curve , the gradient at a point is a scalar slope.
Common mistakes
- Stopping at the derivative formula: gives a gradient that depends on . For the gradient at a specific point, substitute that point’s x-coordinate.
- Using the y-coordinate as the input: For a point on a graph of , evaluate , not .
- Confusing the gradient with the tangent line: The gradient is the tangent’s slope. To find the line itself, you also need a point on the curve.
- Assuming every point has a gradient: The derivative may fail to exist at a corner, cusp, discontinuity, or vertical tangent. Check differentiability if the result is undefined or the graph behaves unusually.
- Mixing up scalar and vector meanings: A single-variable curve has a tangent slope; a multivariable function has a gradient vector made from partial derivatives.
References
- OpenStax Calculus Volume 1
- James Stewart, Calculus: Early Transcendentals
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.