Math Solver Free

Calculus

Partial Derivative Examples: First, Second and Mixed Partials Worked

Math Solver Free Team

A student writing complex mathematical equations on a chalkboard — working through partial derivative examples
Chart of all partial derivatives of f(x, y, z) = x⁴y² − 3xy³ + z²cos(x): first-order, second-order and mixed partials with values at (2, 1, 3)

Reading about partial derivatives only takes you so far — fluency comes from watching complete examples where nothing is skipped. This page works one function through everything: f(x, y, z) = x⁴y² − 3xy³ + z²cos(x). We find all three first-order partials, all three pure second-order partials, and both mixed partials, then verify the headline answers numerically. Every result below was checked symbolically and by a numeric spot check before publication. When you want to run your own function, the partial derivative calculator applies exactly the method used here.

The setup: what a partial derivative asks

A partial derivative asks: how fast does f change when one input moves and the rest are frozen? Freezing is the whole technique. Under ∂/∂x, the letters y and z behave as constant numbers; under ∂/∂y, x and z freeze; under ∂/∂z, x and y freeze. Terms that do not contain the active variable at all are constants, and constants differentiate to zero.

Worked example 1: the three first-order partials

∂f/∂x (y, z frozen). Term by term: x⁴y² has the constant factor y² riding on x⁴, so the power rule gives 4x³y². The term −3xy³ has constant factor −3y³ riding on x, giving −3y³. The term z²cos(x) has constant factor z², and cos(x) genuinely contains x, so the chain rule gives −z² sin(x). Total: ∂f/∂x = 4x³y² − 3y³ − z² sin(x).

∂f/∂y (x, z frozen). x⁴y² gives x⁴ · 2y = 2x⁴y. −3xy³ gives −3x · 3y² = −9xy². z²cos(x) contains no y whatsoever, so it vanishes. Total: ∂f/∂y = 2x⁴y − 9xy².

∂f/∂z (x, y frozen). The first two terms contain no z and vanish. z²cos(x) has constant factor cos(x) riding on z², giving 2z cos(x). Total: ∂f/∂z = 2z cos(x).

Worked example 2: the three pure second-order partials

A second-order partial is just the method applied twice. ∂²f/∂x²: differentiate ∂f/∂x = 4x³y² − 3y³ − z² sin(x) with respect to x again — 12x²y² − 0 − z² cos(x), so ∂²f/∂x² = 12x²y² − z² cos(x). ∂²f/∂y²: differentiate ∂f/∂y = 2x⁴y − 9xy² with respect to y again — ∂²f/∂y² = 2x⁴ − 18xy. ∂²f/∂z²: differentiate ∂f/∂z = 2z cos(x) with respect to z again — the z disappears and ∂²f/∂z² = 2cos(x), a result that no longer depends on z at all.

Worked example 3: mixed partials and Clairaut's theorem

Mixed partials differentiate in two different directions, and the notation reads inside-out: ∂²f/∂y∂x means differentiate with respect to x first, then with respect to y. Starting from ∂f/∂x = 4x³y² − 3y³ − z² sin(x) and differentiating with respect to y: 4x³ · 2y − 9y² − 0 = 8x³y − 9y². Now the other order: starting from ∂f/∂y = 2x⁴y − 9xy² and differentiating with respect to x: 8x³y − 9y². Identical — Clairaut's theorem guarantees this for smooth functions (continuous second partials), and it doubles as a self-check: if your two mixed partials disagree, one of the four differentiations went wrong.

How do you check a partial derivative numerically?

Pick a point, nudge, and divide. At (2, 1, 3): f(2, 1, 3) = 16 − 6 + 9·cos(2) ≈ 6.25. Nudging x to 2.001 gives f ≈ 6.28, a rise of about 0.0208 over a step of 0.001 — a slope of ≈ 20.8. The symbolic answer says ∂f/∂x at (2, 1, 3) = 4(8)(1) − 3(1) − 9·sin(2) = 29 − 9(0.9093) ≈ 20.82 ✓. The same check for z: ∂f/∂z at (2, 1, 3) = 2(3)cos(2) ≈ −2.50, matching the numeric slope in the z-direction. This thirty-second habit — used by engineers who cannot afford a wrong sensitivity — catches nearly every frozen-variable slip. Our derivative calculator does the same job for single-variable functions, and the method behind all our worked examples is documented on the methodology page.

The gradient: assembling the first partials

Collect the three first partials into one vector and you have the gradient: ∇f = (4x³y² − 3y³ − z² sin(x), 2x⁴y − 9xy², 2z cos(x)). At (2, 1, 3) that is approximately (20.82, 14, −2.50): from that point, f increases fastest in roughly that direction, at a rate equal to the vector's length, about 25.2 per unit step. Gradients built this way drive optimisation, machine-learning training and sensitivity analysis — all from the same freeze-and-differentiate move. For the reference treatment, see the partial derivatives chapter of OpenStax Calculus Volume 3, free online.

Frequently asked questions

What is the difference between a pure and a mixed partial derivative?

A pure second partial differentiates twice with respect to the same variable (∂²f/∂x²); a mixed partial differentiates with respect to two different variables in succession (∂²f/∂y∂x). Both are built from first partials by applying the same freeze-and-differentiate method a second time.

Why are the two mixed partials equal?

Clairaut's theorem: if a function's second partial derivatives are continuous — true for polynomials, exponentials and trig combinations like the one on this page — then the mixed partials are equal regardless of order. It is a theorem about smoothness, and a practical self-check for your own work.

How many second-order partials does a three-variable function have?

Nine written forms — three pure (xx, yy, zz) and six mixed (xy, yx, xz, zx, yz, zy) — but Clairaut's theorem pairs the mixed ones up, so only six distinct values: the three pure partials plus f_xy, f_xz and f_yz.

What does the gradient tell you that one partial does not?

A single partial gives the slope in one coordinate direction. The gradient assembles all the first partials into the direction of steepest increase, and its length is that steepest slope — the information optimisers and sensitivity analyses actually need.

Can I check these examples with the calculator?

Yes — enter x^4*y^2 - 3*x*y^3 + z^2*cos(x) into the partial derivative calculator, choose x, y or z, and compare. For second-order and mixed partials, type the first result back in and differentiate again, exactly as the worked examples do.

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team