Partial Derivatives

Suppose the temperature in a room is given by a function T(x,y,z)T(x,y,z) of position. Imagine standing still and asking how fast the temperature changes. You step in the xx-direction only, holding yy and zz fixed. This is asking for a partial derivative. This is a deceptively simple idea. You freeze all but one variable and differentiate as in single-variable calculus. But it is the atomic building block for multivariable differentiability. Gradients, directional derivatives, the Jacobian, and the total derivative all reduce, in coordinates, to partial derivatives. The subject matters because it lets us import one-variable calculus into higher dimensions. We do this one direction at a time. Yet this convenience hides a trap. Knowing all the partial derivatives of a function at a point tells you less than expected. A function can have every partial derivative exist at a point. It can even be continuous along every line through that point. Yet it can still be discontinuous there. This subtlety is important: mere partial differentiability does not imply continuity. It certainly does not imply true differentiability. This is one of the most important cautionary lessons in multivariable calculus. It is the reason a stronger notion, total differentiability, is needed later. This article gives the rigorous definition of a partial derivative as a genuine one-variable limit. It develops the notation and basic computational rules. It defines higher-order partial derivatives and mixed partials. It also proves, with a fully worked counterexample, an important fact. The existence of all first partial derivatives at a point does not imply continuity there. We also address a natural follow-up question: do mixed partials commute? We preview the precise hypotheses needed (Clairaut's theorem) without proving that theorem here. By the end, you should be able to compute partial derivatives directly from the limit definition. You should also compute them via single-variable rules. You should distinguish first- and higher-order partials, including mixed partials. You should correctly diagnose why a function with all partials existing at a point can fail to be continuous there. This sets the stage for Differentiability and the Total Derivative.

Key takeaways
  • A partial derivative differentiates a multivariable function with respect to one variable while holding all others fixed.
  • Formally it is a genuine single-variable limit of a difference quotient along a coordinate direction.
  • Existence of ∂f/∂x\partial f/\partial x and ∂f/∂y\partial f/\partial y at a point says nothing, by itself, about continuity there.
  • Higher-order and mixed partial derivatives are defined by iterating the process; order of differentiation can matter.
  • A classical counterexample shows both partials can exist everywhere while the function is discontinuous at the origin.
  • Key idea: partial derivatives probe a function only along the coordinate axes, so they see far less than the full local behavior a genuine multivariable derivative must capture.

Where this lives today

Partial derivatives are the coordinate-level engine behind essentially all of multivariable analysis and its applications. In pure mathematics, they are the entries of the Jacobian Matrix and the components of the Gradient vector, and they appear as the coefficients in the linear approximation used to define total differentiability. In physics, partial derivatives express how a scalar field (temperature, pressure, potential energy) changes along each spatial or temporal axis while other variables are held fixed — this is precisely the meaning of thermodynamic quantities like (∂P/∂V)T\left(\partial P/\partial V\right)_T, where the subscript TT explicitly signals which variables are frozen. Partial differential equations (the heat equation, wave equation, Laplace's equation, Maxwell's equations, Schrödinger's equation) are, by definition, equations relating partial derivatives of an unknown function of several variables. In optimization and machine learning, the gradient descent algorithm that trains neural networks computes partial derivatives of a loss function with respect to each parameter (via backpropagation, itself an efficient application of the multivariable chain rule built from partials), and the sensitivity of a model's output to a single input feature is literally a partial derivative. In economics, partial derivatives measure marginal quantities — marginal utility, marginal cost with respect to one input — holding other inputs fixed. In statistics, partial derivatives of a likelihood function with respect to each parameter, set to zero, give the maximum-likelihood equations; in numerical analysis, finite-difference approximations to PDEs are built directly by discretizing the partial-derivative limit definition given here.

Ask the tutor: Why does continuity of the partial derivatives themselves rescue us from the pathology, and how does that lead into the definition of total differentiability?

DefinitionPartial Derivative

Let U⊆RnU \subseteq \mathbb{R}^n be open and let f:U→Rf: U \to \mathbb{R}. Fix a point a=(a1,…,an)∈U\mathbf{a} = (a_1, \dots, a_n) \in U and an index i∈{1,…,n}i \in \{1, \dots, n\}. The partial derivative of ff with respect to xix_i at a\mathbf{a} is defined as the limit

∂f∂xi(a)  =  lim⁡h→0f(a1,…,ai−1,ai+h,ai+1,…,an)−f(a)h,\frac{\partial f}{\partial x_i}(\mathbf{a}) \;=\; \lim_{h \to 0} \frac{f(a_1, \dots, a_{i-1}, a_i + h, a_{i+1}, \dots, a_n) - f(\mathbf{a})}{h},

provided this limit exists (as a genuine limit of a real-valued function of the single real variable hh, taken over h∈R∖{0}h \in \mathbb{R} \setminus \{0\} with h→0h \to 0). Equivalently, letting gi(t)=f(a1,…,ai−1,t,ai+1,…,an)g_i(t) = f(a_1, \dots, a_{i-1}, t, a_{i+1}, \dots, a_n) be the function of one variable obtained by freezing every coordinate except the ii-th, we require gig_i to be differentiable at t=ait = a_i, and set

∂f∂xi(a):=gi′(ai).\frac{\partial f}{\partial x_i}(\mathbf{a}) := g_i'(a_i).

Because UU is open, there is δ>0\delta > 0 such that gi(t)g_i(t) is defined for all t∈(ai−δ,ai+δ)t \in (a_i - \delta, a_i + \delta), so this is a legitimate one-variable derivative at an interior point of the domain of gig_i. Common alternative notations include fxi(a)f_{x_i}(\mathbf{a}), Dif(a)D_i f(\mathbf{a}), and ∂if(a)\partial_i f(\mathbf{a}). If ∂f/∂xi(a)\partial f/\partial x_i(\mathbf{a}) exists for every a\mathbf{a} in some open set V⊆UV \subseteq U, we obtain a function ∂f/∂xi:V→R\partial f/\partial x_i : V \to \mathbb{R}, itself a candidate for further partial differentiation (see higher-order partials below).

Intuition

The definition says something very concrete: to compute ∂f/∂x\partial f/\partial x at a point, you slice the domain with the line through that point parallel to the xx-axis, restrict ff to that line, and differentiate the resulting one-variable function in the ordinary sense. All other coordinates are treated as frozen constants during the computation. This is why, in practice, computing ∂f/∂xi\partial f/\partial x_i is mechanically identical to single-variable differentiation: you literally apply the same rules (power rule, product rule, chain rule) to the expression for ff, treating every symbol other than xix_i as a constant. The geometric picture for n=2n = 2 is the most useful mental image. If f(x,y)f(x,y) is a surface z=f(x,y)z = f(x,y) in R3\mathbb{R}^3, then fixing y=by = b carves out a curve — the intersection of the surface with the vertical plane y=by = b — and ∂f/∂x(a,b)\partial f/\partial x(a,b) is the slope of the tangent line to that curve at x=ax = a. Symmetrically, ∂f/∂y(a,b)\partial f/\partial y(a,b) is the slope of the tangent line to the curve cut out by the plane x=ax = a. These are two different tangent lines to the surface at the point (a,b,f(a,b))(a,b,f(a,b)), and crucially they are only two directions among infinitely many along which one could approach the point — which is exactly why partial derivatives, by themselves, cannot see everything about the local behavior of ff.

Figure
Slicing a surface with coordinate planes to read off two partial derivatives at (1, 2)
x y z (1, 2, f(1,2)) slope = ∂f/∂x(1,2) slope = ∂f/∂y(1,2)

Higher-order partial derivatives

If ∂f/∂xi\partial f/\partial x_i exists on an open set VV, we may ask whether its partial derivative with respect to some xjx_j exists at a point of VV. If so, we call the result a second-order partial derivative, written

∂2f∂xj ∂xi:=∂∂xj ⁣(∂f∂xi),or, in subscript notation,(fxi)xj=fxixj.\frac{\partial^2 f}{\partial x_j \, \partial x_i} := \frac{\partial}{\partial x_j}\!\left( \frac{\partial f}{\partial x_i} \right), \qquad \text{or, in subscript notation,} \qquad (f_{x_i})_{x_j} = f_{x_i x_j}.

Note the notational convention: in ∂2f/(∂xj∂xi)\partial^2 f/(\partial x_j \partial x_i) the rightmost operator ∂/∂xi\partial/\partial x_i is applied first (reading right to left), whereas in subscript notation fxixjf_{x_i x_j} the leftmost subscript is applied first (reading left to right). Both conventions are standard; one must fix and respect one of them. When i=ji = j we write ∂2f/∂xi2\partial^2 f/\partial x_i^2 or fxixif_{x_i x_i}. When i≠ji \neq j, the resulting derivative is called a mixed partial derivative. This process iterates: an order-kk partial derivative is obtained by kk successive partial differentiations, in some specified order of variables, and is denoted

∂kf∂xik⋯∂xi1.\frac{\partial^k f}{\partial x_{i_k} \cdots \partial x_{i_1}}.

A priori, nothing forces fxy=fyxf_{xy} = f_{yx} at a given point — the two mixed partials are computed via different iterated limit processes (differentiate in xx then in yy, versus yy then xx), and different limiting procedures need not agree. It is a genuine theorem — Clairaut's theorem (also called Schwarz's theorem), covered separately — that mixed partials do coincide provided both are continuous near the point in question. Without such a continuity hypothesis, equality can fail, as the classical counterexample f(x,y)=xy(x2−y2)/(x2+y2)f(x,y) = xy(x^2-y^2)/(x^2+y^2) (with f(0,0)=0f(0,0)=0) demonstrates: for that function fxy(0,0)=1≠−1=fyx(0,0)f_{xy}(0,0) = 1 \ne -1 = f_{yx}(0,0). We flag this now and defer the full proof and analysis to Clairaut's Theorem.

TheoremExistence of All First Partials Does Not Imply Continuity

There exists a function f:R2→Rf : \mathbb{R}^2 \to \mathbb{R} such that: 1. Both partial derivatives ∂f/∂x(a,b)\partial f/\partial x(a,b) and ∂f/∂y(a,b)\partial f/\partial y(a,b) exist at every point (a,b)∈R2(a,b) \in \mathbb{R}^2, and 2. ff is not continuous at the origin (0,0)(0,0). Consequently, the existence of all first-order partial derivatives of ff at a point a\mathbf{a} does not imply that ff is continuous at a\mathbf{a}.

Proof

Construction. Define f:R2→Rf : \mathbb{R}^2 \to \mathbb{R} by

f(x,y)={xyx2+y2(x,y)≠(0,0)0(x,y)=(0,0).f(x,y) = \begin{cases} \dfrac{xy}{x^2+y^2} & (x,y) \neq (0,0) \\ 0 & (x,y) = (0,0). \end{cases}

Step 1: the partial derivatives exist everywhere, including at the origin. Away from the origin: for (x,y)≠(0,0)(x,y) \neq (0,0), ff is a rational function whose denominator x2+y2x^2+y^2 is nonzero on the open set R2∖{(0,0)}\mathbb{R}^2 \setminus \{(0,0)\}. Rational functions are differentiable (in each variable separately, holding the other fixed) wherever the denominator does not vanish, by the quotient rule for single-variable derivatives applied to t↦f(t,b)t \mapsto f(t, b) and t↦f(a,t)t \mapsto f(a,t). Explicitly, by the quotient rule,

fx(x,y)=y(x2+y2)−xy(2x)(x2+y2)2=y(y2−x2)(x2+y2)2,fy(x,y)=x(x2−y2)(x2+y2)2,f_x(x,y) = \frac{y(x^2+y^2) - xy(2x)}{(x^2+y^2)^2} = \frac{y(y^2 - x^2)}{(x^2+y^2)^2}, \qquad f_y(x,y) = \frac{x(x^2 - y^2)}{(x^2+y^2)^2},

both of which are well-defined (finite) for every (x,y)≠(0,0)(x,y) \neq (0,0), since the denominator (x2+y2)2>0(x^2+y^2)^2 > 0 there. At the origin: we must return to the definition and compute the limit directly, since ff is given by a different formula at (0,0)(0,0). Consider g(t)=f(t,0)g(t) = f(t, 0). For every t≠0t \neq 0, g(t)=f(t,0)=t⋅0t2+02=0g(t) = f(t,0) = \dfrac{t \cdot 0}{t^2 + 0^2} = 0, and g(0)=f(0,0)=0g(0) = f(0,0) = 0 by definition. Hence g(t)=0g(t) = 0 identically for all t∈Rt \in \mathbb{R}, so gg is the zero function, which is differentiable everywhere with g′(0)=0g'(0) = 0. Therefore

fx(0,0)=lim⁡h→0f(h,0)−f(0,0)h=lim⁡h→00−0h=0.f_x(0,0) = \lim_{h \to 0} \frac{f(h,0) - f(0,0)}{h} = \lim_{h\to 0} \frac{0 - 0}{h} = 0.

By the identical computation with the roles of x,yx,y swapped (using f(0,t)=0f(0,t) = 0 for all tt, including t=0t=0),

fy(0,0)=lim⁡h→0f(0,h)−f(0,0)h=0.f_y(0,0) = \lim_{h \to 0} \frac{f(0,h) - f(0,0)}{h} = 0.

Both limits exist and equal 00. Thus fxf_x and fyf_y exist at every point of R2\mathbb{R}^2 — this proves claim (1).

Step 2: ff is discontinuous at the origin. We show that ff does not satisfy the definition of continuity at (0,0)(0,0), i.e. it is false that lim⁡(x,y)→(0,0)f(x,y)=f(0,0)=0\lim_{(x,y)\to(0,0)} f(x,y) = f(0,0) = 0. To do this it suffices to exhibit two sequences of points approaching (0,0)(0,0) along which ff tends to two different limits; if lim⁡(x,y)→(0,0)f(x,y)\lim_{(x,y) \to (0,0)} f(x,y) existed and equaled some value LL, then ff evaluated along every sequence tending to the origin would converge to that same LL — this is the sequential characterization of the multivariable limit, established in the study of Limits and Continuity in Several Variables. Consider the sequence of points Pn=(1/n,0)P_n = (1/n, 0), which tends to (0,0)(0,0) as n→∞n \to \infty. For every nn,

f(Pn)=f ⁣(1n,0)=(1/n)(0)(1/n)2+02=0,f(P_n) = f\!\left(\tfrac1n, 0\right) = \frac{(1/n)(0)}{(1/n)^2 + 0^2} = 0,

so f(Pn)→0f(P_n) \to 0 along this sequence. Now consider Qn=(1/n,1/n)Q_n = (1/n, 1/n), which also tends to (0,0)(0,0) as n→∞n \to \infty. For every nn,

f(Qn)=f ⁣(1n,1n)=(1/n)(1/n)(1/n)2+(1/n)2=1/n22/n2=12,f(Q_n) = f\!\left(\tfrac1n, \tfrac1n\right) = \frac{(1/n)(1/n)}{(1/n)^2 + (1/n)^2} = \frac{1/n^2}{2/n^2} = \frac12,

so f(Qn)→12f(Q_n) \to \tfrac12 along this sequence. Since f(Pn)→0≠12←f(Qn)f(P_n) \to 0 \neq \tfrac12 \leftarrow f(Q_n), while both Pn→(0,0)P_n \to (0,0) and Qn→(0,0)Q_n \to (0,0), the two-path test shows lim⁡(x,y)→(0,0)f(x,y)\lim_{(x,y) \to (0,0)} f(x,y) does not exist as a well-defined single value (in particular it cannot equal f(0,0)=0f(0,0) = 0). Hence ff is discontinuous at (0,0)(0,0). This proves claim (2).

Conclusion. We have exhibited a function ff for which fx(0,0)f_x(0,0) and fy(0,0)f_y(0,0) both exist (Step 1), yet ff fails to be continuous at (0,0)(0,0) (Step 2). Therefore existence of all first partial derivatives at a point does not imply continuity at that point. ■\blacksquare

∎

Worked examples

Example 1 (computing partials directly from the limit definition, and via rules, for an asymmetric function). Let f(x,y)=x2y3+sin⁡(xy)f(x,y) = x^2 y^3 + \sin(xy), and compute fx(2,1)f_x(2,1) and fy(2,1)f_y(2,1) two ways: by the rules, and by the raw limit definition, to confirm they agree. Via differentiation rules. Treating yy as constant and differentiating in xx:

fx(x,y)=2xy3+ycos⁡(xy)⇒fx(2,1)=2(2)(1)3+(1)cos⁡(2⋅1)=4+cos⁡2.f_x(x,y) = 2xy^3 + y\cos(xy) \quad \Rightarrow \quad f_x(2,1) = 2(2)(1)^3 + (1)\cos(2\cdot 1) = 4 + \cos 2.

Treating xx as constant and differentiating in yy:

fy(x,y)=3x2y2+xcos⁡(xy)⇒fy(2,1)=3(4)(1)+2cos⁡(2)=12+2cos⁡2.f_y(x,y) = 3x^2y^2 + x\cos(xy) \quad \Rightarrow \quad f_y(2,1) = 3(4)(1) + 2\cos(2) = 12 + 2\cos 2.

Via the limit definition, for fx(2,1)f_x(2,1) as a check. We must show

lim⁡h→0f(2+h,1)−f(2,1)h=4+cos⁡2.\lim_{h \to 0} \frac{f(2+h, 1) - f(2,1)}{h} = 4 + \cos 2.

Compute f(2+h,1)=(2+h)2(1)3+sin⁡((2+h)(1))=(2+h)2+sin⁡(2+h)f(2+h,1) = (2+h)^2(1)^3 + \sin\big((2+h)(1)\big) = (2+h)^2 + \sin(2+h), and f(2,1)=4+sin⁡2f(2,1) = 4 + \sin 2. So

f(2+h,1)−f(2,1)h=(2+h)2−4h+sin⁡(2+h)−sin⁡2h=4h+h2h+sin⁡(2+h)−sin⁡2h=(4+h)+sin⁡(2+h)−sin⁡2h.\frac{f(2+h,1)-f(2,1)}{h} = \frac{(2+h)^2 - 4}{h} + \frac{\sin(2+h) - \sin 2}{h} = \frac{4h + h^2}{h} + \frac{\sin(2+h)-\sin 2}{h} = (4+h) + \frac{\sin(2+h)-\sin2}{h}.

As h→0h \to 0, the first term →4\to 4. The second term is exactly the difference quotient for the single-variable derivative of sin⁡\sin at 22, so by the known fact (sin⁡t)′=cos⁡t(\sin t)' = \cos t, it tends to cos⁡2\cos 2. Hence the whole expression tends to 4+cos⁡24 + \cos 2, matching the rule-based computation exactly. This illustrates why the "rules" method is legitimate: it is nothing more than the single-variable differentiation rules (product rule, chain rule) applied to the one-variable function t↦f(t,1)t \mapsto f(t,1), which is precisely what the partial-derivative limit computes.

Example 2 (a function requiring the definition at a boundary/special point, and second-order mixed partials). Let

f(x,y)={x3−y3x2+y2(x+2y)(x,y)≠(0,0)0(x,y)=(0,0).f(x,y) = \begin{cases} \dfrac{x^3 - y^3}{x^2+y^2}(x + 2y) & (x,y) \ne (0,0) \\ 0 & (x,y) = (0,0). \end{cases}

We compute fx(0,0)f_x(0,0), fy(0,0)f_y(0,0) from the definition, then compute fxy(0,0)f_{xy}(0,0) and fyx(0,0)f_{yx}(0,0) to see whether they agree for this particular function (they will, since it is smooth away from the origin and one can check the hypotheses of Clairaut's theorem hold — but we verify directly at the origin using limits, as good practice for the definition). First partials at the origin. Set g(t)=f(t,0)=t3−0t2(t)=t3t2⋅t=t2g(t) = f(t,0) = \dfrac{t^3 - 0}{t^2}(t) = \dfrac{t^3}{t^2}\cdot t = t^2 for t≠0t \ne 0 — wait, let's compute carefully: f(t,0)=t3−03t2+02(t+0)=t3t2⋅t=t⋅t=t2f(t,0) = \dfrac{t^3 - 0^3}{t^2+0^2}(t + 0) = \dfrac{t^3}{t^2}\cdot t = t \cdot t = t^2 for t≠0t \neq 0, and f(0,0)=0=02f(0,0) = 0 = 0^2, so g(t)=t2g(t) = t^2 for all tt. Then

fx(0,0)=g′(0)=2t∣t=0=0.f_x(0,0) = g'(0) = 2t\big|_{t=0} = 0.

Similarly h(t)=f(0,t)=0−t3t2(2t)=−t3t2(2t)=−2t2h(t) = f(0,t) = \dfrac{0 - t^3}{t^2}(2t) = \dfrac{-t^3}{t^2}(2t) = -2t^2 for t≠0t\ne0, and h(0)=0=−2(0)2h(0)=0=-2(0)^2, so h(t)=−2t2h(t) = -2t^2 identically, giving

fy(0,0)=h′(0)=−4t∣t=0=0.f_y(0,0) = h'(0) = -4t\big|_{t=0} = 0.

Partials away from the origin, to set up the mixed partial. For (x,y)≠(0,0)(x,y) \ne (0,0), write N=(x3−y3)(x+2y)=x4+2x3y−xy3−2y4N = (x^3-y^3)(x+2y) = x^4 + 2x^3y - xy^3 - 2y^4 and D=x2+y2D = x^2+y^2, so f=N/Df = N/D. By the quotient rule,

fx=NxD−NDxD2,Nx=4x3+6x2y−y3,Dx=2x.f_x = \frac{N_x D - N D_x}{D^2}, \qquad N_x = 4x^3 + 6x^2y - y^3, \qquad D_x = 2x.

We want fx(0,y)f_x(0,y) for y≠0y \ne 0 (needed to differentiate fxf_x in yy at the origin along the yy-axis). At points (0,y)(0,y) with y≠0y \ne 0: N(0,y)=−2y4N(0,y) = -2y^4, D(0,y)=y2D(0,y) = y^2, Nx(0,y)=−y3N_x(0,y) = -y^3, Dx(0,y)=0D_x(0,y) = 0. So

fx(0,y)=Nx(0,y) D(0,y)−N(0,y) Dx(0,y)D(0,y)2=(−y3)(y2)−(−2y4)(0)y4=−y5y4=−y.f_x(0,y) = \frac{N_x(0,y)\,D(0,y) - N(0,y)\,D_x(0,y)}{D(0,y)^2} = \frac{(-y^3)(y^2) - (-2y^4)(0)}{y^4} = \frac{-y^5}{y^4} = -y.

Together with fx(0,0)=0f_x(0,0) = 0 computed above, we get fx(0,y)=−yf_x(0,y) = -y for all yy (including y=0y=0). Hence

fxy(0,0)=ddy[fx(0,y)]y=0=ddy(−y)∣y=0=−1.f_{xy}(0,0) = \frac{d}{dy}\Big[f_x(0,y)\Big]_{y=0} = \frac{d}{dy}(-y)\Big|_{y=0} = -1.

Now the other order: by symmetry of the quotient rule, fy=NyD−NDyD2f_y = \dfrac{N_y D - N D_y}{D^2} with Ny=2x3−3xy2−8y3N_y = 2x^3 - 3xy^2 - 8y^3, Dy=2yD_y = 2y. At points (x,0)(x,0) with x≠0x \ne 0: N(x,0)=x4N(x,0) = x^4, D(x,0)=x2D(x,0)=x^2, Ny(x,0)=2x3N_y(x,0) = 2x^3, Dy(x,0)=0D_y(x,0)=0, so

fy(x,0)=(2x3)(x2)−(x4)(0)x4=2x5x4=2x,f_y(x,0) = \frac{(2x^3)(x^2) - (x^4)(0)}{x^4} = \frac{2x^5}{x^4} = 2x,

and together with fy(0,0)=0f_y(0,0)=0 this gives fy(x,0)=2xf_y(x,0) = 2x for all xx. Hence

fyx(0,0)=ddx[fy(x,0)]x=0=ddx(2x)∣x=0=2.f_{yx}(0,0) = \frac{d}{dx}\Big[f_y(x,0)\Big]_{x=0} = \frac{d}{dx}(2x)\Big|_{x=0} = 2.

Conclusion of Example 2. We find fxy(0,0)=−1f_{xy}(0,0) = -1 while fyx(0,0)=2f_{yx}(0,0) = 2: the mixed partials disagree at the origin for this function. This is not a contradiction of any theorem — it simply shows that fxyf_{xy} and fyxf_{yx} need not be continuous near (0,0)(0,0) here, so the hypothesis of Clairaut's theorem fails and no equality is guaranteed. This example (structurally similar to the standard textbook counterexample for Clairaut's theorem) reinforces that mixed-partial equality is a genuine theorem requiring a continuity hypothesis, not an automatic algebraic identity — the full statement and proof are developed in Clairaut's Theorem.

CounterexampleWhy continuity of ff along coordinate lines is not "full" continuity

One might hope to weaken the theorem above by replacing "both partials exist" with the stronger-looking hypothesis "ff is continuous along every line through the point," and ask whether that forces full continuity. It does not, and the same function

f(x,y)={xy2x2+y4(x,y)≠(0,0)0(x,y)=(0,0)f(x,y) = \begin{cases} \dfrac{xy^2}{x^2+y^4} & (x,y)\ne(0,0) \\ 0 & (x,y)=(0,0)\end{cases}

demonstrates it. Fix any line ℓ(t)=(at,bt)\ell(t) = (at, bt) through the origin, t∈Rt \in \mathbb{R}. If a≠0a \ne 0, then for t≠0t \ne 0,

f(ℓ(t))=(at)(bt)2(at)2+(bt)4=ab2t3a2t2+b4t4=ab2ta2+b4t2→t→00=f(0,0),f(\ell(t)) = \frac{(at)(bt)^2}{(at)^2 + (bt)^4} = \frac{ab^2 t^3}{a^2t^2 + b^4t^4} = \frac{ab^2 t}{a^2 + b^4t^2} \xrightarrow[t\to 0]{} 0 = f(0,0),

so ff restricted to this line is continuous at t=0t=0. If a=0a = 0 (the line is the yy-axis), then f(ℓ(t))=f(0,bt)=0f(\ell(t)) = f(0,bt) = 0 for all tt, again continuous. So ff is continuous along every straight line through the origin — a condition even stronger than merely having the two partials exist, since it covers infinitely many directions, not just the two axis directions. Yet ff is discontinuous at the origin: take the parabolic path x=t2,y=tx = t^2, y = t. Then for t≠0t \ne 0,

f(t2,t)=t2⋅t2(t2)2+t4=t42t4=12≠0=f(0,0),f(t^2, t) = \frac{t^2 \cdot t^2}{(t^2)^2 + t^4} = \frac{t^4}{2t^4} = \frac12 \ne 0 = f(0,0),

so along this curved path f→12≠f(0,0)f \to \tfrac12 \neq f(0,0), violating continuity at the origin (again by the sequential characterization, using t=1/n→0t = 1/n \to 0). This shows that even continuity along every line — a much stronger hypothesis than mere existence of the two axis-direction partials — still cannot certify full (multivariable) continuity, because approach along curved paths can behave completely differently. It underscores exactly why the definition of continuity must quantify over all sequences (or all ε\varepsilon-balls), not just straight-line directions, and foreshadows why differentiability (not just partial differentiability) is defined via a genuine linear-approximation condition in every direction at once, in Differentiability and the Total Derivative.

Scope, edge cases & common traps

SituationWhat is trueWhat is not automatically true
fx(a)f_x(\mathbf a) and fy(a)f_y(\mathbf a) both existff restricted to each coordinate axis through a\mathbf a is differentiable thereff need not be continuous at a\mathbf a (see theorem above)
ff continuous along every line through a\mathbf aDirectional behavior along straight paths is controlledff can still be discontinuous along curved paths (see counterexample)
fxyf_{xy} and fyxf_{yx} both exist at a pointBoth iterated limits happen to existThey need not be equal (Example 2) unless a continuity hypothesis holds (Clairaut)
ff is a polynomial or rational function with nonvanishing denominatorPartials of all orders exist and mixed partials agree automaticallyThis relies on the function being built from elementary continuous pieces — not a general fact
Domain point is on the boundary of the domainThe definition requires an open set / two-sided limit in hhOne-sided partials can be defined analogously but are a different (weaker) notion

The mathematician behind it

Origins · 1 minAlexis Clairaut and how this was discovered
AC
Alexis Clairaut
1713–1765 · 18th-century French mathematician and astronomer, precocious contributor to analysis and celestial mechanics

Clairaut was a child prodigy who presented mathematical work to the French Academy of Sciences at age 13 and was elected a member at 18 — the youngest in its history. Beyond his celebrated work computing the return of Halley's comet (correctly predicting the perturbing effect of Jupiter and Saturn), Clairaut's name is permanently attached to the theorem on the equality of mixed partial derivatives (also credited to Hermann Schwarz, who gave a rigorous proof a century later under precise continuity hypotheses). His work sits exactly at the seam this article approaches: the informal 18th-century assumption that mixed partials simply must commute, versus the careful 19th-century recognition that a genuine hypothesis is required.

History
- 1734 — Clairaut publishes work on differential equations and curve theory, using partial differentiation techniques freely, without a fully rigorous foundation for limits.
- 1740s — Partial derivatives become standard tools in the developing calculus of several variables, driven by problems in mechanics and the shape of the Earth.
- 1740 — Clairaut's memoir on the theory of the figure of the Earth systematizes early partial-derivative methods in mathematical physics.
- 1873–1898 — Hermann Schwarz and others give rigorous ε\varepsilon–δ\delta proofs clarifying exactly which continuity hypotheses make mixed partials commute, replacing informal 18th-century assumptions.
- 20th century — The modern treatment (Rudin, and later textbook expositions) fully separates the notion of partial differentiability from total differentiability, using exactly the kind of counterexample given in this article.
Is a partial derivative the same thing as a directional derivative?

No. A partial derivative ∂f/∂xi\partial f/\partial x_i is the special case of a directional derivative taken along a coordinate axis direction (the standard basis vector ei\mathbf e_i). A general directional derivative Duf(a)D_{\mathbf u}f(\mathbf a) measures the instantaneous rate of change of ff at a\mathbf a in an arbitrary unit direction u\mathbf u, and is defined by the analogous limit lim⁡h→0(f(a+hu)−f(a))/h\lim_{h\to0} \big(f(\mathbf a + h\mathbf u) - f(\mathbf a)\big)/h. Partial derivatives are the nn special directional derivatives corresponding to u=e1,…,en\mathbf u = \mathbf e_1, \dots, \mathbf e_n. If ff is (totally) differentiable at a\mathbf a, every directional derivative can be recovered from the partials via Duf(a)=∇f(a)⋅uD_{\mathbf u}f(\mathbf a) = \nabla f(\mathbf a)\cdot \mathbf u, but without differentiability this formula can fail.

Why does the existence of partial derivatives fail to imply continuity, intuitively?

Because a partial derivative only examines the behavior of ff along two rigid, straight coordinate directions through the point — it never looks at diagonal or curved paths of approach. A function can be extremely well-behaved along the xx-axis and yy-axis through a point while oscillating or jumping wildly along other paths, such as y=x2y = x^2 or y=mxy=mx with varying slope mm. Continuity, by contrast, is a much stronger condition: it requires the function values to converge to f(a)f(\mathbf a) along every possible sequence approaching a\mathbf a, from every direction and along every curve, not just two. This gap between "controlled along two special lines" and "controlled from every direction" is exactly what the counterexample in this article exploits.

If both fxf_x and fyf_y exist at every point near a\mathbf a and are also continuous there, is that enough for continuity of ff?

Yes — in fact more is true. If fxf_x and fyf_y exist in a neighborhood of a\mathbf a and are continuous at a\mathbf a, then ff is not just continuous but totally differentiable at a\mathbf a (this is a standard sufficient condition for differentiability, proved using the mean value theorem applied along each coordinate direction in turn). Total differentiability in turn implies continuity. So the pathology in this article's theorem specifically requires the partials to exist without being continuous — the example function xy/(x2+y2)xy/(x^2+y^2) indeed has partials that are discontinuous at the origin, which is entirely consistent with this stronger continuity-of-partials criterion.

Do higher-order partial derivatives always exist if the first-order ones do?

No. Existence of fxf_x on an open set gives you a new function fxf_x, and there is no guarantee that this new function is itself differentiable in yy (or in xx) at any particular point — differentiability of fxf_x is a separate condition that must be checked independently, exactly as with any single-variable derivative that need not itself be differentiable. A function can be differentiable everywhere with a first derivative that is continuous but nowhere differentiable, and analogous phenomena occur for partials of multivariable functions.

Does the order of differentiation in a mixed partial ever matter in practice?

Yes, in principle, but for the overwhelming majority of functions encountered in practice — polynomials, rational functions away from poles, and standard elementary functions (exponential, trigonometric, logarithmic) composed on their natural domains — mixed partials are continuous and Clairaut's theorem guarantees fxy=fyxf_{xy}=f_{yx}. Order matters only for deliberately pathological functions, typically piecewise-defined functions with a special value patched in at one point (as in Example 2 above), where the mixed partial derivatives fail to be continuous at that special point.

How is a partial derivative actually computed in practice, step by step?

Identify the variable you are differentiating with respect to; treat every other variable as if it were a fixed numerical constant; then apply ordinary single-variable differentiation rules (power, product, quotient, chain rule) to the resulting one-variable expression. At a specific numerical point, you may either substitute the other coordinates' numerical values first and differentiate the resulting single-variable function, or differentiate symbolically first and substitute all coordinates afterward — both give the same answer, since substituting a constant commutes with holding a variable fixed. At specially defined points (e.g. a piecewise function's patched value), you must return to the raw limit definition, as ordinary differentiation rules do not apply directly to a value defined by cases.

Why does this article's counterexample not contradict "differentiable implies continuous" from single-variable calculus?

It does not contradict it because "having both partial derivatives exist" is a strictly weaker condition than "(total) differentiability" in the multivariable sense. Total differentiability at a\mathbf a requires the existence of a single linear map that approximates ff well in every direction simultaneously, with an error term that is o(∥h∥)o(\|\mathbf h\|) as h→0\mathbf h \to \mathbf 0 in Rn\mathbb R^n — and it is this stronger notion, developed in Differentiability and the Total Derivative, for which the implication "differentiable ⇒\Rightarrow continuous" genuinely holds, by an argument directly generalizing the single-variable proof. Mere existence of partial derivatives only checks the linear-approximation property along two special axis directions, which is not strong enough to control the error term in all directions at once.

Before this

Where this leads