Learning Outcomes
- Explain when a function of two variables is differentiable.
- Use the total differential to approximate the change in a function of two variables.
When working with a function y=f(x)y=f(x) of one variable, the function is said to be differentiable at a point x=ax=a if f′(a)f′(a) exists. Furthermore, if a function of one variable is differentiable at a point, the graph is “smooth” at that point (i.e., no corners exist) and a tangent line is well-defined at that point.
The idea behind differentiability of a function of two variables is connected to the idea of smoothness at that point. In this case, a surface is considered to be smooth at point PP if a tangent plane to the surface exists at that point. If a function is differentiable at a point, then a tangent plane to the surface exists at that point. Recall the formula for a tangent plane at a point (x0, y0)(x0, y0) is given by
For a tangent plane to exist at the point (x0, y0)(x0, y0), the partial derivatives must therefore exist at that point. However, this is not a sufficient condition for smoothness, as was illustrated in Figure 3. In that case, the partial derivatives existed at the origin, but the function also had a corner on the graph at the origin.
Definition
A function f(x, y)f(x, y) is differentiable at a point P (x0, y0)P (x0, y0) if, for all points (x, y)(x, y) in a δδ disk around PP, we can write
where the error term EE satisfies
The last term in the Differentiable Function at a Point Equation is referred to as the error term and it represents how closely the tangent plane comes to the surface in a small neighborhood (δδ disk) of point PP. For the function ff to be differentiable at PP, the function must be smooth—that is, the graph of ff must be close to the tangent plane for points near PP.
Example: Demonstrating Differentiability
Show that the function f(x, y)=2x2−4yf(x, y)=2x2−4y is differentiable at point (2,−3)(2,−3).
TRY IT
Show that the function f(x, y)=3x−4y2f(x, y)=3x−4y2 is differentiable at point (−1, 2)(−1, 2).
Watch the following video to see the worked solution to the above Try It
You can view the transcript for “CP 4.21” here (opens in new window).
The function f(x, y)={xy√x2+y2 (x, y)≠(0, 0)0 (x, y)=(0, 0)f(x, y)={xy√x2+y2 (x, y)≠(0, 0)0 (x, y)=(0, 0) is not differentiable at the origin. We can see this by calculating the partial derivatives. This function appeared earlier in the section, where we showed that fx(0, 0)=fy(0, 0)=0fx(0, 0)=fy(0, 0)=0. Substituting this information into our definition equation using x0=0x0=0 and y0=0y0=0, we get
Calculating lim(x, y)→(x0, y0)E(x, y)√(x−x0)2+(y−y0)2lim(x, y)→(x0, y0)E(x, y)√(x−x0)2+(y−y0)2 gives
Depending on the path taken toward the origin, this limit takes different values. Therefore, the limit does not exist and the function ff is not differentiable at the origin as shown in the following figure

Figure 1. This function f(x,y)f(x,y) is not differentiable at the origin.
Differentiability and continuity for functions of two or more variables are connected, the same as for functions of one variable. In fact, with some adjustments of notation, the basic theorem is the same.
Differentiability implies continuity
Let z=f(x, y)z=f(x, y) be a function of two variables with (x0, y0)(x0, y0) in the domain of ff. If f(x, y)f(x, y) is differentiable at (x0, y0)(x0, y0), then f(x, y)f(x, y) is continuous at (x0, y0)(x0, y0).
Differentiability Implies Continuity shows that if a function is differentiable at a point, then it is continuous there. However, if a function is continuous at a point, then it is not necessarily differentiable at that point. For example,
is continuous at the origin, but it is not differentiable at the origin. This observation is also similar to the situation in single-variable calculus.
Continuity of First Partials Implies Differentiability further explores the connection between continuity and differentiability at a point. This theorem says that if the function and its partial derivatives are continuous at a point, the function is differentiable.
Continuity of first partials implies differentiability
Let z=f(x, y)z=f(x, y) be a function of two variables with (x0, y0)(x0, y0) in the domain of ff. If f(x, y)f(x, y), fx(x, y)fx(x, y), and fy(x, y)fy(x, y) all exist in a neighborhood of (x0, y0)(x0, y0) and are continuous at (x0, y0)(x0, y0), then f(x, y)f(x, y) is differentiable there.
Recall that earlier we showed that the function
was not differentiable at the origin. Let’s calculate the partial derivatives fxfx and fyfy:
The contrapositive of the preceding theorem states that if a function is not differentiable, then at least one of the hypotheses must be false. Let’s explore the condition that fx(0,0)fx(0,0) must be continuous. For this to be true, it must be true that lim(x,y)→(0,0)fx(0,0)=fx(0,0)lim(x,y)→(0,0)fx(0,0)=fx(0,0):
lim(x,y)→(0,0)fx(x,y)=lim(x,y)→(0,0)y3(x2+y2)3/2.lim(x,y)→(0,0)fx(x,y)=lim(x,y)→(0,0)y3(x2+y2)3/2.
Let x=kyx=ky. Then
lim(x,y)→(0,0)y3(x2+y2)3/2=limy→0y3((ky)2+y2)3/2=limy→0y3(k2y2+y2)3/2=limy→0y3|y3|(k2+1)3/2=1(k2+1)3/2limy→0|y|ylim(x,y)→(0,0)y3(x2+y2)3/2=limy→0y3((ky)2+y2)3/2=limy→0y3(k2y2+y2)3/2=limy→0y3|y3|(k2+1)3/2=1(k2+1)3/2limy→0|y|y
If y>0y>0, then this expression equals 1/(k2+1)3/21/(k2+1)3/2; if y<0y<0 then it equals −(1/(k2+1)3/2)−(1/(k2+1)3/2). In either case, the value depends on kk, so the limit fails to exist.
Differentials
In Linear Approximations and Differentials we first studied the concept of differentials. The differential of yy, written dydy, is defined asf′(x)dxf′(x)dx. The differential is used to approximateΔy=f(x+Δx)−f(x)Δy=f(x+Δx)−f(x), whereΔx=dxΔx=dx. Extending this idea to the linear approximation of a function of two variables at the point(x0,y0)(x0,y0) yields the formula for the total differential for a function of two variables.
DEfinition
Let z=f(x,y)z=f(x,y) be a function of two variables with (x0,y0)(x0,y0) in the domain of ff and let ΔxΔx and ΔyΔy be chosen so that (x0+Δx,y0+Δy)(x0+Δx,y0+Δy) is also in the domain of ff. If ff is differentiable at the point (x0,y0)(x0,y0), then the differentials dxdx and dydy are defined as
dx=Δxdx=Δx and dy=Δydy=Δy
The differential dzdz also called the total differential of z=f(x,y)z=f(x,y) at (x0,y0)(x0,y0), is defined as
dz=fx(x0,y0)dx+fy(x0,y0)dydz=fx(x0,y0)dx+fy(x0,y0)dy.
Notice that the symbol ∂∂ is not used to denote the total differential; rather, dd appears in front of zz. Now, let’s define Δz=f(x+Δx,y+Δy)−f(x,y)Δz=f(x+Δx,y+Δy)−f(x,y). We use dzdz to approximate ΔzΔz, so
Δz≈dz=fx(x0,y0)dx+fy(x0,y0)dyΔz≈dz=fx(x0,y0)dx+fy(x0,y0)dy.
Therefore, the differential is used to approximate the change in the function z=f(x0,y0)z=f(x0,y0) at the point (x0,y0)(x0,y0) for given values of ΔxΔx and ΔyΔy. Since Δz=f(x+Δx,y+Δy)−f(x,y)Δz=f(x+Δx,y+Δy)−f(x,y), this can be used further to approximate f(x+Δx,y+Δy)f(x+Δx,y+Δy):
f(x+Δx,y+Δy)=f(x,y)+Δz≈f(x,y)+fx(x0,y0)Δx+fy(x0,y0)Δy.f(x+Δx,y+Δy)=f(x,y)+Δz≈f(x,y)+fx(x0,y0)Δx+fy(x0,y0)Δy.
See the following figure.

Figure 2. The linear approximation is calculated via the formula f(x+Δx,y+Δy)≈f(x,y)+fx(x0,y0)Δx+fy(x0,y0)Δy.
One such application of this idea is to determine error propagation. For example, if we are manufacturing a gadget and are off by a certain amount in measuring a given quantity, the differential can be used to estimate the error in the total volume of the gadget.
Example: Approximation by differentials
Find the differential dz of the function f(x,y)=3x2−2xy+y2 and use it to approximate Δz at point (2,−3). Use Δx=0.1 and Δy=−0.05 What is the exact value of Δz?
Try it
Find the differential dz of the function f(x,y)=4y2+x2y−2xy and use it to approximate Δz at point (1,−1). Use Δx=0.03 and Δy=−0.02. What is the exact value of Δz?
Watch the following video to see the worked solution to the above Try It
Try It
Differentiability of a Function of Three Variables
All of the preceding results for differentiability of functions of two variables can be generalized to functions of three variables. First, the definition:
DEfinition
A function f(x,y,z) is differentiable at a point P(x0,y0,z0) if for all points (x,y,z) in a δ disk around P we can write
f(x,y,z)=fx(x0,y0,z0)(x−x0)+fy(x0,y0,z0)(y−y0)+fz(x0,y0,z0)(z−z0)+E(x,y,z),
where the error term E satisfies
lim(x,y,z)→(x0,y0,z0)=E(x,y,x)√(x−x0)2+(y−y0)2+(z−z0)2=0.
If a function of three variables is differentiable at a point (x0,y0,z0) then it is continuous there. Furthermore, continuity of first partial derivatives at that point guarantees differentiability.
Candela Citations
- CP 4.21. Authored by: Ryan Melton. License: CC BY: Attribution
- CP 4.22. Authored by: Ryan Melton. License: CC BY: Attribution
- Calculus Volume 3. Authored by: Gilbert Strang, Edwin (Jed) Herman. Provided by: OpenStax. Located at: https://openstax.org/books/calculus-volume-3/pages/1-introduction. License: CC BY-NC-SA: Attribution-NonCommercial-ShareAlike. License Terms: Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction