Learning Objectives
- Calculate directional derivatives and gradients in three dimensions.
The definition of a gradient can be extended to functions of more than two variables.
Definition
Let be a function of three variables such that , , and exist. The vector is called the gradient of and is defined as
can also be written as .
Calculating the gradient of a function in three variables is very similar to calculating the gradient of a function in two variables. First, we calculate the partial derivatives , , and , and then we use the Equation for .
Example: finding gradients in three dimensions
Find the gradient of each of the following functions:
a.
b.
Try it
Find the gradient of .
Watch the following video to see the worked solution to the above Try It
>The directional derivative can also be generalized to functions of three variables. To determine a direction in three dimensions, a vector with three components is needed. This vector is a unit vector, and the components of the unit vector are called directional cosines. Given a three-dimensional unit vector in standard form (i.e., the initial point is at the origin), this vector forms three different angles with the positive and axes. Let’s call these angles and . Then the directional cosines are given by and . These are the components of the unit vector ; since is a unit vector, it is true that .
Definition
Suppose is a function of three variables with a domain of , Let and let be a unit vector. Then, the directional derivative of in the direction of is given by
providing the limit exists.
We can calculate the directional derivative of a function of three variables by using the gradient, leading to a formula that is analogous to the dot product definition of the Directional Derivative of a Function of Two Variables.
Theorem: Directional derivative of a function of three variables
Let be a differentiable function of three variables and let be a unit vector. Then, the directional derivative of in the direction of is given by
[latex]\hspace{6cm}\begin{align}
D_{\bf{u}}f(x,y,z)&=\nabla{f}(x,y,z)\cdot{\bf{u}} \\ &=f_x(x,y,z)\cos\alpha+f_y(x,y,z)\cos\beta+f_z(x,y,z)\cos\gamma. \end{align}[/latex]
The three angles , and determine the unit vector . In practice, we can use an arbitrary (nonunit) vector, then divide by its magnitude to obtain a unit vector in the desired direction.
Example: finding a directional derivative in three dimensions
Calculate in the direction of for the function
.
Try it
Calculate and in the direction of for the function .
Watch the following video to see the worked solution to the above Try It
Candela Citations
- CP 4.32. Authored by: Ryan Melton. License: CC BY: Attribution
- CP 4.33. Authored by: Ryan Melton. License: CC BY: Attribution
- Calculus Volume 3. Authored by: Gilbert Strang, Edwin (Jed) Herman. Provided by: OpenStax. Located at: https://openstax.org/books/calculus-volume-3/pages/1-introduction. License: CC BY-NC-SA: Attribution-NonCommercial-ShareAlike. License Terms: Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction