Partial Derivative Calculator
Solve partial derivative problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Partial Derivative Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: df/dx = lim(h->0) [f(x+h,y) - f(x,y)] / h
Additional inputs: Constant e, Evaluation Point (x, y).
Worked example โ Gradient: (40, 18) | |grad| = 43.86 | Steepest ascent at 24.23 deg | Laplacian = 28
Formula
df/dx = lim(h->0) [f(x+h,y) - f(x,y)] / h
The partial derivative with respect to x differentiates while holding y constant. For f(x,y) = ax^m*y^n + bx^p + cy^q + dxy + e, df/dx = amx^(m-1)y^n + bpx^(p-1) + dy. The gradient vector (df/dx, df/dy) points in the direction of steepest ascent.
Worked Examples
Example 1: Surface Analysis and Gradient
Problem:For f(x,y) = 3x^2*y + 2x^3 - y^2 + 4xy + 5, find partial derivatives and gradient at (2, 1).
Solution:f(2,1) = 3(4)(1) + 2(8) - 1 + 4(2)(1) + 5 = 12 + 16 - 1 + 8 + 5 = 40 df/dx = 6xy + 6x^2 + 4y = 6(2)(1) + 6(4) + 4(1) = 12 + 24 + 4 = 40 df/dy = 3x^2 - 2y + 4x = 3(4) - 2(1) + 4(2) = 12 - 2 + 8 = 18 Gradient = (40, 18), magnitude = sqrt(1600 + 324) = sqrt(1924) = 43.86 Direction = arctan(18/40) = 24.23 degrees Laplacian = d2f/dx2 + d2f/dy2 = (6y + 12x) + (-2) = 6 + 24 - 2 = 28
Result:Gradient: (40, 18) | |grad| = 43.86 | Steepest ascent at 24.23 deg | Laplacian = 28
Example 2: Critical Point Classification
Problem:For f(x,y) = x^2 - y^2 (saddle surface), analyze the critical point at (0, 0).
Solution:f(0,0) = 0 df/dx = 2x = 0, df/dy = -2y = 0: gradient is (0, 0), confirmed critical point d2f/dx2 = 2, d2f/dy2 = -2, d2f/dxdy = 0 Hessian = [[2, 0], [0, -2]] Hessian det = 2*(-2) - 0 = -4 < 0 Since det < 0: SADDLE POINT The surface curves up in x-direction and down in y-direction
Result:Critical point at origin | Hessian det = -4 < 0 | Saddle point confirmed | Eigenvalues: 2, -2
Frequently Asked Questions
What is a partial derivative and how is it different from a regular derivative?
A partial derivative measures the rate of change of a multivariable function with respect to one variable while holding all other variables constant. For f(x,y), the partial derivative with respect to x (written df/dx or fx) treats y as a constant and differentiates only with respect to x. This is different from the ordinary derivative of a single-variable function, which captures the total rate of change. Partial derivatives are the building blocks of multivariable calculus, appearing in gradient vectors, divergence, curl, and all the major theorems. They answer questions like: how does temperature change if you move only east (holding north position fixed)?
What is the gradient vector and what does it tell us?
The gradient of a function f(x,y) is the vector (df/dx, df/dy), often written as grad(f) or nabla f. It has two crucial properties: it points in the direction of steepest ascent of the function, and its magnitude equals the maximum rate of change at that point. The gradient is always perpendicular to level curves (contours) of the function. In optimization, following the negative gradient (gradient descent) moves toward local minima, which is the foundation of machine learning training algorithms. In physics, the gradient connects scalar potential fields to vector force fields: the electric field is the negative gradient of the electric potential, and gravitational force is the negative gradient of gravitational potential energy.
What are higher-order partial derivatives and when do mixed partials commute?
Higher-order partial derivatives are obtained by differentiating partial derivatives again. Second-order partials include d2f/dx2, d2f/dy2, and the mixed partials d2f/dxdy and d2f/dydx. Clairaut theorem (also called Schwarz theorem) states that if the mixed partial derivatives are continuous, then d2f/dxdy = d2f/dydx, meaning the order of differentiation does not matter. This symmetry is almost always satisfied for functions encountered in practice. Higher-order derivatives appear in Taylor series expansions of multivariable functions, in the classification of critical points via the Hessian matrix, and in the derivation of partial differential equations like the wave equation and heat equation.
What is the Hessian matrix and how is it used to classify critical points?
The Hessian matrix is the matrix of all second-order partial derivatives of a scalar function. For f(x,y), it is the 2x2 matrix [[fxx, fxy], [fyx, fyy]]. At a critical point (where the gradient is zero), the Hessian determines the nature of the extremum via the second derivative test. If the Hessian determinant D = fxx*fyy - fxy^2 is positive and fxx > 0, the point is a local minimum. If D > 0 and fxx < 0, it is a local maximum. If D < 0, it is a saddle point. If D = 0, the test is inconclusive and higher-order analysis is needed. The Hessian eigenvalues provide additional information about the curvature of the surface in the principal directions.
What is a directional derivative and how is it computed?
The directional derivative measures the rate of change of a function in any specified direction, not just along the coordinate axes. For f(x,y) in the direction of unit vector u = (cos theta, sin theta), the directional derivative is Duf = (df/dx)*cos(theta) + (df/dy)*sin(theta) = grad(f) dot u. This is the dot product of the gradient with the direction vector. The maximum directional derivative occurs in the gradient direction and equals |grad(f)|. The minimum occurs in the opposite direction and equals -|grad(f)|. In any direction perpendicular to the gradient, the directional derivative is zero, corresponding to movement along a level curve where the function value does not change.
What is the tangent plane to a surface and how is it related to partial derivatives?
The tangent plane to the surface z = f(x,y) at a point (x0, y0, f(x0,y0)) is the best linear approximation to the surface near that point. Its equation is z = f(x0,y0) + fx(x0,y0)*(x-x0) + fy(x0,y0)*(y-y0), where fx and fy are partial derivatives evaluated at the point. This is the multivariable generalization of the tangent line in single-variable calculus. The tangent plane contains both tangent lines obtained by slicing the surface with planes parallel to the xz and yz planes. Its normal vector is (-fx, -fy, 1), which is proportional to the gradient of g(x,y,z) = f(x,y) - z. Tangent planes are used for linearization, error estimation, and constructing differential approximations.
What is the Laplacian and what does it measure for a function?
The Laplacian of a function f(x,y) is the sum of the second partial derivatives: d2f/dx2 + d2f/dy2, written as nabla^2 f or Delta f. It measures how much the function value at a point deviates from the average of its values on a small circle around that point. A positive Laplacian means the function is locally concave up on average (the point is below the average of neighbors), while negative means concave down (the point is above average). Functions with zero Laplacian everywhere are called harmonic and arise naturally in electrostatics, heat conduction, and fluid flow. The Laplacian appears in many fundamental PDEs: the heat equation, wave equation, Schrodinger equation, and Poisson equation.
How do partial derivatives appear in optimization and machine learning?
Partial derivatives are the computational engine behind modern optimization algorithms used in machine learning. Gradient descent updates parameters by subtracting a step proportional to the gradient: theta_new = theta_old - learning_rate * grad(Loss). For neural networks with millions of parameters, backpropagation efficiently computes partial derivatives of the loss function with respect to every weight using the chain rule. Second-order methods like Newton method use the Hessian matrix for faster convergence but require computing and inverting the Hessian, which is expensive for high-dimensional problems. Stochastic gradient descent, Adam, and RMSprop are practical variants that approximate the gradient using mini-batches of data.
What is the chain rule for partial derivatives?
The multivariable chain rule extends the single-variable chain rule to compositions involving multiple variables. If z = f(x,y) where x = g(t) and y = h(t), then dz/dt = (df/dx)(dx/dt) + (df/dy)(dy/dt). For functions of multiple intermediate variables, the rule generalizes: if z = f(x,y) and x = g(s,t), y = h(s,t), then dz/ds = (df/dx)(dx/ds) + (df/dy)(dy/ds). This is often visualized using a tree diagram showing dependencies between variables. The chain rule is essential for implicit differentiation, coordinate transformations (Cartesian to polar or spherical), and backpropagation in neural networks where compositions of many functions are differentiated layer by layer.
What is the total differential and how does it relate to error estimation?
The total differential df of f(x,y) is df = (df/dx)*dx + (df/dy)*dy, representing the approximate change in f due to small changes dx and dy in the independent variables. This linear approximation becomes exact in the limit as dx and dy approach zero. In engineering and science, the total differential is used for error propagation: if x and y have measurement uncertainties delta_x and delta_y, the approximate uncertainty in f is |delta_f| approximately equal to |df/dx|*|delta_x| + |df/dy|*|delta_y|. For independent random errors, the RMS estimate is delta_f = sqrt((df/dx)^2*delta_x^2 + (df/dy)^2*delta_y^2). This technique is standard in laboratory science and engineering quality control.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎPartial Fraction Decomposition Calculator
Calculate partial fraction decomposition with inputs, formulas, and instant results.
๐งฎPartial Products Calculator
Calculate partial products with inputs, formulas, and instant results.
๐งฎDerivative Calculator
Calculate derivative with inputs, formulas, and instant results.
๐งฎDirectional Derivative Calculator
Calculate directional derivative with inputs, formulas, and instant results.
๐งฎSecond Derivative Calculator
Calculate the second derivative of a function for concavity and inflection point analysis.
๐งฎDivergence Calculator
Calculate the divergence of a vector field from its component partial derivatives.
๐งฎAnnulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
๐งฎArea Calculator
Calculate area with inputs, formulas, and instant results.