Tangent Planes and Linear Approximations: Learn It 3

Differentiability

For a function [latex]y=f(x)[/latex] of one variable, we say the function is differentiable at [latex]x=a[/latex] if [latex]f'(a)[/latex] exists. When a function is differentiable at a point, the graph is “smooth” there—no corners—and a tangent line is well-defined.

For functions of two variables, differentiability is also connected to smoothness. In this case, a surface is considered to be smooth at point [latex]P[/latex] 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 that the tangent plane at [latex](x_0, y_0)[/latex] is:

[latex]z=f(x_0, y_0)+f_x(x_0, y_0)(x-x_0)+f_y(x_0, y_0)(y-y_0)[/latex]

For this tangent plane to exist, the partial derivatives must exist at [latex](x_0, y_0)[/latex]. However, this isn’t enough to guarantee smoothness, as was illustrated in Figure 3. The partial derivatives existed at the origin, but the function had a corner there.

differentiable function at a point

A function [latex]f(x, y)[/latex] is differentiable at a point [latex]P\ (x_0, y_0)[/latex] if, for all points [latex](x, y)[/latex] in a [latex]\delta[/latex] disk around [latex]P[/latex], we can write:

[latex]f(x, y, z)=f(x_0, y_0)+f_x(x_0, y_0)(x-x_0)+f_y(x_0, y_0)(y-y_0)+E(x, y)[/latex],

 

where the error term [latex]E[/latex] satisfies:

[latex]\displaystyle\lim_{(x, y)\to(x_0, y_0)}\dfrac{E(x, y)}{\sqrt{(x-x_0)^{2}+(y-y_0)^{2}}}=0.[/latex]

The error term [latex]E(x, y)[/latex] represents how closely the tangent plane approximates the surface in a small neighborhood around point [latex]P[/latex]. For [latex]f[/latex] to be differentiable at [latex]P[/latex], the function must be smooth—the graph of [latex]f[/latex] must stay close to the tangent plane for points near [latex]P[/latex].

The function [latex]f(x, y)=\begin{cases}\dfrac{xy}{\sqrt{x^{2}+y^{2}}} & (x, y) \neq (0, 0) \\ 0 & (x, y)=(0, 0)\end{cases}[/latex] 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 [latex]f_x(0, 0)=f_y(0, 0)=0[/latex]. Substituting this information into our definition equation using [latex]x_0=0[/latex] and [latex]y_0=0[/latex], we get:

[latex]\begin{array}{ccc}\hfill {f(x, y)} & =\hfill & {f(0, 0)+f_x(0, 0)(x-0)+f_y(0, 0)(y-0)+E(x, y)}\hfill \\ \hfill {E(x, y)} & =\hfill & {\frac{xy}{\sqrt{x^{2}+y^{2}}}} \hfill \end{array}[/latex]

Calculating [latex]\displaystyle\lim_{(x, y)\to (x_0, y_0)}\frac{E(x, y)}{\sqrt{(x-x_0)^{2}+(y-y_0)^{2}}}[/latex] gives:

[latex]\begin{array}{ccc}\hfill {\displaystyle\lim_{(x, y)\to (x_0, y_0)}\frac{E(x, y)}{\sqrt{(x-x_0)^{2}+(y-y_0)^{2}}}} & =\hfill & {\displaystyle\lim_{(x, y)\to (0, 0)}\frac{\frac{xy}{\sqrt{x^{2}+y^{2}}}}{\sqrt{x^{2}+y^{2}}}}\hfill \\ \hfill & =\hfill & {\displaystyle\lim_{(x, y)\to (0, 0)}\frac{xy}{x^{2}+y^{2}}} \hfill \end{array}[/latex]

Depending on the path taken toward the origin, this limit takes different values. Therefore, the limit does not exist and the function [latex]f[/latex] is not differentiable at the origin as shown in the following figure.

A curved surface in xyz space that remains constant along the positive x axis and curves downward along the line y = –x in the second quadrant.
Figure 1. This function [latex]f(x,y)[/latex] is not differentiable at the origin.
Show that the function [latex]f(x, y)=2x^{2}-4y[/latex] is differentiable at point [latex](2,-3)[/latex].

The Connection Between Differentiability and Continuity

Differentiability and continuity for functions of two or more variables are connected, just as they are for functions of one variable.

differentiability implies continuity

Let [latex]z=f(x, y)[/latex] be a function of two variables with [latex](x_0, y_0)[/latex] in the domain of [latex]f[/latex]. If [latex]f(x, y)[/latex] is differentiable at [latex](x_0, y_0)[/latex], then [latex]f(x, y)[/latex] is continuous at [latex](x_0, y_0)[/latex].

This theorem shows that if a function is differentiable at a point, then it must be continuous there. However, the reverse isn’t true—a function can be continuous at a point without being differentiable there. For example,

[latex]\large{f(x, y)=\begin{cases}\frac{xy}{\sqrt{x^{2}+y^{2}}} & (x, y)\neq (0, 0) \\ 0 & (x, y)=(0, 0)\end{cases}}[/latex]

is continuous at the origin, but not differentiable there. This is similar to what happens in single-variable calculus.

The next theorem gives us a practical way to check for differentiability. It says that if the function and its partial derivatives are all continuous at a point, then the function is differentiable there.

continuity of first partials implies differentiability

Let [latex]z=f(x, y)[/latex] be a function of two variables with [latex](x_0, y_0)[/latex] in the domain of [latex]f[/latex]. If [latex]f(x, y)[/latex], [latex]f_x(x, y)[/latex], and [latex]f_y(x, y)[/latex] all exist in a neighborhood of [latex](x_0, y_0)[/latex] and are continuous at [latex](x_0, y_0)[/latex], then [latex]f(x, y)[/latex] is differentiable there.

Let’s revisit the function we showed wasn’t differentiable at the origin:

[latex]f(x, y)=\begin{cases}\frac{xy}{\sqrt{x^{2}+y^{2}}} & (x, y)\neq (0, 0) \\ 0 & (x, y)=(0, 0)\end{cases}[/latex]

The partial derivatives are:

[latex]\dfrac{\partial f}{\partial x}=\dfrac{y^{3}}{(x^{2}+y^{2})^{3/2}}[/latex] and [latex]\dfrac{\partial f}{\partial y}=\dfrac{x^{3}}{(x^{2}+y^{2})^{3/2}}[/latex]

The contrapositive of the previous theorem states that if a function is not differentiable, then at least one of the hypotheses must fail. Let’s check whether [latex]f_x[/latex] is continuous at [latex](0,0)[/latex]. For continuity, we need [latex]\displaystyle\lim_{(x,y)\to(0,0)}{f_x(x,y) = f_x(0,0)}[/latex]:

[latex]\displaystyle\lim_{(x,y)\to(0,0)}{f_x(x,y)}=\displaystyle\lim_{(x,y)\to(0,0)}{\dfrac{y^3}{(x^2+y^2)^{3/2}}}.[/latex]

Let [latex]x= ky[/latex]. Then:

[latex]\begin{array}{ccc}\hfill\displaystyle\lim_{(x,y)\to(0,0)}{\frac{y^3}{(x^2+y^2)^{3/2}}}&=\displaystyle\lim_{y\to0}{\frac{y^3}{((ky)^2+y^2)^{3/2}}}\\&=\displaystyle\lim_{y\to0}{\frac{y^3}{(k^2y^2+y^2)^{3/2}}}&\quad\\&=\displaystyle\lim_{y\to0}{\frac{y^3}{|y^3|(k^2+1)^{3/2}}}\\&=\frac1{(k^2+1)^{3/2}}\displaystyle\lim_{y\to0}{\frac{|y|}{y}}\\\end{array}[/latex]

If [latex]y>0[/latex], this expression equals [latex]1/(k^2+1)^{3/2}[/latex]; if [latex]y<0[/latex], it equals [latex]-\left(1/(k^2+1)^{3/2}\right)[/latex]. In either case, the value depends on [latex]k[/latex], so the limit fails to exist. This confirms that [latex]f_x[/latex] is not continuous at the origin, which is why the function isn’t differentiable there.