13 Functions of Several Variables

13.7 ​Tangent Lines, Normal Lines, and Tangent Planes

Derivatives and tangent lines go hand-in-hand. Given y=f(x), the line tangent to the graph of f at x=x0 is the line through (x0,f(x0)) with slope f(x0); that is, the slope of the tangent line is the instantaneous rate of change of f at x0.

When dealing with functions of two variables, the graph is no longer a curve but a surface. At a given point on the surface, it seems there are many lines that fit our intuition of being “tangent” to the surface.

margin:
(fullscreen)
Figure 13.7.1: Showing various lines tangent to a surface. Λ

In Figure 13.7.1 we see lines that are tangent to curves in space. Since each curve lies on a surface, it makes sense to say that the lines are also tangent to the surface. The next definition formally defines what it means to be “tangent to a surface.”

Definition 13.7.1 Directional Tangent Line

Let z=f(x,y) be differentiable on an open set S containing (x0,y0) and let u=u1,u2 be a unit vector. The line u through (x0,y0,f(x0,y0)) parallel to u1,u2,Duf(x0,y0) is the tangent line to f in the direction of u at (x0,y0).

We will also follow the convention that

1,0=x  and  0,1=y.

It is instructive to consider each of three directions given in the definition in terms of “slope.” The direction of x is 1,0,fx(x0,y0); that is, the “run” is one unit in the x-direction and the “rise” is fx(x0,y0) units in the z-direction. Note how the slope is just the partial derivative with respect to x. A similar statement can be made for y. The direction of u is u1,u2,Duf(x0,y0); the “run” is one unit in the u direction (where u is a unit vector) and the “rise” is the directional derivative of z in that direction.

Definition 13.7.1 leads to the following parametric equations of directional tangent lines:

x(t)={x=x0+ty=y0z=z0+fx(x0,y0)t,    y(t)={x=x0y=y0+tz=z0+fy(x0,y0)t,
andu(t)={x=x0+u1ty=y0+u2tz=z0+Duf(x0,y0)t
Example 13.7.1 Finding directional tangent lines

Find the lines tangent to the surface z=sinxcosy at (π/2,π/2) in the x and y directions and also in the direction of v=-1,1.

SolutionThe partial derivatives with respect to x and y are:

fx(x,y)=cosxcosy fx(π/2,π/2)=0
fy(x,y)=-sinxsiny fy(π/2,π/2)=-1.

At (π/2,π/2), the z-value is 0.

Thus the parametric equations of the line tangent to f at (π/2,π/2) in the directions of x and y are: margin:
(fullscreen)
(a)
(fullscreen)
(b)
Figure 13.7.2: A surface and directional tangent lines in Example 13.7.1. Λ

x(t)={x=π/2+ty=π/2z=0andy(t)={x=π/2y=π/2+tz=-t.

The two lines are shown with the surface in Figure 13.7.2(a). To find the equation of the tangent line in the direction of v, we first find the unit vector in the direction of v: u=-1/2,1/2. The directional derivative at (π/2,π,2) in the direction of u is

Duf(π/2,π,2)=0,-1-1/2,1/2=-1/2.

Thus the directional tangent line is

u(t)={x=π/2-t/2y=π/2+t/2z=-t/2.

The curve through (π/2,π/2,0) in the direction of v is shown in Figure 13.7.2(b) along with u(t).

Example 13.7.2 Finding directional tangent lines

Let f(x,y)=4xy-x4-y4. Find the equations of all directional tangent lines to f at (1,1).

SolutionFirst note that f(1,1)=2. We need to compute directional derivatives, so we need f. We begin by computing partial derivatives.

fx=4y-4x3fx(1,1)=0;fy=4x-4y3fy(1,1)=0.

Thus f(1,1)=0,0. Let u=u1,u2 be any unit vector. The directional derivative of f at (1,1) will be Duf(1,1)=0,0u1,u2=0. It does not matter what direction we choose; the directional derivative is always 0. Therefore margin:
(fullscreen)
Figure 13.7.3: Graphing f in Example 13.7.2. Λ

u(t)={x=1+u1ty=1+u2tz=2.

Figure 13.7.3 shows a graph of f and the point (1,1,2). Note that this point comes at the top of a “hill,” and therefore every tangent line through this point will have a “slope” of 0.

That is, consider any curve on the surface that goes through this point. Each curve will have a relative maximum at this point, hence its tangent line will have a slope of 0. The following section investigates the points on surfaces where all tangent lines have a slope of 0.

Normal Lines

When dealing with a function y=f(x) of one variable, we stated that a line through (c,f(c)) was tangent to f if the line had a slope of f(c) and was normal (or, perpendicular, orthogonal) to f if it had a slope of -1/f(c). We extend the concept of normal, or orthogonal, to functions of two variables.

Let z=f(x,y) be a differentiable function of two variables. Using Definition 13.7.1, at (x0,y0), x(t) is a line parallel to the vector dx=1,0,fx(x0,y0) and y(t) is a line parallel to dy=0,1,fy(x0,y0). Since lines in these directions through (x0,y0,f(x0,y0)) are tangent to the surface, a line through this point and orthogonal to these directions would be orthogonal, or normal, to the surface. We can use this direction to create a normal line.

The direction of the normal line is orthogonal to dx and dy, hence the direction is parallel to dn=dx×dy. It turns out this cross product has a very simple form:

dx×dy=1,0,fx×0,1,fy=-fx,-fy,1.

It is often more convenient to refer to the opposite of this direction, namely fx,fy,-1. This leads to a definition.

Definition 13.7.2 Normal Line

Let z=f(x,y) be differentiable on an open set S containing (x0,y0).

  1. (a)

    A nonzero vector parallel to n=fx(x0,y0),fy(x0,y0),-1 is orthogonal to f at P=(x0,y0,f(x0,y0)).

  2. (b)

    The line n through P with direction parallel to n is the normal line to f at P.

Thus the parametric equations of the normal line to a surface f at the point (x0,y0,f(x0,y0)) is:

n(t)={x=x0+fx(x0,y0)ty=y0+fy(x0,y0)tz=f(x0,y0)-t.
Example 13.7.3 Finding a normal line

Find the equation of the normal line to z=-x2-y2+2 at (0,1).

SolutionWe find zx(x,y)=-2x and zy(x,y)=-2y; at (0,1), we have zx=0 and zy=-2. We take the direction of the normal line, following Definition 13.7.2, to be n=0,-2,-1. The line with this direction going through the point (0,1,1) is margin:
(fullscreen)
Figure 13.7.4: Graphing a surface with a normal line from Example 13.7.3. Λ

n(t)={x=0y=-2t+1z=-t+1orn(t)=0,-2,-1t+0,1,1.

The surface z=-x2-y2+2, along with the found normal line, is graphed in Figure 13.7.4.

The direction of the normal line has many uses, one of which is the definition of the tangent plane which we define shortly. Another use is in measuring distances from the surface to a point. Given a point Q in space, it is a general geometric concept to define the distance from Q to the surface as being the length of the shortest line segment PQ¯ over all points P on the surface. This, in turn, implies that PQ will be orthogonal to the surface at P. Therefore we can measure the distance from Q to the surface f by finding a point P on the surface such that PQ is parallel to the normal line to f at P.

Example 13.7.4 Finding the distance from a point to a surface

Let f(x,y)=2-x2-y2 and let Q=(2,2,2). Find the distance from Q to the surface defined by f.

SolutionA point P on the surface will have coordinates (x,y,2-x2-y2), so that PQ=2-x,2-y,x2+y2. This surface is used in Example 13.7.2, so we know that at (x,y) the direction of the normal line is dn=-2x,-2y,-1. To find where PQ is parallel to dn, we need to find x, y and c such that cPQ=dn.

cPQ =dn
c2-x,2-y,x2+y2 =-2x,-2y,-1.
This implies
c(2-x) =-2x
c(2-y) =-2y
c(x2+y2) =-1

In each equation, we can solve for c:

c=-2x2-x=-2y2-y=-1x2+y2.

The first two fractions imply x=y, and so the last fraction can be rewritten as c=-1/(2x2). Then

-2x2-x =-12x2
-2x(2x2) =-1(2-x)
4x3 =2-x
4x3+x-2 =0.

Now we consider the cubic polynomial g(x)=4x3+x-2. We have g(0)=-2<0 and g(1)=3>0 so there is at least one real root by the Intermediate Value Theorem. Since g(x)=12x2+1>0 there is at most one real root. Call this unique real root r. Then P=(r,r,2-2r2) and so the distance from Q to the surface is

PQ=(2-r)2+(2-r)2+(2r2)2.

What is r? In general it is difficult (or impossible) to find the roots of a polynomial explicitly. In this case we could use the cubic formula (if we happen to know it) to find

r=12(2+109273+2-109273)

but this isn’t an especially useful representation for r. We can approximate r with a numerical technique (like the Bisection or Newton’s Method) or by using whatever algorithm is built into your calculator or favorite computer program. We find r.689. Thus

P(0.689,0.689,1.051)  and  PQ2.083.

We can take the concept of measuring the distance from a point to a surface to find a point Q a particular distance from a surface at a given point P on the surface.

Example 13.7.5 Finding a point a set distance from a surface

Let f(x,y)=x-y2+3. Let P=(2,1,f(2,1))=(2,1,4). Find points Q in space that are 4 units from the surface of f at P. That is, find Q such that PQ=4 and PQ is orthogonal to f at P.

SolutionWe begin by finding partial derivatives:

fx(x,y)=1     fx(2,1)=1
fy(x,y)=-2y     fy(2,1)=-2

The vector n=1,-2,-1 is orthogonal to f at P. For reasons that will become more clear in a moment, we find the unit vector in the direction of n:

u=nn=1,-2,-16.

Thus a the normal line to f at P can be written as

n(t)=2,1,4+t61,-2,-1.

An advantage of this parameterization of the line is that letting t=t0 gives a point on the line that is |t0| units from P. (This is because the direction of the line is given in terms of a unit vector.) There are thus two points in space 4 units from P: margin:
(fullscreen)
Figure 13.7.5: Graphing the surface in Example 13.7.5 along with points 4 units from the surface. Λ

Q1 =n(4) Q2 =n(-4)
=2+46,1-86,4-46 =2-46,1+86,4+46

The surface is graphed along with points P, Q1, Q2 and a portion of the normal line to f at P.

Tangent Planes

We can use the direction of the normal line to define a plane. With a=fx(x0,y0), b=fy(x0,y0) and P=(x0,y0,f(x0,y0)), the vector n=a,b,-1 is orthogonal to f at P. The plane through P with normal vector n is therefore tangent to f at P.

Definition 13.7.3 Tangent Plane

Let z=f(x,y) be differentiable on an open set S containing (x0,y0), where a=fx(x0,y0), b=fy(x0,y0), n=a,b,-1 and P=(x0,y0,f(x0,y0)).

The plane through P with normal vector n is the tangent plane to f at P. The standard form of this plane is

a(x-x0)+b(y-y0)-(z-f(x0,y0))=0.
Example 13.7.6 Finding tangent planes

Find the equation of the tangent plane to z=-x2-y2+2 at (0,1).

SolutionNote that this is the same surface and point used in Example 13.7.3. margin:
(fullscreen)
Figure 13.7.6: Graphing a surface with tangent plane from Example 13.7.6. Λ
There we found n=0,-2,-1 and P=(0,1,1). Therefore the equation of the tangent plane is

-2(y-1)-(z-1)=0.

The surface z=-x2-y2+2 and tangent plane are graphed in Figure 13.7.6.

Example 13.7.7 Using the tangent plane to approximate function values

The point (3,-1,4) lies on the surface of an unknown differentiable function f where fx(3,-1)=2 and fy(3,-1)=-1/2. Find the equation of the tangent plane to f at P, and use this to approximate the value of f(2.9,-0.8).

SolutionKnowing the partial derivatives at (3,-1) allows us to form the normal vector to the tangent plane, n=2,-1/2,-1. Thus the equation of the tangent line to f at P is:

2(x-3)-1/2(y+1)-(z-4)=0z=2(x-3)-1/2(y+1)+4. (13.7.1)

Just as tangent lines provide excellent approximations of curves near their point of intersection, tangent planes provide excellent approximations of surfaces near their point of intersection. So f(2.9,-0.8)z(2.9,-0.8)=3.7.

This is not a new method of approximation. Compare the right hand expression for z in Equation (13.7.1) to the total differential:

dz=fxdx+fydyandz=2fx(x-3)dx+-1/2fy(y+1)dydz+4.

Thus the “new z-value” is the sum of the change in z (i.e., dz) and the old z-value (4). As mentioned when studying the total differential, it is not uncommon to know partial derivative information about an unknown function, and tangent planes are used to give accurate approximations of the function.

The Gradient and Normal Lines, Tangent Planes

The methods developed in this section so far give a straightforward method of finding equations of normal lines and tangent planes for surfaces with explicit equations of the form z=f(x,y). However, they do not handle implicit equations well, such as x2+y2+z2=1. There is a technique that allows us to find vectors orthogonal to these surfaces based on the gradient.

Recall that when z=f(x,y), the gradient f=fx,fy is orthogonal to level curves of f. Theorem 13.6.3 part 3 made an analogous statement about the gradient F, where w=F(x,y,z). Given a point (x0,y0,z0), let c=F(x0,y0,z0). Then F(x,y,z)=c is a level surface that contains the point (x0,y0,z0) and F(x0,y0,z0) is orthogonal to this level surface. This direction can be used to find tangent planes and normal lines.

Example 13.7.8 Using the gradient to find a tangent plane

Find the equation of the plane tangent to the ellipsoid x212+y26+z24=1 at P=(1,2,1).

SolutionWe consider the equation of the ellipsoid as a level surface of a function F of three variables, where F(x,y,z)=x212+y26+z24. The gradient is: margin:
(fullscreen)
Figure 13.7.7: An ellipsoid and its tangent plane at a point. Λ

F(x,y,z) =Fx,Fy,Fz
=x6,y3,z2.

At P, the gradient is F(1,2,1)=1/6,2/3,1/2. Thus the equation of the plane tangent to the ellipsoid at P is

16(x-1)+23(y-2)+12(z-1)=0.

The ellipsoid and tangent plane are graphed in Figure 13.7.7.

Taylor Polynomials for Functions of Two Variables

We’ll take a slight detour at this point.

Recall from 9.9.1 that for a function y=f(x), we have the nth-order Taylor polynomial about a point a:

pn(x)=k=0n(x-a)kk!f(k)(a)=pn-1(x)+(x-a)nn!f(n)(a),

with an associated remainder Rn(x)=f(x)-pn(x). If we know that |f(n+1)(u)|K for all u in an open interval containing a and x, then we can bound the remainder as well:

|Rn(x)|K|x-a|n+1(n+1)!.

This section has shown that a function z=f(x,y) can be locally approximated near (a,b) by

L(x,y)=f(a,b)+fx(a,b)(x-a)+fy(a,b)(y-b).

We can combine these ideas and talk about the Taylor polynomial for f (for simplicity, we’ll take (a,b)=(0,0)). Let

p0(x,y) =f(0,0)
p1(x,y) =p0(x,y)+xfx(0,0)+yfy(0,0)
p2(x,y) =p1(x,y)+x22fxx(0,0)+xyfxy(0,0)+y22(0,0)
p3(x,y) =p2(x,y)+x33!fxxx(0,0)+x2y2fxxy(0,0)+xy22fxyy(0,0)+y33!fyyy(0,0)
and in general,
pn(x,y) =pn-1(x,y)+k=0nxkyn-kk!(n-k)!nfxkyn-k(0,0),

and define the remainder by Rn(x,y)=f(x,y)-pn(x,y). Notice that each new term in pn consists of all the ways to get a polynomial in x and y of order n along with the unique derivative that would make that polynomial a constant, divided by what that constant would be.

It is also possible to prove a bound on Rn. Suppose that

|nfxkyn-k(x,y)|K

for all k and all (x,y) within distance r of the origin. Then for all (x,y) within distance r,

|Rn-1(x,y)|K(x2+y2)n/2n!Krnn!.

Tangent lines and planes to surfaces have many uses, including the study of instantaneous rates of changes and making approximations. Normal lines also have many uses. In this section we focused on using them to measure distances from a surface. Another interesting application is in computer graphics, where the effects of light on a surface are determined using normal vectors.

The next section investigates another use of partial derivatives: determining relative extrema. When dealing with functions of the form y=f(x), we found relative extrema by finding x where f(x)=0. We can start finding relative extrema of z=f(x,y) by setting fx and fy to 0, but it turns out that there is more to consider.

Exercises 13.7

 

Terms and Concepts

  1. 1.

    Explain how the vector v=1,0,3 can be thought of as having a “slope” of 3.

  2. 2.

    Explain how the vector v=0.6,0.8,-2 can be thought of as having a “slope” of -2.

  3. 3.

    T/F: Let z=f(x,y) be differentiable at P. If n is a normal vector to the tangent plane of f at P, then n is orthogonal to x and y at P.

  4. 4.

    Explain in your own words why we do not refer to the tangent line to a surface at a point, but rather to directional tangent lines to a surface at a point.

Problems

In Exercises 5–8., a function z=f(x,y), a vector v and a point P are given. Give the parametric equations of the following directional tangent lines to the graph of f at P:

  1. (a)

    x(t)

  2. (b)

    y(t)

  3. (c)

    u(t), where u is the unit vector in the direction of v.

  1. 5.

    f(x,y)=2x2y-4xy2, v=1,3, P=(2,3).

  2. 6.

    f(x,y)=3cosxsiny, v=1,2, P=(π/3,π/6).

  3. 7.

    f(x,y)=3x-5y, v=1,1, P=(4,2).

  4. 8.

    f(x,y)=x2-2x-y2+4y, v=1,1, P=(1,2).

In Exercises 9–12., a function z=f(x,y) and a point P are given. Find the equation of the normal line to the graph of f at P. Note: these are the same functions as in Exercises 5.8..

  1. 9.

    f(x,y)=2x2y-4xy2, P=(2,3).

  2. 10.

    f(x,y)=3cosxsiny, P=(π/3,π/6).

  3. 11.

    f(x,y)=3x-5y, P=(4,2).

  4. 12.

    f(x,y)=x2-2x-y2+4y, P=(1,2).

In Exercises 13–16., a function z=f(x,y) and a point P are given. Find the two points that are 2 units from the surface of the graph of f at P. Note: these are the same functions as in Exercises 5.8..

  1. 13.

    f(x,y)=2x2y-4xy2, P=(2,3).

  2. 14.

    f(x,y)=3cosxsiny, P=(π/3,π/6).

  3. 15.

    f(x,y)=3x-5y, P=(4,2).

  4. 16.

    f(x,y)=x2-2x-y2+4y, P=(1,2).

In Exercises 17–20., a function z=f(x,y) and a point P are given. Find the equation of the tangent plane to the graph of f at P. Note: these are the same functions as in Exercises 5.8..

  1. 17.

    f(x,y)=2x2y-4xy2, P=(2,3).

  2. 18.

    f(x,y)=3cosxsiny, P=(π/3,π/6).

  3. 19.

    f(x,y)=3x-5y, P=(4,2).

  4. 20.

    f(x,y)=x2-2x-y2+4y, P=(1,2).

In Exercises 21–24., an implicitly defined function of x, y and z is given along with a point P that lies on the surface. Use the gradient F to:

  1. (a)

    find the equation of the normal line to the surface at P, and

  2. (b)

    find the equation of the plane tangent to the surface at P.

  1. 21.

    x28+y24+z216=1, at P=(1,2,6)

  2. 22.

    z2-x24-y29=0, at P=(4,-3,5)

  3. 23.

    xy2-xz2=0, at P=(2,1,-1)

  4. 24.

    sin(xy)+cos(yz)=1, at P=(2,π/12,4)

Omni CMS