Skip to main content

Active Calculus - Multivariable

Section 11.8 Higher Dimensions

Subsection 11.8.1 Introduction

In this chapter, we have primarily worked with functions of two variables including understand graphs of the form \(z=f(x,y)\) and measuring change with two variable functions. In this section, we will look at how many of the tools we have developed for understanding two variable functions can be easily generalized for functions of three or more variables. We will not give new definitions for the various ideas in this section since the definitions would often be too technical and would not change how we use or understand these ideas.
A significant impediment to expanding the ideas in this chapter to functions of three or more variables will be that is it difficult (or impossible) to draw plots of these functions, which means we can only make sense of the measurements we are working with geometrically using simplifications or analogies. For this reason, most of our work in this section and where you will see these topics used in future classes will be more algebraically focused.
In the following preview activity, we will look at level sets for two familiar functions of two variables and start to explore how level sets can help visualize functions of three variables.

Preview Activity 11.8.1.
(a)
Find the level curves for the function \(f(x,y)=x^2+y^2\) over the values \(k=\{-2,-1,0,1,2\}\text{.}\) State the equation and shape of the level curves for each value.
Hint.
Some of these level sets will be empty, meaning that there are no \((x,y)\) points that have the particular \(k\)-value as output.
(b)
Find the level curves for the function \(g(x,y)=x^2-y^2\) over the values \(k=\{-2,-1,0,1,2\}\text{.}\) State the equation and shape of the level curves for each value.
(c)
In general, the level set of a function \(f\) will be the set of points for which \(f(P)=k\) for some constant \(k\text{.}\) We will look at some algebraically simple functions of three variables to see what kinds of level sets are possible. We use the term level set here because the set of inputs for a function of three or more variables that gives a particular output value will likely not be a curve.
Find the level set for the function \(f(x,y,z)=x^2+y^2+z^2\) over the values \(k=\{-2,-1,0,1,2\}\text{.}\) Be sure to state the equation and shape of the level set for each value.
Hint.
Some of these level sets will be empty.
(d)
Find the level set for the function \(g(x,y,z)=x^2+y^2-z^2\) over the values \(k=\{-2,-1,0,1,2\}\text{.}\) Be sure to state the equation and shape of the level set for each value. These level set values should give three different types of surfaces.
(e)
Find the level set for the function \(h(x,y,z)=x+y-z\) over the values \(k=\{-2,-1,0,1,2\}\text{.}\) Be sure to state the equation and shape of the level set for each value.
We will now generalize these ideas of level sets to start our exploration for functions of three or more variables. As we have for most kinds of functions in previous precalculus and calculus courses, we will look at the following ideas in order: domain and range of functions, graphs of functions, limits of functions, and finally, measuring change of function.

Subsection 11.8.2 Inputs and Outputs with Functions of Three or More Variables

We will first generalize the notion of function and the corresponding ideas of domain and range to deal with three or more input variables. A function is a rule that assigns an single output for each allowed input. For instance, your school likely uses a function that takes your student ID number as an input and outputs your name. While you may not be the only student at your school with your name, this function should not associate more than one name with each student ID number.
Recall from Definition 11.1.6, that the domain of a function is the set of inputs for which a function is defined and the range is the set of outputs that a function actually uses.

Example 11.8.1.

For example, the function \(g(x,y,z)= \sqrt{1-x}+e^{y^2+z^2}\) could only have a domain as large as \(\{(x,y,z) \in \mathbb{R}^3| x \leq 1\}\) because we need \(x\) to be greater than 1 (in order for the first term to make sense) and there is no restriction on what values of \(y\) and \(z\) will make sense as an input of \(g\text{.}\) You may be tempted to say the range of \(g\) is all real numbers since \(g\) does have a scalar output, but negative numbers are not possible to get as an output for \(g\text{.}\) Since the outputs of our exponential and square root functions will be non-negative, the range of \(g\) will be the interval \((0,\infty)\text{.}\)

Subsection 11.8.3 Attempting to Graph Functions of Three or More Variables

Given a function of several variables, \(f\text{,}\) we call the level set of \(f\) at the value \(k\) to be the collection of inputs such that the output of \(f\) is exactly \(k\text{.}\) A level set must be a subset of the domain of the function \(f\) because the level set is a collection of the input points.
If \(f(x,y)\) is a function of two variables, then a level set would correspond to a contour or a level curve of the form \(f(x,y)=k\text{.}\) Notice that the level set in this case is a set of points in the \(xy\)-plane (the space of inputs for our function \(f\)). As we saw in Section 11.1, we can make a contour plot by graphing a collection of these level curves on the same 2D-plot, which will give us an idea of what the surface corresponding to \(z=f(x,y)\) would look like. In other words, we were able to give enough information in a 2D-plot to describe a figure in three dimensions.
If \(g(x,y,z)\) is a function of three variables, then a graph of \(g\) function would require four dimensions (three dimensions for the inputs and one dimension for the output). Drawing plots in three dimensions is hard enough; four dimensions feels like too much to attempt. Similar to how we used contour plots to express a higher dimensional plot in a lower dimensional setting, we would like to use level sets of \(g(x,y,z)\) to understand a graph of \(w=g(x,y,z)\) and help measure change in the output of \(g\text{.}\)
A level set of \(g\) is a collection of points in \(xyz\)-space (the set of inputs for our function \(g\)) and would correspond to a surface of the form \(g(x,y,z)=k\text{.}\) As you saw in Preview Activity 11.8.1, the level sets of a function of three variables will often be a surface. For example, if \(g(x,y,z)=x^2+y^2+z^2\text{,}\) then the level surface corresponding to the value 1 will be given by the equation \(x^2+y^2+z^2=1\text{,}\) a sphere of radius one centered at the origin.
These level surfaces will often be a different kind of surface than we have been working with throughout Chapter 11. Surfaces of the form \(z=f(x,y)\) are called explicit surfaces because one of the coordinates can be solved (explicitly) as a function of the other coordinates. Surfaces like spheres or hyperboloids are NOT explicit surfaces because there is no way to solve for one variable as a function of the other coordinates (that pesky \(\pm\) that comes with square roots prevents this for many quadric surfaces).
Surfaces like spheres and hyperboloids are called implicit surfaces because they can be described the set of points that satisfy an implicit equation. For instance, a hyperboloid of one sheet can be described by an equation of the following form.
\begin{equation*} \frac{(x-x_0)^2}{a^2}+\frac{(y-y_0)^2}{b^2}=1+\frac{(z-z_0)^2}{c^2} \end{equation*}
Conveniently, level sets for functions of several variables have an associated implicit equation, \(g(x,y,z)=k\text{.}\)
This insight goes the other way as well; Any implicit surface can be thought of as a level set for some function of three variables. If \(S_1\) is the surface described by \(x^2-xyz=y^2 z^3-2\text{,}\) then we can also think of \(S_1\) as the level set of the three variable function \(F(x,y,z)=x^2-xyz-y^2 z^3\) with the output of \(-2\) because any \((x,y,z)\) point that satisfies \(x^2-xyz=y^2 z^3-2\) must also satisfy \(x^2-xyz-y^2 z^3=-2\text{.}\)

Example 11.8.2.

Analogous to how a (two-dimensional) contour plot gives us a lot of information about the corresponding (three-dimensional) surface plot, we would like to see if we can graph multiple level sets of a three variable function to understand the 4D graph of a function of the form \(w=g(x,y,z)\text{.}\) In this example, we will work with the three variable function \(g(x,y,z)=x^2+y^2-z^2\text{.}\)
If we consider the level sets corresponding to the values \(k=\{-4,-1,0,1,4\}\text{,}\) we get the following level surfaces:
  • If \(k=-4\text{,}\) then we are looking at the implicit equation \(x^2+y^2-z^2=-4\) which corresponds to a hyperboloid of two-sheets given by \(\frac{z^2}{4}-\frac{x^2}{4}-\frac{y^2}{4}=1 \text{.}\)
  • If \(k=-1\text{,}\) then we are looking at the implicit equation \(x^2+y^2-z^2=-1\) which corresponds to a hyperboloid of two-sheets given by \(z^2-x^2-y^2=1 \text{.}\)
  • If \(k=0\text{,}\) then we are looking at the implicit equation \(x^2+y^2-z^2=0\) which corresponds to a cone given by \(x^2+y^2=z^2 \text{.}\)
  • If \(k=1\text{,}\) then we are looking at the implicit equation \(x^2+y^2-z^2=1\) which corresponds to a hyperboloid of one-sheet given by \(x^2+y^2-z^2=1 \text{.}\)
  • If \(k=4\text{,}\) then we are looking at the implicit equation \(x^2+y^2-z^2=-4\) which corresponds to a hyperboloid of one-sheet given by \(\frac{x^2}{4}+\frac{y^2}{4}-\frac{z^2}{4}=1 \text{.}\)
We can plot these level sets together to get the analogous plot to a contour plot. Figure 11.8.3 shows a graph of these surfaces with colors that go from red (at \(k=-4\)) to blue (at \(k=4\)). You can see how a 3D plot of multiple level sets gets visually cluttered very quickly, but you can see how the output of \(g\) will increase as you move away the \(z\)-axis or if you move closer to the \(xy\)-plane. Later in this section we will explore how these level surfaces are related to questions like “In what direction will the output of \(g\) have the greatest rate of increase?”
Figure 11.8.3. A plot of the level surfaces for \(g(x,y,z)=x^2+y^2-z^2\) for values \(k=\{-4,1,0,1,4\}\) in colors from red to blue, respectively.
While the plot of multiple level surfaces may be a bit overwhelming, we can show each of these level sets in a separate plot. Figure 11.8.4 plots a level surface for the value given by the slider at the top. You should use the slider to change the value of \(k\) over the entire range from -4 to 4 and look at how the shape of the corresponding level surface morphs from hyperboloid of two sheets to a cone to a hyperbola of one sheet.
Figure 11.8.4. A plot of the level surface for \(g(x,y,z)=x^2+y^2-z^2\) with a slider for changing the level curve value from -4 to 4
Figure 11.8.4 may look like a three dimensional plot, but we really have a four dimensional plot with the fourth dimensional axis given by the slider. We saw a similar case in Figure 10.1.3 where the plot of \(\vr(t)\) was really a four dimensional idea (one dimension for the input changing with the \(t\)-axis for the slider and the three dimensional output of \(\vr\) is shown with the vector in standard position or a plot of the terminal point). With our vector-valued functions of one variables, we simplified our four dimensional plot to include all of the 3D outputs but we often ignored plotting how those outputs depended on the value of the parameter \(t\text{.}\)

Activity 11.8.2.
In this activity, we will look at level surfaces created by two relatively basic three variable functions and consider the direction in which the output is increasing or decreasing as fast as possible.
(a)
What shape and characteristics will the level surfaces of \(f(x,y,z)=2x-y+z\) have? You should talk about all of the possibilities for the different types of level surfaces and compare what is the same or different about these level surfaces (relating the differences to the level value, \(k\)).
(b)
If you are at the point \((1,1,-1)\text{,}\) in what direction should you change the input of \(f(x,y,z)=2x-y+z\) to see the greatest increase in the output of \(f\text{?}\) You should think about how a change in each variable will change the output of \(f\) and talk about this in your reasoning.
(c)
What shape and characteristics will the level surfaces of \(g(x,y,z)=x^2+y^2+z^2\) have? You should talk about all of the possibilities for the different types of level surfaces and compare what is the same or different about these level surfaces (relating the differences to the level value, \(k\)).
(d)
If you at the point \((2,0,-2)\text{,}\) in what direction should you change the input of \(g(x,y,z)=x^2+y^2+z^2\) to see the greatest increase in the output of \(f\text{?}\) You should think about how a change in each variable will change the output of \(f\) and talk about this in your reasoning.

Subsection 11.8.4 Measuring Change with Functions of Three or More Variables

Conceptually, limits for functions of three or more variables works the same as for functions of two variables. Given a function \(f\text{,}\) we say that \(f\) has limit \(L\) as the inputs approach \(P_0\) provided that we can make \(f(P)\) as close to \(L\) as we like by taking \(P\) sufficiently close (but not equal) to \(P_0\text{.}\) We write
\begin{equation*} \lim_{P \to P_0} f(P) = L \end{equation*}
Conceptually, if the limit of a function \(f\) along every path through an input point \(P_0\) exists and all of those limits are the same value, \(L,\text{,}\) then we say the limit of \(f\) at \(P\) is \(L\text{.}\) There is not much more insight into limits of multivariable functions to be had at this point, so we will move on to measuring the change in output of our multivariable functions of three or more variables.
Generally speaking, the partial derivative of a multivariable function measures the rate of change in the output of the function when one variable is changed and all others are held constant. Our definition and notation of partial derivatives only needs to account for three or more input variables.

Example 11.8.5.

If we consider \(T(x,y,z,t)\) to be the function that measures the air temperature at some location given by \((x,y,z)\) spatial coordinates at time \(t\text{,}\) then we have four (first) partial derivatives: \(T_x=\frac{\partial T}{\partial x}\text{,}\) \(T_y=\frac{\partial T}{\partial y}\text{,}\) \(T_z=\frac{\partial T}{\partial z}\text{,}\) and \(T_t=\frac{\partial T}{\partial t}\text{.}\) The limit definition of the partial derivative with respect to \(t\) at a point \((x_0,y_0,z_0,t_0)\) would be
\begin{equation*} \frac{\partial T}{\partial z} =\lim_{h \to 0} \frac{T(x_0,y_0,z_0,t_0+h)-T(x_0,y_0,z_0,t_0)}{h} \end{equation*}
and would measure the instantaneous rate of change in temperature over time at the location \((x_0,y_0,z_0)\) for when \(t=t_0\text{.}\)
Second partial derivatives will work the same as for functions with two variable functions. For example,
\begin{equation*} T_{yt}=\frac{\partial T_y}{\partial t} = \frac{\partial }{\partial t}\left[ \frac{\partial T}{\partial y} \right] \end{equation*}
would measure the rate of change with respect to time of \(T_y\text{.}\) Our function will have sixteen second partial derivatives (4 unmixed partials and 12 mixed partials).
Clairaut’s Theorem also generalizes to higher dimensions; if all mixed partials are continuous near an input point for our function of three or more variables, then the comparable mixed partials will be equal.
In Section 11.5, we saw how the ideas of locally linear functions and differentiability meant that for small scales, the change in the output of our function could be expressed as a linear combination of the changes in each variable separately. This connected to the idea that the linearization of a function approximates the original function well for small neighborhoods around the point at which the linearization was created. We visualized this linearization with the tangent plane and saw that geometrically speaking, the tangent plane was a good approximation for the surface at small scales.
Unfortunately, we will not be able to use this kind of visualization for functions of three or more variables because our graphing techniques are limited to looking at plots of level surfaces. We can however use linearizations to approximate the change in functions of three or more variables. For example, if we consider \(T(x,y,z,t)\) to be the function that measures the air temperature at some location given by \((x,y,z)\) spatial coordinates at time \(t\text{,}\) then the linearization of this function at a location at location \((a,b,c)\) with time \(t=d\) will be
\begin{align*} L(x,y,z,t)=\amp T(a,b,c,d)(x-a)+ T_x(a,b,c,d) (x-a) \\ \amp \quad +T_y(a,b,c,d) (y-b)+T_z(a,b,c,d) (z-c)\\ \amp \quad +T_t(a,b,c,d) (t-d) \end{align*}
Notice this is the same form as we have used for all of our linear ideas; namely the change in the output is a linear combination of the changes with respect to a change in a single input variable (while holding all other inputs constant).
We can easily generalize related ideas like the differential to functions of three or more variables. The differential for our temperature function is given by
\begin{equation*} dT = \frac{\partial T}{\partial x} dx + \frac{\partial T}{\partial y} dy + \frac{\partial T}{\partial z} dz + \frac{\partial T}{\partial t} dt \end{equation*}
Other important ideas, like the classic calculus approach or our interpretation of the gradient, did not depend on using a function of two variables, so we can easily adapt these arguments and results to higher dimensional cases. Again, the downside to all of this abstraction is that we do not have the geometric tools to interpret and understand our measurements in higher dimensions.

Subsection 11.8.5 Directional Derivatives and Gradients

Directional derivatives and gradients for functions of three or more variables will come up several times in this course (and in many subsequent math/physical science/economics courses), so we will take a little bit of time to talk about the definitions and interpretations now. Recall that the directional derivative 11.7 measures the instantaneous rate of change of a multivariable function when the inputs are changed in a particular direction. None of the arguments in Section 11.7 were specific to functions of two variables, but rather than stating these results in terms of an abstract function of \(n\)-variables, we will state the various definitions and results in terms of functions of either three or four variables, \(f(x,y,z)\) or \(g(x,y,z,w)\text{.}\)
Let \(f = f(x,y,z)\) be a function of three variables. The derivative of \(f\) at the point \((x,y,z)\) in the direction of the unit vector \(\vu = \langle u_1, u_2 , u_3 \rangle\) is denoted \(D_{\vu}f(x,y,z)\) and is given by
\begin{equation} D_{\vu}f(x,y,z) = \lim_{t \to 0} \frac{f(x+u_1 t, y+u_2 t, z+u_3t) - f(x,y,z)}{t}\tag{11.8.1} \end{equation}
for those values of \(x\text{,}\) \(y\text{,}\) and \(z\) for which the limit exists. We can make a similar limit definition for a function of more than three variables because we are able to separate the length of the step in a particular direction (\(t\) in the above statement) and the unit vector in that particular direction (\(\vu\) from above) for vectors with any number of components.
We can calculate the directional derivative 11.7.7 in terms of partial derivatives of our function and \(\vu\text{.}\) This result comes from using the chain rule on a composition of our multivariable function with line in the direction of \(\vu\text{.}\) So if \(f(x,y,z)\) and \(g(x,y,z,w)\text{,}\) then
\begin{equation*} D_{\vu} f(x,y,z)= f_x(x,y,z) u_1 + f_y(x,y,z) u_2 +f_z(x,y,z) u_3 \end{equation*}
and
\begin{equation*} D_{\vu} g(x,y,z,w)= g_x(x,y,z,w) u_1 + g_y(x,y,z,w) u_2 +g_z(x,y,z,w) u_3+ g_w(x,y,z,w) u_4 \end{equation*}
Remember that the direction vector will have as many components as there are inputs to our function because the direction vector corresponds to a change in the inputs of the function.
The formulas above have the same form of a dot product of the gradient and the direction vector:
\begin{equation*} D_{\vu} f(x,y,z)= \nabla f \cdot \langle u_1,u_2, u_3\rangle \end{equation*}
and
\begin{equation*} D_{\vu} g(x,y,z,w)= \nabla g \cdot \langle u_1,u_2, u_3,u_4\rangle \end{equation*}
where \(\nabla f =\langle f_x(x,y,z), f_y(x,y,z) , f_z(x,y,z)\rangle\) and \(\nabla g = \langle g_x(x,y,z,w), g_y(x,y,z,w) , g_z(x,y,z,w), g_w(x,y,z,w)\rangle\text{.}\) This generalization shows that in any dimension, the directional derivative can be calculated as the dot product of the gradient and the direction vector.
This also means that all of our work to understand the meaning of the gradient 11.7.5 will generalize to any dimension as well. In particular, we update our summary of the meaning of the gradient below.

The Meaning of the Gradient as a Vector.

Let \(f\) be a differentiable function and \(P\) a point for which \(\nabla f(P) \ne \vzero\text{.}\)
  • The gradient, \(\nabla f (P)\) points in a direction perpendicular to the level curve \(f(P)=k\text{.}\)
  • The gradient, \(\nabla f (P)\text{,}\) points in the direction of greatest rate of increase for \(f\) at \(P\text{,}\) and the instantaneous rate of change of \(f\) in that direction is the length of the gradient vector. That is, if \(\vu = \frac{1}{\vecmag{\nabla f(P)}} \nabla f(P)\text{,}\) then \(\vu\) is a unit vector in the direction of greatest increase of \(f\) at \(P\text{,}\) and \(D_{\vu} f(P) = \vecmag{\nabla f(P)}\text{.}\)
  • The gradient, \(\nabla f(P)\text{,}\) points in the opposite direction of greatest rate of decrease for \(f\) at \(P\text{,}\) and the instantaneous rate of change of \(f\) in that direction is negative the length of the gradient vector. That is, if \(\vu = - \frac{1}{\vecmag{\nabla f(P)}} \nabla f(P)\text{,}\) then \(\vu\) is a unit vector in the direction of greatest decrease of \(f\) at \((P)\text{,}\) and \(D_{\vu} f(P) = -\vecmag{\nabla f(P)}\text{.}\)
The first idea above will be very important tool in finding an equation for the plane tangent to an implicit surface. Let \(P_1\) be a point on \(S_1\text{,}\) an implicit surface given by \(F(P)=k\text{.}\) The tools of Section 11.5 will not work because our surface is not of the form \(z=f(x,y)\text{.}\) Because \(\nabla F(P_1)\) is perpendicular to the surface \(S_1\text{,}\) \(\nabla F(P_1)\) will be a normal vector for the tangent plane at \(P_1\text{.}\) This leads to the following key idea.

Proof.

By Equations of a plane we need to find a normal vector for the plane and a point on the plane. The point \(P_0=(x_0,y_0,z_0)\) is the location where our tangent plane will intersect \(S_1\) so we only need to find a normal vector for our plane. By our interpretation of the gradient above, \(\nabla F (P_0)= \langle \frac{\partial F}{\partial x}(P_0), \frac{\partial F}{\partial y}(P_0), \frac{\partial F}{\partial z}\rangle\) will be perpendicular to the level surface \(S_1\text{.}\) Therefore,
\begin{equation*} \frac{\partial F}{\partial x}(P_0) (x-x_0)+ \frac{\partial F}{\partial y}(P_0) (y-y_0) +\frac{\partial F}{\partial z}(P_0) (z-z_0)=0 \end{equation*}

Example 11.8.7.

In this example, we will look at the function \(f(x,y,z)=x^2+y^2+z^2\) and the meaning of its gradient, \(\nabla f = \langle 2x,2y,2z\rangle \text{.}\) In order to visualize the graph of \(f\) we can look at a level surface given by \(f(x,y,z)=k\text{.}\) In Figure 11.8.8, you can see a plot of the level surface for a value of \(k\text{.}\) Note that the level surfaces of \(f\) will be spheres centered at the origin or radius \(R=\sqrt{k}\text{.}\) You can use the slider at the top of Figure 11.8.8 to change the value of \(k\) and see how the scale of the level surface changes but the shape does not.
Figure 11.8.8. A plot of a level surfaces for \(g(x,y,z)=x^2+y^2+z^2\) with the option to plot gradient vectors for some points on the level surface
On Figure 11.8.8, you can use the checkbox to show the gradient vector plotted at a collection of points on the level surface. If you turn on the gradient vectors, you can see that the gradient vector will be perpendicular to the level surface and this relationship is true regardless of what value of \(k\) is used for the level surface. Two other properties should be noticed as well; First, the gradient always points out of the sphere in a direction opposite the origin and second, the length of the gradient is increasing as \(k\) is increasing.
The function \(f\) will take a point \((x,y,z)\) as input and output the square of the distance to this point from the origin. So \(f\) will increase as long as you move away from the origin, but the direction of greatest increase is to move directly away from the origin. The rate of increase in \(f\) also increases as you get farther away from the origin. Both of these ideas are demonstrated in Figure 11.8.8 by the red gradient vectors. Specifically, you can see that length of the gradient vectors increases as you increase \(k\) and the direction of the gradient vectors is always perpendicular to the level surface/sphere. You can also reason that the direction for greatest decrease in \(f\) will be in the direction going toward the origin.
We can verify Key Idea 11.8.6 by looking at tangent points for a few points on these spheres as level surfaces. Let \(S_1\) be the level surface with value 1, \(f(x,y,z)=1=x^2+y^2+z^2\text{.}\) Note that \(P_0=(0,-1,0)\) is on \(S_1\) and \(\nabla f(P_0)=\langle 0,-2,0\rangle\text{.}\) So by Key Idea 11.8.6, the tangent plane to \(S_1\) at \(P_0\) will be given by
\begin{equation*} (0)(x-0)+(-2)(y+1)+(0)(z-0)=0 \rightarrow y=-1 \end{equation*}
This point, normal vector, and tangent plane is shown in red for Figure 11.8.9.
Figure 11.8.9.
If we look at another point on \(S_1\) like \(P_1=(\frac{\sqrt{2}}{2},0,-\frac{\sqrt{2}}{2}) \text{,}\) we can apply the same argument. Note that \(\nabla f(P_1)=\langle \sqrt{2},0,-\sqrt{2}\rangle\text{,}\) so our tangent plane will be given by
\begin{equation*} (\sqrt{2})\left(x-\frac{\sqrt{2}}{2}\right)+(0)(y-0)+(-\sqrt{2})\left(z-\frac{\sqrt{2}}{2}\right)=0 \rightarrow x-z=\sqrt{2} \end{equation*}
This point, normal vector, and tangent plane is shown in green for Figure 11.8.9.

Example 11.8.10.

In this example, we will look at the function \(g(x,y,z)=x^2+y^2-z^2\text{,}\) the level surfaces of \(g\text{,}\) and the meaning of the gradient of \(g\text{,}\) given by \(\nabla g = \langle 2x,2y,-2z\rangle \text{.}\) In Example 11.8.2 we saw how different values of \(k\) for the level surfaces gives rise to different types of surfaces. In Figure 11.8.11, you can use the slider to change the level surface value and see how the shape of the level surfaces changes depending on the value of \(k\text{.}\) In particular, you should notice that
  • if \(k\lt 0\text{,}\) the level surface will be a hyperboloid of two sheets
  • if \(k = 0\text{,}\) the level surface will be a cone
  • if \(k \gt 0\text{,}\) the level surface will be a hyperboloid of one sheet
We can use the same type of argument as the previous example to create tangent planes to the implicit surfaces of the form \(g(x,y,z)=k\text{.}\) Remember that \(\nabla g=\langle 2x,2y,-2z\rangle \text{.}\) We will describe a tangent plane at each of the following points on each of the following surfaces:
  • The tangent plane to the surface with \(k=-1\) at the point \(P_1=(-1,1,\sqrt{3})\) will be given by
Figure 11.8.11. A plot of a level surfaces for \(g(x,y,z)=x^2+y^2+z^2\) with the option to plot gradient vectors for some points on the level surface
It may be a bit weird to think that all three of these surfaces are a level surface of \(g\) where the algebraic form of \(\nabla g\) is not changing. If you select the checkbox in Figure 11.8.11 to plot gradient vectors at points along your level surface, you will see that the gradient vectors will be perpendicular to the level surface. You can use the slider to change the value of the level surface, which will also change the shape of the level surface when you go from positive to negative or viceversa.
Returning to the function \(g(x,y,z)=x^2+y^2-z^2\text{,}\) we can ask “For an input point \((a,b,c)\text{,}\) in what direction will the output of \(g\) be increasing at the greatest rate?” We can group the output of \(g\) into two terms \(x^2+y^2\) which increases as you move away from the \(z\)-axis and \(-z^2\) which increases as you get closer to the \(xy\)-plane (\(z=0\)). An input point of \((a,b,c)\) for the gradient vector gives \(\nabla g (a,b,c)=\langle 2a,2b,-2c\rangle\text{.}\) Notice that for any point in our space, this gradient vector will point away from the \(z\)-axis and toward the \(xy\)-plane, as demonstrated by the red vectors in Figure 11.8.11. Note that our arguments are rotationally symmetric about the \(z\)-axis.
We can verify Key Idea 11.8.6 by looking at tangent points for a point on these level surfaces. Let \(S_k\) be the level surface with value k, \(g(x,y,z)=1=x^2+y^2-z^2\) where \(P_k=(-1,1,\sqrt{2-k})\) is on \(S_k\) and \(\nabla g(P_k)=\langle -2,2,-2\sqrt{2-k}\rangle\text{.}\) So by Key Idea 11.8.6, the tangent plane to \(S_k\) at \(P_k\) will be given by
\begin{equation*} (-2)(x+1)+(2)(y-1)+(-2\sqrt{2-k})(z-\sqrt{2-k})=0 \end{equation*}
This point, the gradient vector (drawn at half length), and tangent plane are shown in red for Figure 11.8.12.
Figure 11.8.12.
You can use the slider to change the value of \(k\) using the slider at the top of Figure 11.8.12 to see how even though the shape of the level surface changes, the gradient vector at \(P_k\) will still be orthogonal to the surface and will serve as a normal vector for our tangent plane.

Activity 11.8.3.
In this activity, we will look at the calculation and interpretation of the gradient for \(f(x,y,z)=x+y-z\) and \(g(x,y,z)=z-x^2-y^2\text{.}\)
(a)
Calculate \(\nabla f\) and \(\nabla g\text{.}\)
(b)
Draw the level surfaces of \(f\) for the values \(k=\{-2,-1,0,1,2\}\text{.}\) Write a few sentences about the shape of each of these level surfaces and describe how the level surfaces is changing in terms of the value of \(k\text{.}\)
(c)
Write a few sentences about how the direction and magnitude of \(\nabla f\) is related to the level surfaces from the previous task.
(d)
Draw the level surfaces of \(g\) for the values \(k=\{-2,-1,0,1,2\}\text{.}\) Write a few sentences about the shape of each of these level surfaces and describe how the level surfaces are changing in terms of the value of \(k\text{.}\) Note here that each of the level surfaces can be expressed with \(z\) as a function of \(x\) and \(y\text{.}\)
(e)
Write a few sentences about how the direction and magnitude of \(\nabla g\) is related to the level surfaces from the previous task.
The level surfaces of the function \(g(x)=z-x^2-y^2\) from the previous activity were of the form \(z=x^2+y^2+C\) for some constant \(C\text{,}\) which meant that the gradient of \(g\) gives a convenient way of calculating a vector that will be perpendicular to the surface \(z=x^2+y^2+C\text{.}\) In fact, if we have a surface of the form \(z=h(x,y)\text{,}\) then the same surface will be a level surface of the three variable function \(g(x,y,z)=z-h(x,y)\text{.}\)

Subsection 11.8.6 Summary

  • The set of points \((x,y,z)\) for which a function of three variables, \(f(x,y,z)\text{,}\) has a constant output, \(k\text{,}\) is called the level surface and a implicit equation of the level surface is \(f(x,y,z)=k\text{.}\)
  • The partial derivatives for functions of functions three or more variables are calculated by measuring the rate of change in one input variable while holding all other inputs constant. The gradient of a function of three or more variables is a vector-valued, multivariable function where each component is the first partial derivative of with respect to a different coordinate. If \(g(x_1,x_2, \ldots,x_n)\text{,}\) then the gradient of \(g\) has \(n\) components and is given by \(\nabla g = \left\langle \frac{\partial g}{\partial x_1}, \frac{\partial g}{\partial x_2},\ldots,\frac{\partial g}{\partial x_m}\right\rangle\text{.}\)
  • The directional derivative of a function of three or more variables measures the rate of change of the output when the input variables are changed in a particular direction and can be calculated by \(Dg_{\vu}(P)=\nabla g(P) \cdot \vu\text{.}\)
  • The gradient of a multivariable function \(g\) at an input \(P\) points in the direction of greatest rate of increase for the output of \(g\text{,}\) which also means that the gradient at \(P\text{,}\) \(\nabla g(P)\) will be perpendicular to the level surface corresponding to the value \(k=g(P)\text{.}\) The direction opposite of the gradient, \(-\nabla g (P)\text{,}\) will be the direction of greatest rate of decrease at \(P\text{.}\) The greatest rate of increase and decrease are \(\vecmag{\nabla g(P)}\) and \(-\vecmag{\nabla g(P)}\text{,}\) respectively.

Exercises 11.8.7 Exercises

1.

Find the first partial derivatives of \(f(x,y,z) = z \ \arctan(\frac{y}{x})\) at the point (4, 4, 4).
A. \(\frac{\partial f}{\partial x}(4, 4, 4) =\)
B. \(\frac{\partial f}{\partial y}(4, 4, 4) =\)
C. \(\frac{\partial f}{\partial z}(4, 4, 4) =\)

2.

Your monthly car payment in dollars is \(P = f(P_0,t,r)\text{,}\) where $\(P_0\) is the amount you borrowed, \(t\) is the number of months it takes to pay off the loan, and \(r\) percent is the interest rate.
(a) Is \(\partial P /\partial t\) positive or negative?
Suppose that your bank tells you that the magnitude of \(\partial P /\partial t\) is 40.
What are the units of this value?
(For this problem, write our your units in full, writing dollars for $, months for months, percent for %, etc. Note that fractional units generally have a plural numerator and singular denominator.)
(b) Is \(\partial P /\partial r\) positive or negative?
Suppose that your bank tells you that the magnitude of \(\partial P /\partial r\) is 15.
What are the units of this value?
(For this problem, write our your units in full, writing dollars for $, months for months, percent for %, etc. Note that fractional units generally have a plural numerator and singular denominator.)
For both parts of this problem, be sure you can explain what the practical meanings of the partial derivatives are.

3.

Consider the surface \(x^2-y^2+z^2=4\text{.}\)
  1. View the surface as a level surface for a function \(f(x,y,z)\) and find a normal vector to the surface at the point \((-1,1,2)\text{.}\)
  2. Now, find an equation for the tangent plane to the surface at \((-1,1.2)\text{.}\)

4.

Find the equation of the tangent plane to the surface given by \(xz+2x^2y+y^2z^3=11\) at the point \((2,1,1)\text{.}\)

5.

Suppose that \(\nabla f_P =\langle 2,-4,4\rangle\text{.}\) Is \(f\) increasing or decreasing at \(P\) in the direction \(\langle2,1,3\rangle\text{?}\)

6.

Find the derivative of the function at the given point in the direction of the vector \(\vec v\text{.}\)
  1. \(f(x,y)=e^x\sin(y)\) at the point \((0,\pi/3)\) in the direction \(\vec v = \langle-6,8\rangle\)
  2. \(g(r,s)=\tan^{-1}(rs)\) at the point \((1,2)\) in the direction \(\vec v = \langle5 , 10 \rangle\)
  3. \(h(r,s,t)=\ln(3r+6s+9t)\) at the point \((1,1,1)\) in the direction \(\vec v = \langle4,12,6\rangle\)