Tutorials › Calculus III › Partial Derivatives Do Not Guarantee Differentiability

Differentiability and Linearization · Tutorial 329 of 999

Partial Derivatives Do Not Guarantee Differentiability

Learn why partial derivatives alone cannot establish differentiability, and how to expose the failure with carefully chosen paths.

Intermediate 9 min read

What You'll Learn

  • State the remainder definition of differentiability at a point in the plane.
  • Explain how differentiability determines the coefficients from the two partial derivatives.
  • Verify that a function can have partial derivatives at a point and still be discontinuous there.
  • Use paths approaching a point to disprove differentiability.
  • Distinguish coordinatewise information from a first-order approximation valid in every direction.

Coordinatewise Change Is Not the Whole Story

The partial derivatives of a function at a point describe how the function changes when we move along the coordinate directions: first horizontally, then vertically. Differentiability asks for more. It asks whether one linear function of the increments approximates the change in the function accurately for all small moves toward the point.

That difference matters. A function can have both partial derivatives at a point yet fail to be continuous there. Even when it is continuous, the partial derivatives may not provide a valid linear approximation. In this tutorial, we use paths approaching a point to demonstrate both failures.

Definition: A function \(f:\mathbb{R}^2\to\mathbb{R}\) is differentiable at \((a,b)\) if there is a linear map \(L:\mathbb{R}^2\to\mathbb{R}\) such that
$$ f(a+h,b+k) = f(a,b)+L(h,k)+r(h,k), \qquad \lim_{(h,k)\to(0,0)} \frac{r(h,k)}{\sqrt{h^2+k^2}}=0. $$
Here \(r(h,k)\) is the approximation error. The limit says that this error becomes negligible compared with the length of the increment \((h,k)\).

Every linear map from \(\mathbb{R}^2\) to \(\mathbb{R}\) has the form \(L(h,k)=Ah+Bk\) for constants \(A\) and \(B\). Thus differentiability requires a single pair of coefficients to approximate the change in \(f\), no matter how \((h,k)\) approaches \((0,0)\).

What Differentiability Would Force

The coefficients in a differentiable approximation are not arbitrary: they must agree with the partial derivatives. This follows by restricting the approximation to each coordinate axis.

Theorem: If \(f\) is differentiable at \((a,b)\), then its partial derivatives \(f_x(a,b)\) and \(f_y(a,b)\) exist, and the linear map in the definition is \(L(h,k)=f_x(a,b)h+f_y(a,b)k\). The converse does not follow: the existence of both partial derivatives does not, by itself, establish differentiability.

To see why the theorem holds, suppose the definition is satisfied with \(L(h,k)=Ah+Bk\). Set \(k=0\). For \(h\ne 0\), the definition gives

$$ \frac{f(a+h,b)-f(a,b)}{h} = A+\frac{r(h,0)}{h}. $$

Since \(r(h,0)/|h|\to 0\), we also have \(r(h,0)/h\to 0\). Therefore the difference quotient tends to \(A\), so \(f_x(a,b)\) exists and equals \(A\). Setting \(h=0\) instead gives

$$ \frac{f(a,b+k)-f(a,b)}{k} = B+\frac{r(0,k)}{k}, $$

and the final term tends to zero. Hence \(f_y(a,b)=B\). This argument explains the one-way implication: if differentiability holds, the partial derivatives identify the only possible linear approximation. It does not show that the approximation works away from the coordinate axes.

A Discontinuous Function with Both Partial Derivatives

Worked Example: Partial Derivatives Without Continuity

Define

$$ f(x,y)= \begin{cases} \dfrac{xy}{x^2+y^2}, &(x,y)\ne(0,0),\\[6pt] 0, &(x,y)=(0,0). \end{cases} $$

We first compute the partial derivatives at the origin directly from their definitions. Along the \(x\)-axis, \(f(h,0)=0\), so

$$ 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. $$

Along the \(y\)-axis, \(f(0,k)=0\), giving

$$ f_y(0,0) = \lim_{k\to 0}\frac{f(0,k)-f(0,0)}{k} = \lim_{k\to 0}\frac{0-0}{k} =0. $$

But approach the origin along the line \(y=x\). For every \(t\ne 0\),

$$ f(t,t)=\frac{t^2}{t^2+t^2}=\frac12. $$

This path gives a constant value of \(1/2\), whereas \(f(0,0)=0\). Therefore \(f\) is not continuous at the origin. Since differentiability implies continuity, \(f\) cannot be differentiable there. The partial derivatives exist, but they do not detect this failure: they only examine the two coordinate axes, where the function is zero.

In fact, away from the origin the denominator is nonzero, so the quotient rule gives ordinary partial derivatives:

$$ f_x(x,y)=\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} \qquad ((x,y)\ne(0,0)). $$

Thus both partial derivatives exist at every point: at the origin by the difference-quotient calculations, and elsewhere by these formulas. The failure is not a problem with defining the partial derivatives. It is a failure of continuity along a non-coordinate path.

Continuity Still Does Not Guarantee Differentiability

The preceding example fails differentiability because it is discontinuous. That is not the only way differentiability can fail. A function may be continuous and have both partial derivatives at the point, yet still fail to have a valid linear approximation.

Worked Example: A Continuous Function That Is Not Differentiable

Define

$$ g(x,y)= \begin{cases} \dfrac{x^2y}{x^2+y^2}, &(x,y)\ne(0,0),\\[6pt] 0, &(x,y)=(0,0). \end{cases} $$

As before, \(g(h,0)=0\) and \(g(0,k)=0\). Consequently,

$$ g_x(0,0)=\lim_{h\to0}\frac{g(h,0)-g(0,0)}{h}=0, \qquad g_y(0,0)=\lim_{k\to0}\frac{g(0,k)-g(0,0)}{k}=0. $$

We next verify continuity. Let \(r=\sqrt{x^2+y^2}\). For \((x,y)\ne(0,0)\), the inequality \(x^2\le x^2+y^2\) gives

$$ |g(x,y)| = \frac{x^2|y|}{x^2+y^2} \le |y| \le \sqrt{x^2+y^2} =r. $$

As \((x,y)\to(0,0)\), \(r\to0\), so this bound proves \(g(x,y)\to0=g(0,0)\). The function is continuous at the origin.

If \(g\) were differentiable there, its linear approximation would have to be \(L(h,k)=g_x(0,0)h+g_y(0,0)k=0\). Along the path \((t,t)\), however, for \(t\ne0\),

$$ g(t,t)=\frac{t^3}{2t^2}=\frac{t}{2}, \qquad \sqrt{t^2+t^2}=\sqrt{2}\,|t|. $$

The error from the proposed linear approximation is \(t/2\). Relative to the length of the increment, its magnitude is

$$ \frac{|g(t,t)-L(t,t)|}{\sqrt{t^2+t^2}} = \frac{|t|/2}{\sqrt{2}\,|t|} = \frac{1}{2\sqrt{2}}. $$

This does not tend to zero. The approximation therefore fails the definition of differentiability, even though the function is continuous and both partial derivatives exist.

Partial Derivatives Can Specify a Candidate but Not Validate It

The next example makes the role of nonzero partial derivatives explicit. The partial derivatives determine a candidate linear map, but a path can show that the candidate is not accurate enough.

Worked Example: Testing the Candidate Linear Approximation

Let \(F(x,y)=x+g(x,y)\), where \(g\) is the continuous function from the preceding example. Since \(g(h,0)=g(0,k)=0\),

$$ F(h,0)=h, \qquad F(0,k)=0, \qquad F(0,0)=0. $$

The partial derivatives at the origin are therefore

