### Learning Objectives

- 4.4.1 Determine the equation of a plane tangent to a given surface at a point.
- 4.4.2 Use the tangent plane to approximate a function of two variables at a point.
- 4.4.3 Explain when a function of two variables is differentiable.
- 4.4.4 Use the total differential to approximate the change in a function of two variables.

In this section, we consider the problem of finding the tangent plane to a surface, which is analogous to finding the equation of a tangent line to a curve when the curve is defined by the graph of a function of one variable, $y=f\left(x\right).$ The slope of the tangent line at the point $x=a$ is given by $m=f\prime \left(a\right);$ what is the slope of a tangent plane? We learned about the equation of a plane in Equations of Lines and Planes in Space; in this section, we see how it can be applied to the problem at hand.

### Tangent Planes

Intuitively, it seems clear that, in a plane, only one line can be tangent to a curve at a point. However, in three-dimensional space, many lines can be tangent to a given point. If these lines lie in the same plane, they determine the tangent plane at that point. A tangent plane at a regular point contains all of the lines tangent to that point. A more intuitive way to think of a tangent plane is to assume the surface is smooth at that point (no corners). Then, a tangent line to the surface at that point in any direction does not have any abrupt changes in slope because the direction changes smoothly.

### Definition

Let ${P}_{0}=\left({x}_{0},{y}_{0},{z}_{0}\right)$ be a point on a surface $S,$ and let $C$ be any curve passing through ${P}_{0}$ and lying entirely in $S.$ If the tangent lines to all such curves $C$ at ${P}_{0}$ lie in the same plane, then this plane is called the tangent plane to $S$ at ${P}_{0}$ (Figure 4.27).

For a tangent plane to a surface to exist at a point on that surface, it is sufficient for the function that defines the surface to be differentiable at that point, defined later in this section. We define the term tangent plane here and then explore the idea intuitively.

### Definition

Let $S$ be a surface defined by a differentiable function $z=f\left(x,y\right),$ and let ${P}_{0}=\left({x}_{0},{y}_{0}\right)$ be a point in the domain of $f.$ Then, the equation of the tangent plane to $S$ at ${P}_{0}$ is given by

To see why this formula is correct, let’s first find two tangent lines to the surface $S.$ The equation of the tangent line to the curve that is represented by the intersection of $S$ with the vertical trace given by $x={x}_{0}$ is $z=f\left({x}_{0},{y}_{0}\right)+{f}_{y}\left({x}_{0},{y}_{0}\right)\left(y-{y}_{0}\right).$ Similarly, the equation of the tangent line to the curve that is represented by the intersection of $S$ with the vertical trace given by $y={y}_{0}$ is $z=f\left({x}_{0},{y}_{0}\right)+{f}_{x}\left({x}_{0},{y}_{0}\right)\left(x-{x}_{0}\right).$ A parallel vector to the first tangent line is $a=j+{f}_{y}\left({x}_{0},{y}_{0}\right)\mathrm{k;}$ a parallel vector to the second tangent line is $b=i+{f}_{x}\left({x}_{0},{y}_{0}\right)k.$ We can take the cross product of these two vectors:

This vector is perpendicular to both lines and is therefore perpendicular to the tangent plane. We can use this vector as a normal vector to the tangent plane, along with the point ${P}_{0}=\left({x}_{0},{y}_{0},f\left({x}_{0},{y}_{0}\right)\right)$ in the equation for a plane:

Solving this equation for $z$ gives Equation 4.24.

### Example 4.21

#### Finding a Tangent Plane

Find the equation of the tangent plane to the surface defined by the function $f\left(x,y\right)=2{x}^{2}-3xy+8{y}^{2}+2x-4y+4$ at point $\left(2,\mathrm{-1}\right).$

Find the equation of the tangent plane to the surface defined by the function $f\left(x,y\right)={x}^{3}-{x}^{2}y+{y}^{2}-2x+3y-2$ at point $\left(\mathrm{-1},3\right).$

### Example 4.22

#### Finding Another Tangent Plane

Find the equation of the tangent plane to the surface defined by the function $f\left(x,y\right)=\text{sin}\left(2x\right)\text{cos}\left(3y\right)$ at the point $\left(\pi \text{/}3,\pi \text{/}4\right).$

A tangent plane to a surface does not always exist at every point on the surface. Consider the function

The graph of this function follows.

If either $x=0$ or $y=0,$ then $f\left(x,y\right)=0,$ so the value of the function does not change on either the *x*- or *y*-axis. Therefore, ${f}_{x}\left(x,0\right)={f}_{y}\left(0,y\right)=0,$ so as either $x\phantom{\rule{0.2em}{0ex}}or\phantom{\rule{0.2em}{0ex}}y$ approach zero, these partial derivatives stay equal to zero. Substituting them into Equation 4.24 gives $z=0$ as the equation of the tangent line. However, if we approach the origin from a different direction, we get a different story. For example, suppose we approach the origin along the line $y=x.$ If we put $y=x$ into the original function, it becomes

When $x>0,$ the slope of this curve is equal to $\sqrt{2}\text{/}2;$ when $x<0,$ the slope of this curve is equal to $\text{\u2212}\left(\sqrt{2}\text{/}2\right).$ This presents a problem. In the definition of *tangent plane*, we presumed that all tangent lines through point $P$ (in this case, the origin) lay in the same plane. This is clearly not the case here. When we study differentiable functions, we will see that this function is not differentiable at the origin.

### Linear Approximations

Recall from Linear Approximations and Differentials that the formula for the linear approximation of a function $f\left(x\right)$ at the point $x=a$ is given by

The diagram for the linear approximation of a function of one variable appears in the following graph.

The tangent line can be used as an approximation to the function $f\left(x\right)$ for values of $x$ reasonably close to $x=a.$ When working with a function of two variables, the tangent line is replaced by a tangent plane, but the approximation idea is much the same.

### Definition

Given a function $z=f\left(x,y\right)$ with continuous partial derivatives that exist at the point $\left({x}_{0},{y}_{0}\right),$ the linear approximation of $f$ at the point $\left({x}_{0},{y}_{0}\right)$ is given by the equation

Notice that this equation also represents the tangent plane to the surface defined by $z=f\left(x,y\right)$ at the point $\left({x}_{0},{y}_{0}\right).$ The idea behind using a linear approximation is that, if there is a point $\left({x}_{0},{y}_{0}\right)$ at which the precise value of $f\left(x,y\right)$ is known, then for values of $\left(x,y\right)$ reasonably close to $\left({x}_{0},{y}_{0}\right),$ the linear approximation (i.e., tangent plane) yields a value that is also reasonably close to the exact value of $f\left(x,y\right)$ (Figure 4.31). Furthermore the plane that is used to find the linear approximation is also the tangent plane to the surface at the point $\left({x}_{0},{y}_{0}\right).$

### Example 4.23

#### Using a Tangent Plane Approximation

Given the function $f\left(x,y\right)=\sqrt{41-4{x}^{2}-{y}^{2}},$ approximate $f\left(2.1,2.9\right)$ using point $\left(2,3\right)$ for $\left({x}_{0},{y}_{0}\right).$ What is the approximate value of $f\left(2.1,2.9\right)$ to four decimal places?

Given the function $f\left(x,y\right)={e}^{5-2x+3y},$ approximate $f\left(4.1,0.9\right)$ using point $\left(4,1\right)$ for $\left({x}_{0},{y}_{0}\right).$ What is the approximate value of $f\left(4.1,0.9\right)$ to four decimal places?

### Differentiability

When working with a function $y=f\left(x\right)$ of one variable, the function is said to be differentiable at a point $x=a$ if ${f}^{\prime}\left(a\right)$ 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 $P$ 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 $\left({x}_{0},{y}_{0}\right)$ is given by

