2.3 Differentiation

In Section 2.1 we considered a few methods for graphing functions. By these methods alone it may be impossible to compute enough information to grasp even the general features of a complicated function. From elementary calculus, we know that the idea of the derivative can greatly aid us in this task; for example, it enables us to locate maxima and minima and to compute rates of change. The derivative also has many applications beyond this, as you have surely has discovered in elementary calculus.

Intuitively, we know from our work in Section 2.2 that a continuous function is one that has no “breaks” in its graph. A differentiable function from \({\mathbb R}^2\) to \({\mathbb R}\) ought to be such that not only are there no breaks in its graph, but there is a well-defined plane tangent to the graph at each point. Thus, there must not be any sharp folds, corners, or peaks in the graph (see Figure 2.34). In other words, the graph must be smooth.

Figure 2.34: (a) A smooth graph and (b) a nonsmooth one.

Partial Derivatives

To make these ideas precise, we need a sound definition of what we mean by the phrase \({\rm “}f(x_1,\ldots, x_n)\) is differentiable at \({\bf x} = (x_1,\ldots ,x_n)\).” Actually, this definition is not quite as simple as one might think. Toward this end, however, let us introduce the notion of the partial derivative. This notion relies only on our knowledge of one-variable calculus. (A quick review of the definition of the derivative in a one-variable calculus text might be advisable at this point.)

106

Definition: Partial Derivatives

Let \(U\subset {\mathbb R}^n\) be an open set and suppose \(f\colon\, U\subset {\mathbb R}^n\rightarrow {\mathbb R}\) is a real-valued function. Then \(\partial f/\partial x_1,\ldots, \partial f/\partial x_n\), the partial derivatives of \(f\) with respect to the first, second, \(\ldots\) , \(n\)th variable, are the real-valued functions of \(n\) variables, which, at the point \((x_1,\ldots ,x_n)={\bf x}\), are defined by \begin{eqnarray*} \frac{\partial f}{\partial x_j} (x_1,\ldots ,x_n) &=& \lim_{h\rightarrow 0} \frac{f(x_1,x_2,\ldots,x_j+h,\ldots ,x_n)-f(x_1,\ldots ,x_n)}{h}\\ &=& \lim_{h\rightarrow 0}\frac{f({\bf x} + h {\bf e}_j)-f({\bf x})}{h} \end{eqnarray*} if the limits exist, where \(1\leq j\leq n\) and \({\bf e}_j\) is the \(j\)th standard basis vector defined by \({\bf e}_j=(0,\ldots, 1,\ldots, 0)\), with 1 in the \(j\)th slot (see Section 1.5). The domain of the function \(\partial f/\partial x_j\) is the set of \({\bf x}\in {\mathbb R}^n\) for which the limit exists.

In other words, \(\partial f/\partial x_j\) is just the derivative of \(f\) with respect to the variable \(x_j\), with the other variables held fixed. If \(f\colon\, {\mathbb R}^3\rightarrow {\mathbb R}\), we shall often use the notation \(\partial f/\partial x, \partial f/\partial y, \partial f/\partial z\) in place of \(\partial f/\partial x_1, \partial f/\partial x_2, \partial f/\partial x_3\). If \(f\colon\, U\subset {\mathbb R}^n\rightarrow {\mathbb R}^m\), then we can write \[ f(x_1,\ldots,x_n)=(f_1(x_1,\ldots,x_n),\ldots,f_m(x_1,\ldots,x_n)), \] so that we can speak of the partial derivatives of each component; for example, \(\partial f_m/\partial x_n\) is the partial derivative of the \(m\)th component with respect to \(x_n\), the \(n\)th variable.

example 1

If \(f(x,y)=x^2y+y^3,\) find \(\partial f/\partial x\) and \(\partial f/\partial y\).

solution To find \(\partial f/\partial x\) we hold \(y\) constant (think of it as some number, say 1) and differentiate only with respect to \(x\); this yields \[ \frac{\partial f}{\partial x}=\frac{\partial(x^2y+y^3)}{\partial{x}}=2xy. \]

Similarly, to find \(\partial f/\partial y\) we hold \(x\) constant and differentiate only with respect to \(y\): \[ \frac{\partial f}{\partial y}=\frac{\partial(x^2y+y^3)}{\partial y}=x^2+3y^2. \]

To indicate that a partial derivative is to be evaluated at a particular point, for example, at \((x_0,y_0)\), we write \[ \frac{\partial f}{\partial x}(x_0,y_0)\qquad\hbox{or} \qquad \frac{\partial f}{\partial x}\bigg|_{x=x_0,y=y_0} \qquad \hbox{or}\qquad \frac{\partial f}{\partial x}\bigg|_{(x_0,y_0)}. \]

When we write \(z=f(x,y)\) for the dependent variable, we sometimes write \(\partial z/\partial x\) for \(\partial f/\partial x\). Strictly speaking, this is an abuse of notation, but it is common practice to use these two notations interchangeably.

107

example 2

If \(z=\cos xy +x\cos y=f(x,y),\) find the two partial derivatives \((\partial z/\partial x)\) \((x_0,y_0)\) and \((\partial z/\partial y)(x_0,y_0)\).

solution First we fix \(y_0\) and differentiate with respect to \(x\), giving \begin{eqnarray*} \frac{\partial z}{\partial x} (x_0,y_0) &=& \frac{\partial(\cos xy_0+x\cos y_0)}{\partial x} \bigg|_{x=x_0}\\[2pt] &=&(-y_0\sin xy_0+\cos y_0)|_{x=x_0}\\[1pt] &=& - y_0\sin x_0y_0+\cos y_0. \end{eqnarray*}

Similarly, we fix \(x_0\) and differentiate with respect to \(y\) to obtain \begin{eqnarray*} \frac{\partial z}{\partial y} (x_0,y_0) &=& \frac{\partial(\cos x_0y+x_0\cos y)}{\partial y} \bigg|_{y=y_0}\\[2pt] &=&(-x_0\sin x_0y-x_0\sin y)|_{y=y_0}\\[1pt] &=&-x_0\sin x_0y_0-x_0\sin y_0. \\[-36pt] \end{eqnarray*}

example 3

Find \(\partial f/\partial x\) if \(f(x,y)=xy/\sqrt{x^2+y^2}\).

solution By the quotient rule, \[ \frac{\partial f}{\partial x} = \frac{y\sqrt{x^2+y^2}-xy(x/\sqrt{x^2+y^2})}{x^2+y^2}=\frac{y(x^2+y^2)-x^2y}{(x^2+y^2)^{3/2}} =\frac{y^3}{(x^2+y^2)^{3/2}}. \]

A definition of differentiability that requires only the existence of partial derivatives turns out to be insufficient. Many standard results, such as the chain rule for functions of several variables, would not follow, as Example 4 shows. Below, we shall see how to rectify this situation.

example 4

Let \(f(x,y)=x^{1/3}y^{1/3}\). By definition, \[ \frac{\partial f}{\partial x}(0,0)=\mathop {{\rm limit}\ }_{h\rightarrow 0} \frac{f(h,0)-f(0,0)}{h}=\mathop {{\rm limit}\ }_{h\rightarrow 0} \frac{0-0}{h}=0, \] and, similarly, \((\partial f/\partial y)(0,0)=0\) (these are not indeterminate forms!). It is necessary to use the original definition of partial derivatives, because the functions \(x^{1/3}\) and \(y^{1/3}\) are not themselves differentiable at 0. Suppose we restrict \(f\) to the line \(y\,{=}\,x\) to get \(f(x,x)=x^{2/3}\) (see Figure 2.35). We can view the substitution \(y=x\) as the composition \(f\circ g\) of the function \(g\colon\, {\mathbb R} \rightarrow {\mathbb R}^2\), defined by \(g(x)=(x,x)\), and \(f\colon\, {\mathbb R}^2\rightarrow {\mathbb R},\) defined by \(f(x,y)=x^{1/3}y^{1/3}\).

Thus, the composite \(f\circ g\) is given by \((f\circ g)(x)=x^{2/3}\). Each component of \(g\) is differentiable in \(x\), and \(f\) has partial derivatives at \((0,0),\) but \(f\circ g\) is not differentiable at \(x=0\), in the sense of one-variable calculus. In other words, the composition of \(f\) with \(g\) is not differentiable in contrast to the calculus of functions of one variable, where the composition of differentiable functions is differentiable. Later, we shall give a definition of differentiability that has the pleasant consequence that the composition of differentiable functions is differentiable.

There is another reason for being dissatisfied with the mere existence of partial derivatives of \(f(x,y)=x^{1/3}y^{1/3}\): There is no plane tangent, in any reasonable sense, to the graph at \((0, 0)\). The \(xy\) plane is tangent to the graph along the \(x\) and \(y\) axes because \(f\) has slope zero at \((0, 0)\) along these axes; that is, \(\partial f/\partial x=0\) and \(\partial f/\partial y=0\) at \((0, 0)\).

108

Figure 2.35: The portion of the graph of \(x^{1/3}y^{1/3}\) in the first quadrant.

Thus, if there is a tangent plane, it must be the \(xy\) plane. However, as is evident from Figure 2.35, the \(xy\) plane is not tangent to the graph in other directions, because the graph has a severe crinkle, and so the \(xy\) plane cannot be said to be tangent to the graph of \(f\).

The Linear or Affine Approximation

To “motivate” our definition of differentiability, let us compute what the equation of the plane tangent to the graph of \(f\colon \,{\mathbb R}^2\rightarrow {\mathbb R}, (x,y)\mapsto f(x,y)\) at \((x_0,y_0)\) ought to be if \(f\) is smooth enough. In \({\mathbb R}^3\), a nonvertical plane has an equation of the form \[ z=ax+by+c. \]

If it is to be the plane tangent to the graph of \(f\), the slopes along the \(x\) and \(y\) axes must be equal to \(\partial f/\partial x\) and \(\partial f/\partial y\), the rates of change of \(f\) with respect to \(x\) and \(y\). Thus, \(a=\partial f/\partial x, b=\partial f/\partial y\) [evaluated at \((x_0,y_0)\)]. Finally, we may determine the constant \(c\) from the fact that \(z=f(x_0,y_0)\) when \(x=x_0,y=y_0\). Thus, we get the linear approximation (or, more accurately said, affine approximation): \begin{equation} z=f(x_0,y_0)+\bigg[\frac{\partial f}{\partial x}(x_0,y_0)\bigg](x-x_0)+ \bigg[\frac{\partial f}{\partial y}(x_0,y_0)\bigg](y-y_0), \end{equation} which should be the equation of the plane tangent to the graph of \(f\) at \((x_0,y_0)\), if \(f\) is “smooth enough” (see Figure 2.36).

Figure 2.36: For points \(\hbox{(}x, y\hbox{)}\) near \(\hbox{(}x_0, y_0\hbox{)}\), the graph of the tangent plane is close to the graph of \(f\).

