Second Partial Derivatives Calculator

Compute fxx, fxy, fyx, fyy and watch Clairaut's mixed-partial equality hold.

Second Partial Derivatives Calculator

The Four Second Partial Derivatives

Differentiate a two-variable function twice and there are four routes: x then x, x then y, y then x, y then y. Each has its own name and notation:

  • fxx = ∂²f/∂x² curvature in the x-direction (how the x-slope changes as x moves)
  • fxy = ∂²f/∂y∂x how the x-slope changes as y moves (a mixed partial)
  • fyx = ∂²f/∂x∂y how the y-slope changes as x moves (the other mixed partial)
  • fyy = ∂²f/∂y² curvature in the y-direction

The pure partials fxx and fyy describe how the surface bends along each axis, bowl-like or dome-like slice by slice. The mixed partials describe twist: whether tilting in one direction changes the slope in the other, the property that makes saddle surfaces saddle-shaped. And a small miracle: for any function with continuous second partials, fxy = fyx the order of differentiation doesn't matter. That's Clairaut's theorem, and this calculator computes both mixed partials independently so you can watch the equality hold.

How to Use This Calculator

Enter f(x, y). Both first partials are computed, then each is differentiated by each variable, producing the full quartet as symbolic formulas with the Clairaut agreement noted. Add a point to evaluate all four numerically, the raw material of the second derivative test and the Hessian. The plot shows a level curve of f for geometric orientation.

Worked Example

f(x, y) = x³y². First partials: fx = 3x²y², fy = 2x³y. Differentiating each by each:

fxx = 6xy² | fxy = 6x²y | fyx = 6x²y | fyy = 2x³

The two mixed partials came out identical, 6x²y both ways, despite arriving by different routes: one differentiated 3x²y² by y, the other 2x³y by x. Clairaut's theorem in action, and a built-in error check for hand computation: if your mixed partials disagree, one of the four derivatives contains a mistake.

What Each Second Partial Controls

QuantityGeometric meaningDownstream use
fxx fyyConcavity of axis-parallel slicesSecond derivative test's ingredients
fxy = fyxTwist of the surfaceThe D = fxxfyy − fxy² discriminant
All four togetherComplete local curvatureThe Hessian matrix quadratic approximation

The twist term deserves emphasis because one-variable intuition has no analogue for it: fxx and fyy can both be positive (every slice a smiling parabola) while a large fxy still makes the point a saddle, cross-direction coupling can overpower axis-aligned concavity, which is exactly what the discriminant D detects.

Common Mistakes to Avoid

  • Reading ∂²f/∂y∂x right-to-left. The convention: differentiate in the order of the denominators read right to left, ∂²f/∂y∂x means x first, then y (i.e., fxy). Thanks to Clairaut the answer usually survives confusion, but the notation has a definite meaning.
  • Treating the frozen variable inconsistently. Computing fxy means: differentiate by x with y frozen, then differentiate the result by y with x frozen. Each step has its own frozen variable.
  • Assuming Clairaut needs no hypotheses. The mixed partials must be continuous, pathological counterexamples exist (the classic xy(x²−y²)/(x²+y²) construction). Every function typed with standard operations here satisfies the hypothesis, but the theorem is not a triviality.
  • Stopping at three of the four. The second derivative test needs fxx fyy and fxy forgetting the mixed term (or its square, in D) is the standard route to misclassifying saddles as extrema.

Real-World Applications

Second partials are the language of curvature-aware science. The Laplace equation fxx + fyy = 0, whose solutions are the harmonic functions in two of this page's chips, governs steady-state temperature, electrostatic potential, and ideal fluid flow; the heat equation and wave equation are statements about how second partials in space drive change in time. Structural engineers read plate bending through second partials of deflection (bending moments are proportional to them), and optics engineers shape lens surfaces by prescribing their curvatures, second partials again.

In economics, second partials of utility and production functions encode diminishing returns (negative pure partials) and complementarity between inputs (the sign of the mixed partial: does more capital raise or lower labor's marginal product?). In machine learning, second-order optimization methods and loss-landscape analysis rest on the full matrix of second partials, the Hessian, whose eigenvalues distinguish flat valleys from sharp ravines, directly affecting how models train and generalize.

Frequently Asked Questions

Why are there four second partials but only three distinct ones?

Clairaut's theorem collapses the two mixed partials into one for continuously twice-differentiable functions, leaving fxx fxy fyy as the independent trio, which is why the Hessian matrix is symmetric and the discriminant needs only three inputs.

What is a harmonic function?

One satisfying fxx + fyy = 0 everywhere, perfect cancellation of the two axis curvatures, as in x² − y² and eˣcos(y). Harmonic functions have remarkable properties (mean-value property, no interior maxima) and model equilibrium states across physics.

How do second partials build the quadratic approximation?

They're the coefficients of the two-variable Taylor expansion: f ≈ f + fxΔx + fyΔy + ½(fxxΔx² + 2fxyΔxΔy + fyyΔy²), the multivariable upgrade of the Taylor polynomial with the mixed term appearing once with factor 2 thanks to Clairaut.

How many third partials would there be?

Eight routes, four distinct values (fxxx fxxy fxyy fyyy) under the same continuity hypotheses, order within the count never matters, only how many times each variable appears. In n variables the k-th order distinct partials number C(n+k−1, k), a combinatorial fact bookkeeping software must respect.

What does the sign of the mixed partial mean by itself?

Cooperation or interference: fxy > 0 means increasing y raises the x-direction slope (the variables reinforce), negative means they oppose. In economics this is precisely complements versus substitutes; in surfaces it's the handedness of the twist.

Do the pure second partials alone determine concavity of the surface?

No, that's the twist term's whole point. A surface can smile along both axes (fxx > 0, fyy > 0) yet frown along a diagonal if fxy is large; try f = x² + y² + 3xy along the line y = −x. Directional concavity mixes all three numbers, which is why the Hessian discriminant, not the pure partials, renders verdicts.