For a tangent plane to exist at the point $\left({x}_{0},{y}_{0}\right),$ the partial derivatives must therefore exist at that point. However, this is not a sufficient condition for smoothness, as was illustrated in Figure 4.29. 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\left(x,y\right)$ is differentiable at a point $P\left({x}_{0},{y}_{0}\right)$ if, for all points $\left(x,y\right)$ in a $\delta $ disk around $P,$ we can write

where the error term $E$ satisfies

The last term in Equation 4.26 is referred to as the *error term* and it represents how closely the tangent plane comes to the surface in a small neighborhood $(\delta $ disk) of point $P.$ For the function $f$ to be differentiable at $P,$ the function must be smooth—that is, the graph of $f$ must be close to the tangent plane for points near $P.$

### Example 4.24

#### Demonstrating Differentiability

Show that the function $f\left(x,y\right)=2{x}^{2}-4y$ is differentiable at point $\left(2,\mathrm{-3}\right).$

Show that the function $f\left(x,y\right)=3x-4{y}^{2}$ is differentiable at point $\left(\mathrm{-1},2\right).$

The function $f\left(x,y\right)=\{\begin{array}{cc}\frac{xy}{\sqrt{{x}^{2}+{y}^{2}}}\hfill & \left(x,y\right)\ne \left(0,0\right)\hfill \\ 0\hfill & \left(x,y\right)=\left(0,0\right)\hfill \end{array}$ 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 ${f}_{x}\left(0,0\right)={f}_{y}\left(0,0\right)=0.$ Substituting this information into Equation 4.26 using ${x}_{0}=0$ and ${y}_{0}=0,$ we get

Calculating $\underset{\left(x,y\right)\to \left({x}_{0},{y}_{0}\right)}{\text{lim}}\frac{E\left(x,y\right)}{\sqrt{{\left(x-{x}_{0}\right)}^{2}+{\left(y-{y}_{0}\right)}^{2}}}$ gives

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

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\left(x,y\right)$ be a function of two variables with $\left({x}_{0},{y}_{0}\right)$ in the domain of $f.$ If $f\left(x,y\right)$ is differentiable at $\left({x}_{0},{y}_{0}\right),$ then $f\left(x,y\right)$ is continuous at $\left({x}_{0},{y}_{0}\right).$

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\left(x,y\right)$ be a function of two variables with $\left({x}_{0},{y}_{0}\right)$ in the domain of $f.$ If $f\left(x,y\right),$ ${f}_{x}\left(x,y\right),$ and ${f}_{y}\left(x,y\right)$ all exist in a neighborhood of $\left({x}_{0},{y}_{0}\right)$ and are continuous at $\left({x}_{0},{y}_{0}\right),$ then $f\left(x,y\right)$ is differentiable there.

Recall that earlier we showed that the function

was not differentiable at the origin. Let’s calculate the partial derivatives ${f}_{x}$ and ${f}_{y}\text{:}$

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 ${f}_{x}\left(0,0\right)$ must be continuous. For this to be true, it must be true that $\underset{\left(x,y\right)\to \left(0,0\right)}{\text{lim}}{f}_{x}\left(0,0\right)={f}_{x}\left(0,0\right)\text{:}$

Let $x=ky.$ Then

If $y>0,$ then this expression equals $1\text{/}{\left({k}^{2}+1\right)}^{3\text{/}2};$ if $y<0,$ then it equals $\text{\u2212}\left(1\text{/}{\left({k}^{2}+1\right)}^{3\text{/}2}\right).$ In either case, the value depends on $k,$ so the limit fails to exist.

### Differentials

In Linear Approximations and Differentials we first studied the concept of differentials. The differential of $y,$ written $dy,$ is defined as ${f}^{\prime}\left(x\right)dx.$ The differential is used to approximate $\text{\Delta}y=f\left(x+\text{\Delta}x\right)-f\left(x\right),$ where $\text{\Delta}x=dx.$ Extending this idea to the linear approximation of a function of two variables at the point $\left({x}_{0},{y}_{0}\right)$ yields the formula for the total differential for a function of two variables.

### Definition

Let $z=f\left(x,y\right)$ be a function of two variables with $\left({x}_{0},{y}_{0}\right)$ in the domain of $f,$ and let $\text{\Delta}x$ and $\text{\Delta}y$ be chosen so that $\left({x}_{0}+\text{\Delta}x,{y}_{0}+\text{\Delta}y\right)$ is also in the domain of $f.$ If $f$ is differentiable at the point $\left({x}_{0},{y}_{0}\right),$ then the differentials $dx$ and $dy$ are defined as

The differential $dz,$ also called the total differential of $z=f\left(x,y\right)$ at $\left({x}_{0},{y}_{0}\right),$ is defined as

Notice that the symbol $\partial $ is not used to denote the total differential; rather, $d$ appears in front of $z.$ Now, let’s define $\text{\Delta}z=f\left(x+\text{\Delta}x,y+\text{\Delta}y\right)-f\left(x,y\right).$ We use $dz$ to approximate $\text{\Delta}z,$ so

Therefore, the differential is used to approximate the change in the function $z=f\left({x}_{0},{y}_{0}\right)$ at the point $\left({x}_{0},{y}_{0}\right)$ for given values of $\text{\Delta}x$ and $\text{\Delta}y.$ Since $\text{\Delta}z=f\left(x+\text{\Delta}x,y+\text{\Delta}y\right)-f\left(x,y\right),$ this can be used further to approximate $f\left(x+\text{\Delta}x,y+\text{\Delta}y\right)\text{:}$

See the following figure.

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 4.25

#### Approximation by Differentials

Find the differential $dz$ of the function $f\left(x,y\right)=3{x}^{2}-2xy+{y}^{2}$ and use it to approximate $\text{\Delta}z$ at point $\left(2,\mathrm{-3}\right).$ Use $\text{\Delta}x=0.1$ and $\text{\Delta}y=\mathrm{-0.05}.$ What is the exact value of $\text{\Delta}z?$

Find the differential $dz$ of the function $f\left(x,y\right)=4{y}^{2}+{x}^{2}y-2xy$ and use it to approximate $\text{\Delta}z$ at point $\left(1,\mathrm{-1}\right).$ Use $\text{\Delta}x=0.03$ and $\text{\Delta}y=\mathrm{-0.02}.$ What is the exact value of $\text{\Delta}z?$

### 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\left(x,y,z\right)$ is differentiable at a point $P\left({x}_{0},{y}_{0},{z}_{0}\right)$ if for all points $\left(x,y,z\right)$ in a $\delta $ disk around $P$ we can write

where the error term *E* satisfies

If a function of three variables is differentiable at a point $\left({x}_{0},{y}_{0},{z}_{0}\right),$ then it is continuous there. Furthermore, continuity of first partial derivatives at that point guarantees differentiability.

### Section 4.4 Exercises

For the following exercises, find a unit normal vector to the surface at the indicated point.

$\text{ln}\left(\frac{x}{y-z}\right)=0$ when $x=y=1$

For the following exercises, as a useful review for techniques used in this section, find a normal vector and a tangent vector at point $P.$

${\left({x}^{2}+{y}^{2}\right)}^{2}=9\left({x}^{2}-{y}^{2}\right),P(\sqrt{2},1)$

$2{x}^{3}-{x}^{2}{y}^{2}=3x-y-7,P(1,\mathrm{-2})$

For the following exercises, find the equation for the tangent plane to the surface at the indicated point. (*Hint:* Solve for $z$ in terms of $x$ and $y.)$

$\mathrm{-8}x-3y-7z=\mathrm{-19},P(1,\mathrm{-1},2)$

${x}^{2}+10xyz+{y}^{2}+8{z}^{2}=0,P(\mathrm{-1},\mathrm{-1},\mathrm{-1})$

$z={e}^{7{x}^{2}+4{y}^{2}},$ $P(0,0,1)$

${x}^{2}+4{y}^{2}={z}^{2},P(3,2,5)$

$z=axy,P\left(1,\frac{1}{a},1\right)$

$z=\text{sin}\phantom{\rule{0.2em}{0ex}}x+\text{sin}\phantom{\rule{0.2em}{0ex}}y+\text{sin}(x+y),P(0,0,0)$

$h(x,y)=\text{ln}\sqrt{{x}^{2}+{y}^{2}},P(3,4)$

For the following exercises, find parametric equations for the normal line to the surface at the indicated point. (Recall that to find the equation of a line in space, you need a point on the line, ${P}_{0}\left({x}_{0,}{y}_{0},{z}_{0}\right),$ and a vector $n=\langle a,b,c\rangle $ that is parallel to the line. Then the equation of the line is $x-{x}_{0}=at,y-{y}_{0}=bt,z-{z}_{0}=ct.)$

$\mathrm{-3}x+9y+4z=\mathrm{-4},P(1,\mathrm{-1},2)$

${x}^{2}-8xyz+{y}^{2}+6{z}^{2}=0,P(1,1,1)$

$z={e}^{4{x}^{2}+6{y}^{2}},P(0,0,1)$

For the following exercises, use the figure shown here.

The length of line segment $AC$ is equal to what mathematical expression?

Using the figure, explain what the length of line segment $AB$ represents.

For the following exercises, complete each task.

Find the total differential of the function $w={e}^{y}\text{cos}(x)+{z}^{2}.$

Show that $f(x,y)={x}^{2}+3y$ is differentiable at every point. In other words, show that $\text{\Delta}z=f(x+\text{\Delta}x,y+\text{\Delta}y)-f(x,y)={f}_{x}\text{\Delta}x+{f}_{y}\text{\Delta}y+{\epsilon}_{1}\text{\Delta}x+{\epsilon}_{2}\text{\Delta}y,$ where both ${\epsilon}_{1}$ and ${\epsilon}_{2}$ approach zero as $\left(\text{\Delta}x,\text{\Delta}y\right)$ approaches $\left(0,0\right).$

Find the total differential of the function $z=\frac{xy}{y+x}$ where $x$ changes from $10\phantom{\rule{0.2em}{0ex}}\text{to}\phantom{\rule{0.2em}{0ex}}10.5$ and $y$ changes from $15\phantom{\rule{0.2em}{0ex}}\text{to}\phantom{\rule{0.2em}{0ex}}13.$

Let $z=f(x,y)=x{e}^{y}.$ Compute $\text{\Delta}z$ from $P(1,2)$ to $Q(1.05,2.1)$ and then find the approximate change in $z$ from point $P$ to point $Q.$ Recall $\text{\Delta}z=f(x+\text{\Delta}x,y+\text{\Delta}y)-f(x,y),$ and $dz$ and $\text{\Delta}z$ are approximately equal.

The volume of a right circular cylinder is given by $V(r,h)=\pi {r}^{2}h.$ Find the differential $dV.$ Interpret the formula geometrically.

See the preceding problem. Use differentials to estimate the volume of aluminum in an enclosed aluminum can with diameter $8.0\phantom{\rule{0.2em}{0ex}}\text{cm}$ and height $12\phantom{\rule{0.2em}{0ex}}\text{cm}$ if the aluminum is $0.04$ cm thick.

Use the differential $dz$ to approximate the change in $z=\sqrt{4-{x}^{2}-{y}^{2}}$ as $(x,y)$ moves from point $(1,1)$ to point $(1.01,0.97).$ Compare this approximation with the actual change in the function.

Let $z=f(x,y)={x}^{2}+3xy-{y}^{2}.$ Find the exact change in the function and the approximate change in the function as $x$ changes from $2.00\phantom{\rule{0.2em}{0ex}}\text{to}\phantom{\rule{0.2em}{0ex}}2.05$ and $y$ changes from $3.00\phantom{\rule{0.2em}{0ex}}\text{to}\phantom{\rule{0.2em}{0ex}}2.96.$

The centripetal acceleration of a particle moving in a circle is given by $a(r,v)=\frac{{v}^{2}}{r},$ where $v$ is the velocity and $r$ is the radius of the circle. Approximate the maximum percent error in measuring the acceleration resulting from errors of $3\text{\%}$ in $v$ and $2\text{\%}$ in $r.$ (Recall that the percentage error is the ratio of the amount of error over the original amount. So, in this case, the percentage error in $a$ is given by $\frac{da}{a}.)$

The radius $r$ and height $h$ of a right circular cylinder are measured with possible errors of $4\text{\%}\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}5\text{\%},$ respectively. Approximate the maximum possible percentage error in measuring the volume (Recall that the percentage error is the ratio of the amount of error over the original amount. So, in this case, the percentage error in $V$ is given by $\frac{dV}{V}.)$

The base radius and height of a right circular cone are measured as $10$ in. and $25$ in., respectively, with a possible error in measurement of as much as $0.1$ in. each. Use differentials to estimate the maximum error in the calculated volume of the cone.

The electrical resistance $R$ produced by wiring resistors ${R}_{1}$ and ${R}_{2}$ in parallel can be calculated from the formula $\frac{1}{R}=\frac{1}{{R}_{1}}+\frac{1}{{R}_{2}}.$ If ${R}_{1}$ and ${R}_{2}$ are measured to be $7\text{\Omega}$ and $6\text{\Omega},$ respectively, and if these measurements are accurate to within $0.05\text{\Omega},$ estimate the maximum possible error in computing $R.$ (The symbol $\text{\Omega}$ represents an ohm, the unit of electrical resistance.)

The area of an ellipse with axes of length $2a$ and $2b$ is given by the formula

$A=\pi ab.$ Approximate the percent change in the area when $a$ increases by $2\text{\%}$ and $b$ increases by $1.5\text{\%}.$

The period $T$ of a simple pendulum with small oscillations is calculated from the formula $T=2\pi \sqrt{\frac{L}{g}},$ where $L$ is the length of the pendulum and $g$ is the acceleration resulting from gravity. Suppose that $L$ and $g$ have errors of, at most, $0.5\text{\%}$ and $0.1\text{\%},$ respectively. Use differentials to approximate the maximum percentage error in the calculated value of $T.$

Electrical power $P$ is given by $P=\frac{{V}^{2}}{R},$ where $V$ is the voltage and $R$ is the resistance. Approximate the maximum percentage error in calculating power if $120$ $V$ is applied to a $2000-\text{\Omega}$ resistor and the possible percent errors in measuring $V$ and $R$ are $3\text{\%}$ and $4\text{\%},$ respectively.

For the following exercises, find the linear approximation of each function at the indicated point.

$f(x,y)={e}^{x}\text{cos}\phantom{\rule{0.2em}{0ex}}y;P(0,0)$

$f(x,y)=\sqrt{20-{x}^{2}-7{y}^{2}},\phantom{\rule{1em}{0ex}}P(2,1)$

**[T]** Find the equation of the tangent plane to the surface $f(x,y)={x}^{2}+{y}^{2}$ at point $\left(1,2,5\right),$ and graph the surface and the tangent plane at the point.

**[T]** Find the equation for the tangent plane to the surface at the indicated point, and graph the surface and the tangent plane: $z=\text{ln}(10{x}^{2}+2{y}^{2}+1),P(0,0,0).$

**[T]** Find the equation of the tangent plane to the surface $z=f(x,y)=\text{sin}(x+{y}^{2})$ at point $\left(\frac{\pi}{4},0,\frac{\sqrt{2}}{2}\right),$ and graph the surface and the tangent plane.