To determine how a function of several variables behaves when we change only one variable, we assign finite values to the other variables and allow only this variable to vary. In this case, the function becomes a function of a single variable. For example, consider a function z=f(x,y), and assign to y a (finite) fixed value of y=y0. The result, z=f(x,y0), is a function of only x. The curve formed by the intersection of the surface z=f(x,y) and the plane y=y0 represents the graph of z=f(x,y0) (see Fig. 1). Now we can differentiate z=f(x,y0) like a function of a single variable. What we obtain is called the partial derivative of f(x,y) with respect to x at (x0,y0):
limh0f(x0+h,y0)f(x0,y0)h.
To emphasize that we first held y fixed at y0 and then we differentiated with respect to x at x=x0, we use a “curved dee” instead of the regular letter d, and denote the above limit by fx(x0,y0).

Figure 1: section of z=f(x,y)

From single variable calculus, we remember that the derivative is the slope of the tangent line. Here, the partial derivative of f(x,y) with respect to x is the tangent of the angle between the curve z=f(x,y0) and a line parallel to the x-axis at the point (x0,y0,f(x0,y0)). That is, fx(x0,y0) is the slope of the surface z=f(x,y) at (x0,y0,f(x0,y0)) in the x direction.

In a similar way, we can hold x constant at x0 and make f a function of y alone, the derivative of which  is the partial derivative of z=f(x,y) with respect to y at (x0,y0) and is given by:
fy(x0,y0)=limk0f(x0,y0+k)f(x0,y0)k.

fx(x0,y0) is slope the slope of the surface z=f(x,y) at (x0,y0,f(x0,y0)) in the x direction. See Fig. 2.

Figure 2: section of  z=f(x,y)

If we let (x0,y0) vary in the domain of f(x,y) and find the partial derivatives at all points, the partial derivatives become two functions of x and y:
fx(x,y)=f(x,y)x,fy(x,y)=f(x,y)y

Definition 1: If z=f(x,y), the first partial derivatives of f with respect to the variables x and y are two functions fx(x,y) and fy(x,y) given by:
fx(x,y)=limh0f(x+h,y)f(x,y)h
fy(x,y)=limk0f(x,y+k)f(x,y)k
provided the limits exist.
  • Other common notations of partial derivatives are
    f(x,y)x=xf(x,y)=(fx)y=fx(x,y)=f1(x,y)=Dxf(x,y)=D1f(x,y)=zx=zx(x,y)=xf(x,y)=xz,f(x,y)y=yf(x,y)=(fx)x=fy(x,y)=f2(x,y)=Dyf(x,y)=D2f(x,y)=zy=zy(x,y)=yf(x,y)=yz

 

  • Other common notations, specially in physics and mechanics, are fx(x,y) or f,x(x,y). Comma or prime is used to emphasize that x is not a subscript.

 

  • If u=f(x,y,z) is a function of x,y and z, the first partial derivatives of f with respect to x,y, and z are:
    fx=limh0f(x+h,y,z)f(x,y,z)h fy=limk0f(x,y+k,z)f(x,y,z)k fz=limp0f(x,y,z+p)f(x,y,z)p

  • In general, if u=f(x1,x2,,xn) is a function of several variables, we can similarly define its partial derivatives by:

fxk=limh0f(x1,,xk1,xk+h,xk+1,,xn)f(x1,,xk,,xn)h

 

  • To calculate f/xk, we differentiate with respect to xk in a regular way and deal with the other variables as if they are constants.

 

  • To indicate that a partial derivative of z=f(x,y) has been evaluated at (x0,y0), we write:
    fx(x0,y0)orfx|(x0,y0)orfx|x=x0y=y0orfx(x0,y0)orzx(x0,y0).
    In the above notations we can replace f/x with z/x.

Examples

Example 1
If f(x,y)=x2sin(xy), find f/x and f/y.
Solution
To calculate fx we think of y as a constant and differentiate with respect to x as the only variable. Similarly to find fy, we regard x as a constant and differentiate with respect to y as the only variable. Therefore:
fx=2xsin(xy)+x2ycos(xy)andfy=x3cos(xy).
Example 2
If z=xey2, find zx and zy.
Solution
zx=ey2,zy=2xyey2
Example 3
If z=arctan(yx), find zx and zy.
Solution
Finding partial derivatives in this example might look intimidating at first look. But if we remember what a partial derivative means, we can use the techniques for functions of single variable:

To calculate zx, let u(x)=y/x regarding y as a fixed number. Using chain rule, we will have

zx=(dduarctan(u))(dudx)

Recall that (dduarctan(u))=11+u2. Because u(x)=y/x2, we can write

zx=(11+u2)(yx2)=11+y2x2×yx2=yx2+y2

Similarly by defining v(y)=y/x, and using chain rule, we will obtain
zy=(ddvarctan(v))(dvdy)=11+v2×1x=11+y2x2×1x=xx2+y2

Example 4
If f(x,y)=xey+x2y, find fy(1,0).
Solution
Method (a): First we hold x fixed at x=1. Then we differentiate with respect to y and then plug y=0 in that:
f(1,y)=ey+yfy(1,0)=[ddy(ey+y)]y=0=[ey+1]y=0=e0+1=2.

Method (b): First we calculate fy similar to previous examples and then plug x=1 and y=0 in that:
fy=xey+x2fy(1,0)=[xey+x2]x=1y=0=1×e0+12=2.

Example 5
Find fx(0,0) and fy(0,0), if f(x,y) is given by .
f(x,y)={x2cosxy2x2+y2if x00if x=0

Solution
To calculate fx(0,0), we plug y=0 in f(x,y), and call the resulting function g(x):
g(x)=f(x,0)={cosxif x00if x=0

Because limx0g(x)=cos0=1 is not equal to g(0)=0, g(x) is not continuous at x=0 and consequently it is not differentiable at x=0. Therefore fx(0,0) does not exist.

Similarly to calculate fy(0,0), we plug x=0 in f(x,y), which results in a constant function h(y)=f(0,y)=1. Therefore
fy(0,0)=h(0)=0.

Example 6
Find fx(0,0) and fy(0,0) if
f(x,y)={1xyif y01x2y2if y<0
Solution
To calculate fx(0,0) we plug y=0, and find a function g of x alone:
g(x)=f(x,0)=1xfx(0,0)=g(0)=1

Similarly for fy(0,0) we plug x=0 and find
h(y)=f(0,y)={1yif y01y2if y<0
where h(y) is a function of single variable. We note that h is continuous at y=0 because limy0h(y)=limy0+h(y)=h(0). Also
h(y)={1if y>02yif y<0.
Because h(0)=[2y]y=0=0 and h+(0)=1 are not equal, h(y) is not differentiable at y=0. Therefore, fy(0,0) does not exist. Graph of h(y) is shown in Fig. 3.

Figure 3

Example 6
Find the slopes in the x-direction and the y-direction of the surface given by
z=53x2+y22
at the point (1,2,4)
Solution
Recall that the slopes in the x-direction and the y-direction are fx and fy. Therefore, we need to calculate fx(1,2) and fy(1,2).

fx(x,y)=6x,fy(x,y)=y

Thus, the slope of the surface at (1, 2, 4) in the x-direction and the y-direction are:
fx(1,2)=6slope in the x-direction
fy(1,2)=2slope in the y-direction