Skip to main content
CalculusMultivariable CalculusDerivativesMath Homework Help

Multivariable Derivative Calculator: Step-by-Step Guide with Examples

·11 min read·Solvify Team

A multivariable derivative calculator helps you find partial derivatives, gradient vectors, directional derivatives, and second-order Hessian matrices for functions of two or more variables without losing track of every x, y, and z term along the way. This guide walks through exactly how these tools work, with fully worked numerical examples you can check by hand, so you understand the calculus behind the answer instead of just copying a result.

What Is a Multivariable Derivative Calculator?

A multivariable derivative calculator is a tool that computes derivatives for functions with two or more independent variables, such as f(x, y) or g(x, y, z). Unlike single-variable calculus, where you find one derivative f′(x), multivariable functions have a partial derivative for each variable, plus combined quantities like the gradient vector, directional derivatives, and the Hessian matrix of second derivatives. The calculator treats every variable except the one you're differentiating with respect to as a constant, applies the standard differentiation rules, and returns each result separately or combined into a vector or matrix.

1. Identify the variables

List every independent variable in the function, such as x and y in f(x, y) = x²y + 3xy² − y³.

2. Choose the derivative type

Decide whether you need a single partial derivative, the full gradient, a directional derivative, or the Hessian matrix.

3. Apply differentiation rules per variable

Treat all other variables as constants and differentiate using power, product, and chain rules as needed.

Multivariable differentiation is just single-variable differentiation applied one variable at a time.

How Does a Multivariable Derivative Calculator Compute Results?

A multivariable derivative calculator parses the input expression into a symbolic tree, then applies differentiation rules recursively: the power rule for terms like x³, the product rule for terms like xy², and the chain rule for compositions like sin(x²y). For each requested variable, every other variable is held constant during differentiation, exactly as you would do by hand. The calculator then simplifies the resulting expression and, if a point is given, substitutes the numerical values to return a final number or vector.

1. Parse the expression

Convert the typed function into a structured tree of operations (addition, multiplication, powers, composition).

2. Differentiate symbolically

Apply the power, product, quotient, and chain rules term by term, holding non-target variables constant.

3. Simplify and evaluate

Combine like terms, then plug in numerical coordinates if you asked for a value at a specific point.

Partial Derivatives: The Foundation of Multivariable Calculus

A partial derivative measures how a function changes as one variable moves while every other variable stays fixed. For f(x, y), the partial derivative with respect to x is written ∂f/∂x, and the partial derivative with respect to y is ∂f/∂y. These are computed exactly like ordinary derivatives, except any term without the target variable is treated as a constant and its derivative is zero.

1. Freeze the other variables

When finding ∂f/∂x, treat y (and z, if present) as fixed numbers.

2. Differentiate term by term

Apply the power rule to each term containing x, and drop terms that don't contain x.

3. Repeat for each variable

Find ∂f/∂y the same way, this time treating x as constant.

If a term doesn't contain the variable you're differentiating with respect to, its partial derivative is zero.

Worked Example 1: Partial Derivatives of f(x, y) = x²y + 3xy² − y³

Take the function f(x, y) = x²y + 3xy² − y³. To find ∂f/∂x, treat y as a constant; to find ∂f/∂y, treat x as a constant. Below is the full step-by-step computation.

1. Differentiate with respect to x

∂f/∂x: the x²y term becomes 2xy (bring down the exponent 2, y is constant); 3xy² becomes 3y² (x has exponent 1); −y³ has no x, so it becomes 0. Result: ∂f/∂x = 2xy + 3y².

2. Differentiate with respect to y

∂f/∂y: x²y becomes x² (y has exponent 1, x² is constant); 3xy² becomes 6xy (bring down the 2); −y³ becomes −3y². Result: ∂f/∂y = x² + 6xy − 3y².

3. Check with a numerical point

At (x, y) = (1, 1): ∂f/∂x = 2(1)(1) + 3(1)² = 2 + 3 = 5. ∂f/∂y = 1² + 6(1)(1) − 3(1)² = 1 + 6 − 3 = 4. Both values match the simplified formulas above.

What Is the Gradient Vector?

The gradient of a function f(x, y) is the vector ∇f = (∂f/∂x, ∂f/∂y) that points in the direction of the steepest increase of the function at a given point. Its magnitude tells you how steep that increase is. In three variables, the gradient extends to ∇f = (∂f/∂x, ∂f/∂y, ∂f/∂z). A multivariable derivative calculator builds the gradient by computing every partial derivative and stacking them into a single vector.

1. Compute each partial derivative

Find ∂f/∂x, ∂f/∂y (and ∂f/∂z if applicable) using the standard rules.

2. Assemble the vector

Write the results in order as ∇f = (∂f/∂x, ∂f/∂y).

3. Evaluate at a point (optional)

Substitute the coordinates of a specific point to get a numeric vector.

The gradient always points toward the steepest uphill direction of a surface.

Worked Example 2: Computing the Gradient at a Point

Using the same function f(x, y) = x²y + 3xy² − y³ from Example 1, with ∂f/∂x = 2xy + 3y² and ∂f/∂y = x² + 6xy − 3y², find the gradient at the point (2, 1).

1. Evaluate ∂f/∂x at (2, 1)

∂f/∂x = 2(2)(1) + 3(1)² = 4 + 3 = 7.

2. Evaluate ∂f/∂y at (2, 1)

∂f/∂y = (2)² + 6(2)(1) − 3(1)² = 4 + 12 − 3 = 13.

3. Write the gradient vector

∇f(2, 1) = (7, 13). This means the function increases fastest in the direction of (7, 13) from that point.

Directional Derivatives and the Dot Product

A directional derivative measures the rate of change of a function at a point in a specific direction, not just along the x or y axis. It is computed as D_u f = ∇f · u, where u is a unit vector pointing in the direction of interest. Because u must have length 1, you divide any direction vector by its magnitude before taking the dot product.

1. Find the gradient at the point

Compute ∇f = (∂f/∂x, ∂f/∂y) at the target point.

2. Normalize the direction vector

If the direction is (a, b), divide by its magnitude √(a² + b²) to get the unit vector u.

3. Take the dot product

D_u f = ∇f · u = (∂f/∂x)(u₁) + (∂f/∂y)(u₂).

The directional derivative in the direction of the gradient itself equals the gradient's magnitude, the maximum possible rate of increase.

Worked Example 3: Directional Derivative in a Given Direction

Using ∇f(2, 1) = (7, 13) from Example 2, find the directional derivative of f in the direction of the vector v = (3, 4).

1. Normalize v

|v| = √(3² + 4²) = √(9 + 16) = √25 = 5, so the unit vector is u = (3/5, 4/5).

2. Apply the dot product formula

D_u f = ∇f · u = 7(3/5) + 13(4/5) = 21/5 + 52/5 = 73/5.

3. Convert to a decimal and check

73/5 = 14.6. Since |∇f| = √(7² + 13²) = √218 ≈ 14.76, and 14.6 < 14.76, the result correctly falls below the maximum possible directional derivative.

How Do You Build and Use a Hessian Matrix?

The Hessian matrix collects all second-order partial derivatives of a function into a square matrix, used to classify critical points as local minima, local maxima, or saddle points. For f(x, y), the Hessian is H = [[f_xx, f_xy], [f_xy, f_yy]]. After finding a critical point where ∇f = (0, 0), you compute the determinant D = f_xx·f_yy − (f_xy)². If D > 0 and f_xx > 0, it's a local minimum; if D > 0 and f_xx < 0, it's a local maximum; if D < 0, it's a saddle point.

1. Find the critical point

Set ∂f/∂x = 0 and ∂f/∂y = 0 and solve simultaneously.

2. Compute second-order partials

Find f_xx, f_yy, and the mixed partial f_xy.

3. Evaluate the determinant test

Calculate D = f_xx·f_yy − (f_xy)² and apply the sign rules to classify the point.

The Hessian's determinant test extends the single-variable second-derivative test to two or more dimensions.

Worked Example 4: Classifying a Critical Point with the Hessian

Consider g(x, y) = x² + y² − 4x − 6y + 13. Find the critical point and classify it using the Hessian matrix.

1. Find the critical point

∂g/∂x = 2x − 4 = 0 → x = 2. ∂g/∂y = 2y − 6 = 0 → y = 3. Critical point: (2, 3).

2. Build the Hessian

g_xx = 2, g_yy = 2, g_xy = 0, so H = [[2, 0], [0, 2]]. Determinant D = (2)(2) − 0² = 4.

3. Classify and check the value

Since D = 4 > 0 and g_xx = 2 > 0, (2, 3) is a local minimum. g(2, 3) = 4 + 9 − 8 − 18 + 13 = 0, confirming a minimum value of 0 at that point.

Why Multivariable Derivatives Matter in Science and Engineering

Partial derivatives, gradients, and Hessians appear anywhere a quantity depends on more than one variable. In physics, the gradient of a temperature or pressure field points toward the fastest increase, which is how weather models track heat flow. In economics, partial derivatives of a profit function with respect to price and quantity identify optimal production levels. In machine learning, gradient descent repeatedly uses the gradient vector of a loss function to update model parameters, and the Hessian informs whether an optimizer has reached a true minimum rather than a saddle point.

1. Physics and engineering

Gradients describe heat flow, electric fields, and fluid velocity across multiple dimensions.

2. Economics and optimization

Partial derivatives locate maximum profit or minimum cost across several variables at once.

3. Machine learning

Gradient descent and second-order optimizers rely directly on gradients and Hessians to train models.

Common Mistakes to Avoid

The most frequent error is forgetting to treat other variables as constants, which leads to differentiating a term that should have simply dropped out. A second common mistake is mixing up the order of variables in mixed partial derivatives, such as computing ∂²f/∂x∂y instead of ∂²f/∂y∂x — for most smooth functions these are equal, but sign errors during the process are common. A third mistake is forgetting to normalize the direction vector before computing a directional derivative, which produces a result scaled incorrectly by the vector's original length.

1. Double-check which variable is constant

Before differentiating, underline the variable you're solving for and treat every other symbol as a fixed number.

2. Verify mixed partials match

For most functions in this context, ∂²f/∂x∂y should equal ∂²f/∂y∂x — use this as a built-in check.

3. Always normalize direction vectors

Divide by the magnitude before taking the dot product with the gradient in a directional derivative.

Get Instant Help with Multivariable Derivatives

Working through partial derivatives, gradients, directional derivatives, and Hessian matrices by hand builds real understanding, but checking your work matters just as much as doing it. Solvify's AI-powered tools can scan a multivariable calculus problem, show every differentiation step, and let you ask follow-up questions until the logic clicks.

1. Snap or type your function

Enter or photograph the multivariable function you're working with.

2. Review the step-by-step solution

See each partial derivative, the gradient, and any classification steps laid out clearly.

3. Ask follow-up questions

Use the AI tutor to clarify any step, such as why a mixed partial should match or how the Hessian test works.

Tags:
CalculusMultivariable CalculusDerivativesMath Homework Help

Get Homework Help Now

Join millions of students using our AI math solver for homework help. Get instant solutions to math problems, step-by-step explanations, and 24/7 homework assistance.

Available for iOS and Android devices