$$ F_x(0,0) = \lim_{h\to0}\frac{F(h,0)-F(0,0)}{h} = \lim_{h\to0}\frac{h}{h} =1, $$
$$ F_y(0,0) = \lim_{k\to0}\frac{F(0,k)-F(0,0)}{k} = \lim_{k\to0}\frac{0}{k} =0. $$

If \(F\) were differentiable at the origin, the only possible linear map would thus be \(L(h,k)=h\). On the path \((t,t)\), the computation for \(g\) gives \(g(t,t)=t/2\), and hence

$$ F(t,t)=t+\frac{t}{2}=\frac{3t}{2}, \qquad L(t,t)=t. $$

The error is \(F(t,t)-L(t,t)=t/2\). Dividing its magnitude by the increment length gives

$$ \frac{|F(t,t)-L(t,t)|}{\sqrt{t^2+t^2}} = \frac{|t|/2}{\sqrt{2}\,|t|} = \frac{1}{2\sqrt{2}}. $$

The error is not negligible relative to the increment. Thus \(F\) is not differentiable at the origin. The partial derivatives correctly identify the candidate coefficients \(1\) and \(0\), but they do not establish that this candidate works in every direction.

Why Paths Reveal the Failure

The definition of differentiability involves a limit as the entire increment \((h,k)\) approaches \((0,0)\), not merely as one coordinate changes at a time. To disprove such a limit, it is enough to find one path along which the required behavior fails. In the examples, the coordinate axes gave the partial derivatives, while a diagonal path exposed behavior those derivatives could not capture.

This gives a useful way to organize the reasoning. First, compute the partial derivatives at the point. If differentiability held, they would determine the linear map. Then compare the function with that candidate along a path. A path that contradicts continuity rules out differentiability immediately. If continuity holds, compare the approximation error with the length of the increment; a nonvanishing relative error still rules out differentiability.

1
Compute the coordinate information.
Find the partial derivatives at the point, using their difference-quotient definitions when needed.
2
Identify the only possible linear map.
If differentiability holds, its coefficients must be the two partial derivatives.
3
Look beyond the axes.
Choose a path approaching the point and check whether the function or its proposed approximation behaves as differentiability requires.

A Common Mistake

A tempting but incorrect argument is: “Both partial derivatives exist, so the derivative is the map with those coefficients.” This confuses a necessary condition with a sufficient one. For \(g\) above, the concrete calculation would be

$$ g_x(0,0)=g_y(0,0)=0 \quad\Longrightarrow\quad \text{“the derivative is }L(h,k)=0\text{.”} $$

The implication is unjustified. The partial derivatives only show that the zero map matches the function’s first-order change along the coordinate axes. Along \((t,t)\), the actual function is \(t/2\), and the relative error is \(1/(2\sqrt{2})\), not a quantity tending to zero. The correction is to treat the partial derivatives as determining a candidate linear map, then verify the full approximation condition. Existence of the partial derivatives alone does not verify it.

Why the Distinction Matters

Partial derivatives remain valuable: they describe coordinatewise rates of change and, when differentiability is already known, they provide the coefficients of the linear approximation. But coordinatewise rates do not summarize every possible approach to a point. A function can behave mildly along both axes and very differently along a diagonal or a curved path.

When deciding whether differentiability has been established, keep the logical direction clear. Differentiability forces the partial derivatives to exist and determines their role in the linear approximation. The reverse conclusion requires additional reasoning; it cannot be inferred from the partial derivatives alone.

Check Your Understanding

Answer each question by referring to the definition and examples above.

  1. What information do the partial derivatives give about the linear map in a differentiability approximation?
  2. For the discontinuous example, what path shows that the function does not approach its value at the origin?
  3. Why does the estimate \(|g(x,y)|\le\sqrt{x^2+y^2}\) establish continuity of \(g\) at the origin?
  4. For \(g(x,y)=x^2y/(x^2+y^2)\), what is the relative approximation error along the path \((t,t)\) when the candidate linear map is zero?
  5. Why is the statement “both partial derivatives exist, so the function is differentiable” logically invalid?