Our definition of differentiability will mean in effect that the plane defined by the linear approximation (1) is a “good” approximation of \(f\) near \((x_0,y_0)\). To get an idea of what we might mean by a good approximation, let us return for a moment to one-variable calculus. If \(f\) is differentiable at a point \(x_0\), then we know that \[ \mathop {{\rm limit}\ }_{\Delta x \rightarrow 0} \frac{f(x_0+\Delta x)-f(x_0)}{\Delta x}=f'(x_0). \]

Let \(x=x_0+\Delta x\) and rewrite this as \[ \mathop {{\rm limit}\ }_{x \rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0}=f'(x_0). \]

Using the trivial limit \({\rm limit}_{x\rightarrow x_0}f'(x_0)=f'(x_0)\), we can rewrite the preceding equation as \[ \mathop {{\rm limit}\ }_{x \rightarrow x_0} \frac{f(x)-f(x_0)}{x-x_0}= \mathop {{\rm limit}\ }_{x\rightarrow x_0}f'(x_0); \] that is, \[ \mathop {{\rm limit}\ }_{x \rightarrow x_0} \bigg[\frac{f(x)-f(x_0)}{x-x_0}-f'(x_0)\bigg]=0; \] that is, \[ \mathop {{\rm limit}\ }_{x \rightarrow x_0} \frac{f(x)-f(x_0)-f'(x_0)(x-x_0)}{x-x_0}=0. \]

109

Thus, the tangent line \(l\) through \((x_0,f(x_0))\) with slope \(f'(x_0)\) is close to \(f\) in the sense that the difference between \(f(x)\) and \(l(x)=f(x_0)+f'(x_0)(x-x_0)\), the equation of the tangent line goes to zero even when divided by \(x -{x_0}\) as \(x\) goes to \(x_0\). This is the notion of a “good approximation” that we will adapt to functions of several variables, with the tangent line replaced by the tangent plane [see equation (1), given earlier].

Differentiability for Functions of Two Variables

Using the linear approximation, we are ready to define the notion of differentiability.

Definition: Differentiable: Two Variables

Let \(f\colon\, {\mathbb R}^2\rightarrow\) \({\mathbb R}\). We say \(f\) is differentiable at \((x_0,y_0)\), if \(\partial f/\partial x\) and \(\partial f/\partial y\) exist at \((x_0,y_0)\) and if \begin{equation} \frac{f(x,y)-f(x_0,y_0)- \displaystyle\bigg[\frac{\partial f}{\partial x}(x_0,y_0)\bigg](x-x_0)- \displaystyle\bigg[\frac{\partial f}{\partial y}(x_0,y_0)\bigg](y-y_0)} { \| (x,y)-(x_0,y_0) \| }\,\rightarrow 0 \end{equation} as \((x,y)\rightarrow (x_0,y_0)\). This equation expresses what we mean by saying that \[ f(x_0,y_0)+\bigg[\frac{\partial f}{\partial x}(x_0,y_0)\bigg](x-x_0)+ \bigg[\frac{\partial f}{\partial y}(x_0,y_0)\bigg](y-y_0) \] is a good approximation to the function \(f\).

It is not always easy to use this definition to see whether \(f\) is differentiable, but it will be easy to use another criterion, given shortly in Theorem 9.

Tangent Plane

110

We have used the informal notion of the plane tangent to the graph of a function to motivate our definition of differentiability. Now we are ready to adopt a formal definition of the tangent plane.

Definition: Tangent Plane

Let \(f\colon\, {\mathbb R}^{\smash{2}}\rightarrow\, {\mathbb R}\) be differentiable at \({\bf x}_0=(x_0,y_0)\). The plane in \({\mathbb R}^3\) defined by the equation \[ z=f(x_0,y_0)+\bigg[\frac{\partial f}{\partial x}(x_0,y_0)\bigg](x-x_0)+ \bigg[\frac{\partial f}{\partial y}(x_0,y_0)\bigg](y-y_0) \] is called the tangent plane of the graph of \(f\) at the point \((x_0,y_0, f(x_0,y_0))\).

example 5

Compute the plane tangent to the graph of \(z=x^2+y^4+e^{xy}\) at the point \((1, 0, 2).\)

solution Use formula (1), with \(x_0=1,y_0=0\), and \(z_0=f(x_0,y_0)\,{=}\,2\). The partial derivatives are \[ \frac{\partial z}{\partial x}=2x+ye^{xy} \qquad \hbox{and} \qquad \frac{\partial z}{\partial y}=4y^3+xe^{xy}. \]

At (1, 0, 2), these partial derivatives are 2 and 1, respectively. Thus, by formula (1), the tangent plane is \[ z=2(x-1) +1(y-0)+2,\hbox{that is,}\qquad z=2x+y. \]

Let us write \({\bf D}\! f(x_0,y_0)\) for the row matrix \[ \bigg[\frac{\partial f}{\partial x}(x_0,y_0)\quad \frac{\partial f}{\partial y} (x_0,y_0) \bigg], \] so that the definition of differentiability asserts that \begin{equation} \begin{array}{l} f(x_0,y_0)+{\bf D}\! f(x_0,y_0) \Big[ \begin{array}{c} x-x_0\\ y-y_0 \end{array} \Big]\\ \quad =f(x_0,y_0)+\bigg[ \frac{\partial f}{\partial x}(x_0,y_0) \bigg](x-x_0) + \bigg[\frac{\partial f}{\partial y} (x_0,y_0) \bigg](y-y_0) \end{array} \end{equation} is our good approximation to \(f\) near \((x_0,y_0)\). As earlier, “good” is taken in the sense that expression (3) differs from \(f(x,y)\) by something small times \(\sqrt{(x-x_0)^2 + (y-y_0)^2}\). We say that expression (3) is the best linear approximation to \(f\) near \((x_0,y_0)\).

Differentiability: The General Case

Now we are ready to give a definition of differentiability for maps \(f\) of \({\mathbb R}^n\) to \({\mathbb R}^m\), using the preceding discussion as motivation. The derivative \({\bf D}\! f({\bf x}_0)\) of \(f=(f_1,\ldots ,f_m)\) at a point \({\bf x}_0\) is a matrix \({\bf T}\) whose elements are \(t_{ij}=\partial f_i/\partial x_j\) evaluated at \({\bf x}_0\).footnote #

111

Definition: Differentiable, \(n\) Variables, \(m\) Functions

Let \(U\) be an open set in \({\mathbb R}^n\) and let \(f\colon\, U\subset {\mathbb R}^n\rightarrow {\mathbb R}^m\) be a given function. We say that \(f\) is differentiable at \({\bf x}_0\in U\) if the partial derivatives of \(f\) exist at \({\bf x}_0\) and if \begin{equation} \mathop {{\rm limit}\ }_{{\bf x}\rightarrow {\bf x}_0} \frac{ \| f({\bf x})-f({\bf x}_0)-{\bf T}({\bf x}- {\bf x}_0) \| }{ \| {\bf x}-{\bf x}_0 \| }= 0, \end{equation} where \({\bf T}={\bf D}\! f({\bf x}_0)\) is the \(m\times n\) matrix with matrix elements \(\partial f_i/\partial x_j\) evaluated at \({\bf x}_0\) and \({\bf T}({\bf x}-{\bf x}_0)\) means the product of T with \({\bf x}- {\bf x}_0\) (regarded as a column matrix). We call T the derivative of \(f\) at \({\bf x}_0\).

We shall always denote the derivative \({\bf T}\) of \(f\) at \({\bf x}_0\) by \({\bf D}f({\bf x}_0)\), although in some books it is denoted \(df({\bf x}_0)\) and referred to as the differential of \(f\). In the case where \(m=1\), the matrix \({\bf T}\) is just the row matrix \[ \bigg[ \frac{\partial f}{\partial x_1}({\bf x}_0)\quad\cdots \quad \frac{\partial f}{\partial x_n}({\bf x}_0) \bigg] . \] (Sometimes, when there is danger of confusion, we separate the entries by commas.) Furthermore, setting \(n=2\) and putting the result back into equation (4), we see that conditions (2) and (4) do agree. Thus, if we let \({\bf h}={\bf x}-{\bf x}_0\), a real-valued function \(f\) of \(n\) variables is differentiable at a point \({\bf x}_0\) if \[ \mathop {{\rm limit}\ }_{{\bf h}\rightarrow 0}\frac{1}{ \| {\bf h} \| } \bigg|f({\bf x}_0+{\bf h})-f({\bf x}_0) -\sum^n_{j=1} \frac{\partial f}{\partial x_j}({\bf x}_0)h_j\bigg|=0, \] because \[ {\bf Th}=\sum^n_{j=1}h_j \frac{\partial f}{\partial x_j}({\bf x}_0). \]

For the general case of \(f\) mapping a subset of \({\mathbb R}^n\) to \({\mathbb R}^m\), the derivative is the \(m\times n\) matrix given by \[ {\bf D}\! f({\bf x}_0)=\left[ \begin{array}{c@{\quad}c@{\quad}c} \displaystyle \frac{\partial f_1}{\partial x_1} & \cdots & \displaystyle \frac{\partial f_1}{\partial x_n}\\ \vdots & &\vdots \\[3pt] \displaystyle \frac{\partial f_m}{\partial x_1} & \cdots & \displaystyle \frac{\partial f_m}{\partial x_n} \end{array}\right], \] where \(\partial f_i/\partial x_j\) is evaluated at \({\bf x}_0\). The matrix \({\bf D}\!f({\bf x}_0)\) is, appropriately, called the matrix of partial derivatives of \(f\) at \({\bf x}_0\).

example 6

Calculate the matrices of partial derivatives for these functions.

  • (a) \(f(x,y)=(e^{x+y}+y,y^2x)\)
  • (b) \(f(x,y)=(x^2+\cos y, ye^x)\)
  • (c) \(f(x,y,z)=\) \((ze^x,-ye^z)\)

112

solution

  • (a) Here \(f\colon\, {\mathbb R}^2 \rightarrow {\mathbb R}^2\) is defined by \(f_1(x,y)=e^{x+y}+y\) and \(f_2(x,y)=y^2x\). Hence, \({\bf D}\! f(x,y)\) is the \(2\times 2\) matrix \[ {\bf D}\! f(x,y)=\bigg[ \begin{array}{c@{\quad}c} e^{x+y}&e^{x+y} + 1\\ y^2&2xy \end{array} \bigg]. \]
  • (b) We have \[ {\bf D}\! f(x,y)=\bigg[ \begin{array}{c@{\quad}c} 2x & {-}{\sin y}\\ ye^x& e^x \end{array} \bigg]. \]
  • (c) In this case, \[ {\bf D}\! f(x,y,z)=\bigg[ \begin{array}{c@{\quad}c@{\quad}c} ze^x & 0 &e^x\\ 0 &-e^z &-ye^z \end{array} \bigg]. \]

Gradients

For real-valued functions we use special terminology for the derivative.

Definition: Gradient

Consider the special case \(f\colon\, U\subset {\mathbb R}^n\rightarrow {\mathbb R}\). Here \({\bf D}\! f({\bf x})\) is a \(1\times n\) matrix: \[ {\bf D}\! f({\bf x})=\bigg[ \frac{\partial f}{\partial x_1}\quad \cdots\quad \frac{\partial f}{\partial x_n} \bigg]. \]

We can form the corresponding vector \((\partial f/\partial x_1,\ldots ,\partial f/\partial x_n),\) called the gradient of \(f\) and denoted by \({\nabla }\! f\), or grad \(f\).

From the definition, we see that for \(f\colon\, {\mathbb R}^3\rightarrow {\mathbb R}\), \[ {\nabla}\! f=\frac{\partial f}{\partial x}{\bf i}+\frac{\partial f}{\partial y}{\bf j}+ \frac{\partial f}{\partial z}{\bf k}, \] while for \(f\colon\, {\mathbb R}^2\rightarrow {\mathbb R}\), \[ {\nabla}\! f=\frac{\partial f}{\partial x}{\bf i}+\frac{\partial f}{\partial y}{\bf j}. \]

The geometric significance of the gradient will be discussed in Section 2.6. In terms of inner products, we can write the derivative of \(f\) as \[ {\bf D}\! f({\bf x})({\bf h})={\nabla}\! f({\bf x})\,{ \cdot}\, {\bf h}. \]

example 7

Let \(f\colon\, {\mathbb R}^3\rightarrow {\mathbb R},f(x,y,z)=xe^y\). Then \[ {\nabla}\! f=\bigg(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \bigg)=(e^y,xe^y,0). \]

113

example 8

If \(f\colon \,{\mathbb R}^2\rightarrow {\mathbb R}\) is given by \((x,y)\mapsto e^{xy}+\sin xy,\) then \begin{eqnarray*} {\nabla}\! f(x,y) &=& (ye^{xy}+y\cos xy){\bf i}+(xe^{xy}+x\cos xy){\bf j}\\ &=&(e^{xy}+\cos xy)(y{\bf i}+x{\bf j}).\\[-36pt] \end{eqnarray*}

In one-variable calculus it is shown that if \(f\) is differentiable, then \(f\) is continuous. We will state in Theorem 8 that this is also true for differentiable functions of several variables. As we know, there are plenty of functions of one variable that are continuous but not differentiable, such as \(f(x)=|x|\). Before stating the result, let us give an example of a function of two variables whose partial derivatives exist at a point, but which is not continuous at that point.

example 9

Let \(f\colon\, {\mathbb R}^2\rightarrow {\mathbb R}\) be defined by \[ f(x,y)=\bigg\{ \begin{array}{c@{\qquad}l} 1&\hbox{if } x= 0 \hbox{ or if } y = 0\\[1pt] 0&\hbox{otherwise}. \end{array} \]

Because \(f\) is constant on the \(x\) and \(y\) axes, where it equals 1, \[ \frac{\partial f}{\partial x}(0,0)=0\qquad \hbox{and} \qquad \frac{\partial f}{\partial y}(0,0)=0. \]

But \(f\) is not continuous at \((0, 0),\) because \({\rm limit}_{(x,y) \,\to\, (0,0)} f(x,y)\) does not exist.

Some Basic Theorems

The first of these basic theorems relates differentiability and continuity.

Theorem 8

Let \(f\colon\, U\subset {\mathbb R}^n\rightarrow {\mathbb R}^m\) be differentiable at \({\bf x}_0\in U\). Then \(f\) is continuous at \({\bf x}_0\).

This result is very reasonable, because “differentiability" means that there is enough smoothness to have a tangent plane, which is stronger than just being continuous. Consult the Internet supplement for Chapter 2 for the formal proof.

As we have seen, it is usually easy to tell when the partial derivatives of a function exist using what we know from one-variable calculus. However, the definition of differentiability looks somewhat complicated, and the required approximation condition in equation (4) may seem, and sometimes is, difficult to verify. Fortunately, there is a simple criterion, given in the following theorem, that tells us when a function is differentiable.

Theorem 9

Let \(f\colon\, U\subset {\mathbb R}^n\rightarrow {\mathbb R}^m\). Suppose the partial derivatives \(\partial f_i/\partial x_j\) of \(f\) all exist and are continuous in a neighborhood of a point \({\bf x} \in U\). Then \(f\) is differentiable at \({\bf x}\).

114

We give the proof in the Internet supplement for Chapter 2. Notice the following hierarchy:

Each converse statement, obtained by reversing an implication, is invalid. [For a counterexample to the converse of the first implication, use \(f(x)=x^2\sin\, (1/x),\) \(f(0)=0\); for the second, see Example 1 in the Internet supplement for Chapter 2 or use Example 4 in this section.]

A function whose partial derivatives exist and are continuous is said to be of class \(C^1\). Thus, Theorem 9 says that any \(C^1\) function is differentiable.

example 10

Let \[ f(x,y)=\frac{\cos x+e^{xy}}{x^2+y^2}. \]

Show that \(f\) is differentiable at all points \((x,y)\not=(0,0)\).

solution Observe that the partial derivatives \begin{eqnarray*} \frac{\partial f}{\partial x}&=& \frac{(x^2+y^2)(ye^{xy}-\sin x)-2x(\cos x+e^{xy})} {(x^2+y^2)^2}\\[3pt] \frac{\partial f}{\partial y}&=& \frac{(x^2+y^2)xe^{xy}-2y(\cos x+e^{xy})} {(x^2+y^2)^2} \end{eqnarray*} are continuous except when \(x=0\) and \(y=0\) (by the results in Section 2.2). Thus, \(f\) is differentiable by Theorem 9.

In the Internet supplement we show that \(f(x,y)=xy/\sqrt{x^2+y^2}\) [with \(f(0,0)\,{=}\,0\)] is continuous, has partial derivatives at (0, 0), yet is not differentiable there. See Figure 2.37. By Theorem 9, its partial derivatives cannot be continuous at (0, 0).

Figure 2.37: This function is not differentiable at (0, 0), because it is “crinkled.”