Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

Directional Derivatives and the Gradient

( \newcommand{\kernel}{\mathrm{null}\,}\)

In Partial Derivatives, we introduced the partial derivative. A function z=f(x,y) has two partial derivatives: z/x and z/y. These derivatives correspond to each of the independent variables and can be interpreted as instantaneous rates of change (that is, as slopes of a tangent line). For example, z/x represents the slope of a tangent line passing through a given point on the surface defined by z=f(x,y), assuming the tangent line is parallel to the x-axis. Similarly, z/y represents the slope of the tangent line parallel to the y-axis. Now we consider the possibility of a tangent line parallel to neither axis.

Directional Derivatives

We start with the graph of a surface defined by the equation z=f(x,y). Given a point (a,b) in the domain of f, we choose a direction to travel from that point. We measure the direction using an angle θ, which is measured counterclockwise in the xy-plane, starting at zero from the positive x-axis (Figure 1). The distance we travel is h and the direction we travel is given by the unit vector u=(cosθ)ˆi+(sinθ)ˆj. Therefore, the z-coordinate of the second point on the graph is given by z=f(a+hcosθ,b+hsinθ).

imageedit_1_5277199439.jpg
Figure 1: Finding the directional derivative at a point on the graph of z=f(x,y). The slope of the blue arrow on the graph indicates the value of the directional derivative at that point.

We can calculate the slope of the secant line by dividing the difference in z-values by the length of the line segment connecting the two points in the domain. The length of the line segment is h. Therefore, the slope of the secant line is

msec=f(a+hcosθ,b+hsinθ)f(a,b)h

To find the slope of the tangent line in the same direction, we take the limit as h approaches zero.

Definition: Directional Derivatives

Suppose z=f(x,y) is a function of two variables with a domain of D. Let (a,b)D and define u=(cosθ)ˆi+(sinθ)ˆj. Then the directional derivative of f in the direction of u is given by

Duf(a,b)=limh0f(a+hcosθ,b+hsinθ)f(a,b)h

provided the limit exists.

Equation ??? provides a formal definition of the directional derivative that can be used in many cases to calculate a directional derivative.

Note that since the point (a,b) is chosen randomly from the domain D of the function f, we can use this definition to find the directional derivative as a function of x and y.

That is,

Duf(x,y)=limh0f(x+hcosθ,y+hsinθ)f(x,y)h

Example 1: Finding a Directional Derivative from the Definition

Let θ=arccos(3/5). Find the directional derivative Duf(x,y) of f(x,y)=x2xy+3y2 in the direction of u=(cosθ)ˆi+(sinθ)ˆj.

Then determine Duf(1,2).

Solution

First of all, since cosθ=3/5 and θ is acute, this implies

sinθ=1(35)2=1625=45.

Using f(x,y)=x2xy+3y2, we first calculate f(x+hcosθ,y+hsinθ):

f(x+hcosθ,y+hsinθ)=(x+hcosθ)2(x+hcosθ)(y+hsinθ)+3(y+hsinθ)2=x2+2xhcosθ+h2cos2θxyxhsinθyhcosθh2sinθcosθ+3y2+6yhsinθ+3h2sin2θ=x2+2xh(35)+9h225xy4xh53yh512h225+3y2+6yh(45)+3h2(1625)=x2xy+3y2+2xh5+9h25+21yh5.

We substitute this expression into Equation ??? with a=x and b=y:

Duf(x,y)=limh0f(x+hcosθ,y+hsinθ)f(x,y)h=limh0(x2xy+3y2+2xh5+9h25+21yh5)(x2xy+3y2)h=limh02xh5+9h25+21yh5h=limh02x5+9h5+21y5=2x+21y5.

To calculate Duf(1,2), we substitute x=1 and y=2 into this answer (Figure 2):

Duf(1,2)=2(1)+21(2)5=2+425=8.

imageedit_5_4440389145.png
Figure 2: Finding the directional derivative in a given direction u at a given point on a surface. The plane is tangent to the surface at the given point (1,2,15).

An easier approach to calculating directional derivatives that involves partial derivatives is outlined in the following theorem.

Theorem 1: Directional Derivative of a Function of Two Variables

Let z=f(x,y) be a function of two variables x and y, and assume that fx and fy exist. Then the directional derivative of f in the direction of u=(cosθ)ˆi+(sinθ)ˆj is given by

Duf(x,y)=fx(x,y)cosθ+fy(x,y)sinθ.

Proof

Applying the definition of a directional derivative stated above in Equation ???, the directional derivative of f in the direction of u=(cosθ)ˆi+(sinθ)ˆj at a point (x0,y0) in the domain of f can be written

Duf((x0,y0))=limt0f(x0+tcosθ,y0+tsinθ)f(x0,y0)t.

Let x=x0+tcosθ and y=y0+tsinθ, and define g(t)=f(x,y). Since fx and fy both exist, we can use the chain rule for functions of two variables to calculate g(t):

g(t)=fxdxdt+fydydt=fx(x,y)cosθ+fy(x,y)sinθ.

If t=0, then x=x0 and y=y0, so

g(0)=fx(x0,y0)cosθ+fy(x0,y0)sinθ

By the definition of g(t), it is also true that

g(0)=limt0g(t)g(0)t=limt0f(x0+tcosθ,y0+tsinθ)f(x0,y0)t.

Therefore, Duf(x0,y0)=fx(x0,y0)cosθ+fy(x0,y0)sinθ.

Since the point (x0,y0) is an arbitrary point from the domain of f, this result holds for all points in the domain of f for which the partials fx and fy exist.

Therefore, Duf(x,y)=fx(x,y)cosθ+fy(x,y)sinθ.

Example 2: Finding a Directional Derivative: Alternative Method

Let θ=arccos(3/5). Find the directional derivative Duf(x,y) of f(x,y)=x2xy+3y2 in the direction of u=(cosθ)ˆi+(sinθ)ˆj.

Then determine Duf(1,2).

Solution

First, we must calculate the partial derivatives of f:

fx(x,y)=2xyfy(x,y)=x+6y,

Then we use Equation ??? with θ=arccos(3/5):

Duf(x,y)=fx(x,y)cosθ+fy(x,y)sinθ=(2xy)35+(x+6y)45=6x53y54x5+24y5=2x+21y5.

To calculate Duf(1,2), let x=1 and y=2:

Duf(1,2)=2(1)+21(2)5=2+425=8.

This is the same answer obtained in Example 1.

Exercise 1:

Find the directional derivative Duf(x,y) of f(x,y)=3x2y4xy3+3y24x in the direction of u=(cosπ3)ˆi+(sinπ3)ˆj using Equation ???.

What is Duf(3,4)?

Hint

Calculate the partial derivatives and determine the value of θ.

Answer

Duf(x,y)=(6xy4y34)(1)2+(3x212xy2+6y)32

Duf(3,4)=7225642+(27576+24)32=9452532

If the vector that is given for the direction of the derivative is not a unit vector, then it is only necessary to divide by the norm of the vector. For example, if we wished to find the directional derivative of the function in Example 2 in the direction of the vector 5,12, we would first divide by its magnitude to get u. This gives us u=513,1213.

Then

Duf(x,y)=fx(x,y)cosθ+fy(x,y)sinθ=513(2xy)+1213(x+6y)=2213x+1713y

Gradient

The right-hand side of Equation ??? is equal to fx(x,y)cosθ+fy(x,y)sinθ, which can be written as the dot product of two vectors. Define the first vector as f(x,y)=fx(x,y)ˆi+fy(x,y)ˆj and the second vector as u=(cosθ)ˆi+(sinθ)ˆj. Then the right-hand side of the equation can be written as the dot product of these two vectors:

Duf(x,y)=f(x,y)u.

The first vector in Equation ??? has a special name: the gradient of the function f. The symbol is called nabla and the vector f is read “del f.”

Definition: The Gradient

Let z=f(x,y) be a function of x and y such that fx and fy exist. The vector f(x,y) is called the gradient of f and is defined as

f(x,y)=fx(x,y)ˆi+fy(x,y)ˆj.

The vector f(x,y) is also written as “grad f.”

Example 3: Finding Gradients

Find the gradient f(x,y) of each of the following functions:

  1. f(x,y)=x2xy+3y2
  2. f(x,y)=sin3xcos3y

Solution

For both parts a. and b., we first calculate the partial derivatives fx and fy, then use Equation ???.

a. fx(x,y)=2xy and fy(x,y)=x+6y, so

f(x,y)=fx(x,y)ˆi+fy(x,y)ˆj=(2xy)ˆi+(x+6y)ˆj.

b. fx(x,y)=3cos3xcos3y and fy(x,y)=3sin3xsin3y, so

f(x,y)=fx(x,y)ˆi+fy(x,y)ˆj=(3cos3xcos3y)ˆi(3sin3xsin3y)ˆj.

Exercise 2

Find the gradient f(x,y) of f(x,y)=x23y22x+y.

Hint

Calculate the partial derivatives, then use Equation ???.

Answer

f(x,y)=2x2+2xy+6y2(2x+y)2ˆix2+12xy+3y2(2x+y)2ˆj

The gradient has some important properties. We have already seen one formula that uses the gradient: the formula for the directional derivative. Recall from The Dot Product that if the angle between two vectors a and b is φ, then ab=abcosφ. Therefore, if the angle between f(x0,y0) and u=(cosθ)ˆi+(sinθ)ˆj is φ, we have

Duf(x0,y0)=f(x0,y0)u=f(x0,y0)ucosφ=f(x0,y0)cosφ.

The u disappears because u is a unit vector. Therefore, the directional derivative is equal to the magnitude of the gradient evaluated at (x0,y0) multiplied by cosφ. Recall that cosφ ranges from 1 to 1.

If φ=0, then cosφ=1 and f(x0,y0) and u both point in the same direction.

If φ=π, then cosφ=1 and f(x0,y0) and u point in opposite directions.

In the first case, the value of Duf(x0,y0) is maximized and in the second case, the value of Duf(x0,y0) is minimized.

We can also see that if f(x0,y0)=0, then

Duf(x0,y0)=f(x0,y0)u=0

for any vector u. These three cases are outlined in the following theorem.

Theorem 2: Properties of the Gradient

Suppose the function z=f(x,y) is differentiable at (x0,y0) (Figure 3).

  1. If f(x0,y0)=0, then Duf(x0,y0)=0 for any unit vector u.
  2. If f(x0,y0)0, then Duf(x0,y0) is maximized when u points in the same direction as f(x0,y0). The maximum value of Duf(x0,y0) is f(x0,y0).
  3. If f(x0,y0)0, then Duf(x0,y0) is minimized when u points in the opposite direction from f(x0,y0). The minimum value of Duf(x0,y0) is f(x0,y0).
CNX_Calc_Figure_14_06_007.jpg
Figure 3: The gradient indicates the maximum and minimum values of the directional derivative at a point.

Note: Gradient indicates direction of steepest ascent

Since the gradient vector points in the direction within the domain of f that corresponds to the maximum value of the directional derivative, Duf(x0,y0), we say that the gradient vector points in the direction of steepest ascent or most rapid increase in f, that is, at any given point, the gradient points in the direction with the steepest uphill slope.

Example 4: Finding a Maximum Directional Derivative

Find the direction for which the directional derivative of f(x,y)=3x24xy+2y2 at (2,3) is a maximum. What is the maximum value?

Solution:

The maximum value of the directional derivative occurs when f and the unit vector point in the same direction. Therefore, we start by calculating f(x,y):

fx(x,y)=6x4yandfy(x,y)=4x+4y

so

f(x,y)=fx(x,y)ˆi+fy(x,y)ˆj=(6x4y)ˆi+(4x+4y)ˆj.

Next, we evaluate the gradient at (2,3):

f(2,3)=(6(2)4(3))ˆi+(4(2)+4(3))ˆj=24ˆi+20ˆj.

The gradient vector gives the direction of the maximum value of the directional derivative.

The maximum value of the directional derivative at (2,3) is f(2,3)=461 (see the Figure 4).

imageedit_12_8013635296.png
Figure 4: The maximum value of the directional derivative at (2,3) is in the direction of the gradient.

Exercise 3:

Find the direction for which the directional derivative of g(x,y)=4xxy+2y2 at (2,3) is a maximum. What is the maximum value?

Hint

Evaluate the gradient of g at point (2,3).

Answer

The gradient of g at (2,3) is g(2,3)=ˆi+14ˆj. This gives the direction of the maximum value of the directional derivative at the point (2,3).

The maximum value of the directional derivative is g(2,3)=197.

Figure 5 shows a portion of the graph of the function f(x,y)=3+sinxsiny. Given a point (a,b) in the domain of f, the maximum value of the directional derivative at that point is given by f(a,b). This would equal the rate of greatest ascent if the surface represented a topographical map. If we went in the opposite direction, it would be the rate of greatest descent.

CNX_Calc_Figure_14_06_002.jpg
Figure 5: A typical surface in R3. Given a point on the surface, the directional derivative can be calculated using the gradient.

When using a topographical map, the steepest slope is always in the direction where the contour lines are closest together (Figure 6). This is analogous to the contour map of a function, assuming the level curves are obtained for equally spaced values throughout the range of that function.

CNX_Calc_Figure_14_06_003.jpg
Figure 6: Contour map for the function f(x,y)=x2y2 using level values between 5 and 5.

Gradients and Level Curves

Recall that if a curve is defined parametrically by the function pair (x(t),y(t)), then the vector x(t)ˆi+y(t)ˆj is tangent to the curve for every value of t in the domain. Now let’s assume z=f(x,y) is a differentiable function of x and y, and (x0,y0) is in its domain. Let’s suppose further that x0=x(t0) and y0=y(t0) for some value of t, and consider the level curve f(x,y)=k. Define g(t)=f(x(t),y(t)) and calculate g(t) on the level curve. By the chain Rule,

g(t)=fx(x(t),y(t))x(t)+fy(x(t),y(t))y(t).

But g(t)=0 because g(t)=k for all t. Therefore, on the one hand,

fx(x(t),y(t))x(t)+fy(x(t),y(t))y(t)=0;

on the other hand,

fx(x(t),y(t))x(t)+fy(x(t),y(t))y(t)=f(x,y)x(t),y(t).

Therefore,

f(x,y)x(t),y(t)=0.

Thus, the dot product of these vectors is equal to zero, which implies they are orthogonal. However, the second vector is tangent to the level curve, which implies the gradient must be normal to the level curve, which gives rise to the following theorem.

Theorem 3: Gradient Is Normal to the Level Curve

Suppose the function z=f(x,y) has continuous first-order partial derivatives in an open disk centered at a point (x0,y0). If f(x0,y0)0, then f(x0,y0) is normal to the level curve of f at (x0,y0).

We can use this theorem to find tangent and normal vectors to level curves of a function.

Example 5: Finding Tangents to Level Curves

For the function f(x,y)=2x23xy+8y2+2x4y+4, find a tangent vector to the level curve at point (2,1). Graph the level curve corresponding to f(x,y)=18 and draw in f(2,1) and a tangent vector.

Solution:

First, we must calculate f(x,y):

fx(x,y)=4x3y+2andfy=3x+16y4sof(x,y)=(4x3y+2)ˆi+(3x+16y4)ˆj.

Next, we evaluate f(x,y) at (2,1):

f(2,1)=(4(2)3(1)+2)ˆi+(3(2)+16(1)4)ˆj=9ˆi+18ˆj.

This vector is orthogonal to the curve at point (2,1). We can obtain a tangent vector by reversing the components and multiplying either one by 1. Thus, for example, 18ˆi9ˆj is a tangent vector (see the following graph).

imageedit_15_4877302885.png
Figure 7: Tangent and normal vectors to 2x23xy+8y2+2x4y+4=18 at point (2,1).

Exercise 4:

For the function f(x,y)=x22xy+5y2+3x2y+3, find the tangent to the level curve at point (1,1). Draw the graph of the level curve corresponding to f(x,y)=8 and draw f(1,1) and a tangent vector.

Hint

Calculate the gradient at point (1,1).

Answer

f(x,y)=(2x2y+3)ˆi+(2x+10y2)ˆj

f(1,1)=3ˆi+6ˆj

Tangent vector: 6ˆi3ˆj or 6ˆi+3ˆj

imageedit_18_6194780960.png

The fact that the gradient of a surface always points in the direction of steepest increase/decrease is very useful, as illustrated in the following example.

Example 6: The flow of water downhill

Consider the surface given by f(x,y)=20x22y2. Water is poured on the surface at (1,14). What path does it take as it flows downhill?

SOLUTION

Let r(t)=x(t),y(t) be the vector--valued function describing the path of the water in the xy-plane; we seek x(t) and y(t). We know that water will always flow downhill in the steepest direction; therefore, at any point on its path, it will be moving in the direction of f. (We ignore the physical effects of momentum on the water.) Thus r(t) will be parallel to f, and there is some constant c such that cf(t)=r(t)=x(t),y(t).

We find f(x,y)=2x,4y and write x(t) as dxdt and y(t) as dydt. Then

cf(t)=x(t),y(t)2cx,4cy=dxdt,dydt.

This implies

2cx=dxdtand4cy=dydt, i.e.,

c=12xdxdtandc=14ydydt.

As c equals both expressions, we have

14ydydt=12xdxdt.

To find an explicit relationship between x and y, we can integrate both sides with respect to t. Recall from our study of differentials that dxdtdt=dx. Thus:

14ydydt dt=12xdxdt dt14y dy=12x dx14ln|y|=12ln|x|+C1ln|y|=2ln|x|+C1ln|y|=ln|x2|+C1

Now raise both sides as a power of e:

|y|=eln|x2|+C1|y|=elnx2eC1y=±eC1x2

Then y=Cx2,whereC=±eC1orC=0.

As the water started at the point (1,14), we can now solve for C:
C(1)2=14C=14.

12.19.PNG
Figure 8: A graph of the surface along with the path in the xy-plane with the level curves.


Thus the water follows the curve y=x24 in the xy-plane. The surface and the path of the water is graphed in Figure 8. In part (b) of the figure, the level curves of the surface are plotted in the xy-plane, along with the curve y=x24. Notice how the path intersects the level curves at right angles. As the path follows the gradient downhill, this reinforces the fact that the gradient is orthogonal to level curves.

Three-Dimensional Gradients and Directional Derivatives

The definition of a gradient can be extended to functions of more than two variables.

Definition: Gradients in 3D

Let w=f(x,y,z) be a function of three variables such that fx,fy, and fz exist. The vector f(x,y,z) is called the gradient of f and is defined as

f(x,y,z)=fx(x,y,z)ˆi+fy(x,y,z)ˆj+fz(x,y,z)ˆk.

f(x,y,z) can also be written as grad f(x,y,z).

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 fx,fy, and fz, and then we use Equation ???.

Example 7: Finding Gradients in Three Dimensions

Find the gradient f(x,y,z) of each of the following functions:

  1. f(x,y,z)=5x22xy+y24yz+z2+3xz
  2. f(x,y,z)=e2zsin2xcos2y

Solution:

For both parts a. and b., we first calculate the partial derivatives fx,fy, and fz, then use Equation ???.

a. fx(x,y,z)=10x2y+3z, fy(x,y,z)=2x+2y4z, and fz(x,y,z)=3x4y+2z, so

f(x,y,z)=fx(x,y,z)ˆi+fy(x,y,z)ˆj+fz(x,y,z)ˆk=(10x2y+3z)ˆi+(2x+2y4z)ˆj+(3x4y+2z)ˆk.

b. fx(x,y,z)=2e2zcos2xcos2y, fy(x,y,z)=2e2zsin2xsin2y, and fz(x,y,z)=2e2zsin2xcos2y, so

f(x,y,z)=fx(x,y,z)ˆi+fy(x,y,z)ˆj+fz(x,y,z)ˆk=(2e2zcos2xcos2y)ˆi+(2e2zsin2xsin2y)ˆj+(2e2zsin2xcos2y)ˆk=2e2z(cos2xcos2yˆisin2xsin2yˆjsin2xcos2yˆk).

Exercise 5:

Find the gradient f(x,y,z) of f(x,y,z)=x23y2+z22 and find its gradient vector at the point (1,2,3).

Answer

f(x,y,z)=xˆi3yˆj+zˆk
f(1,2,3)=ˆi6ˆj+3ˆk

Theorem 4: The Gradient of a Function of Three Variables is Normal to the Level Surface

Suppose the function z=f(x,y,z) has continuous first-order partial derivatives in an open sphere centered at a point (x0,y0,z0). If f(x0,y0,z0)0, then f(x0,y0,z0) is normal to the level surface of f at (x0,y0,z0).

Figure 9 shows the gradient vectors at various points on a level surface of the function in Exercise 5. The points shown on the level surface are: (1,2,3), (3,2,1), (0,23,0), (2,103,2), and (2,103,2).

Figure 9: A level surface of the function f(x,y,z)=x23y2+z22 for C=1 along with various points on this level surface and the corresponding gradient vectors. Note how these gradient vectors are normal to this level surface.

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 u in standard form (i.e., the initial point is at the origin), this vector forms three different angles with the positive x-, y-, and z-axes. Let’s call these angles α,β, and γ. Then the directional cosines are given by cosα,cosβ, and cosγ. These are the components of the unit vector u; since u is a unit vector, it is true that cos2α+cos2β+cos2γ=1.

Definition: Directional Derivative of a Function of Three variables

Suppose w=f(x,y,z) is a function of three variables with a domain of D. Let (x0,y0,z0)D and let u=cosαˆi+cosβˆj+cosγˆk be a unit vector. Then, the directional derivative of f in the direction of u is given by

Duf(x0,y0,z0)=limt0f(x0+tcosα,y0+tcosβ,z0+tcosγ)f(x0,y0,z0)t

provided 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 Equation ???.

Theorem \(\PageIndex{5}): Directional Derivative of a Function of Three Variables

Let f(x,y,z) be a differentiable function of three variables and let u=cosαˆi+cosβˆj+cosγˆk be a unit vector. Then, the directional derivative of f in the direction of u is given by

Duf(x,y,z)=f(x,y,z)u=fx(x,y,z)cosα+fy(x,y,z)cosβ+fz(x,y,z)cosγ.

The three angles α,β, and γ determine the unit vector u. In practice, we can use an arbitrary (nonunit) vector, then divide by its magnitude to obtain a unit vector in the desired direction.

Example 8: Finding a Directional Derivative in Three Dimensions

Calculate Dvf(1,2,3) in the direction of v=ˆi+2ˆj+2ˆk for the function

f(x,y,z)=5x22xy+y24yz+z2+3xz.

Solution:

First, we find the magnitude of v:

v=(1)2+(2)2=3.

Therefore, vv=ˆi+2ˆj+2ˆk3=13ˆi+23ˆj+23ˆk is a unit vector in the direction of v, so cosα=13,cosβ=23, and cosγ=23. Next, we calculate the partial derivatives of f:

fx(x,y,z)=10x2y+3zfy(x,y,z)=2x+2y4zfz(x,y,z)=4y+2z+3x,

then substitute them into Equation ???:

Dvf(x,y,z)=fx(x,y,z)cosα+fy(x,y,z)cosβ+fz(x,y,z)cosγ=(10x2y+3z)(13)+(2x+2y4z)(23)+(4y+2z+3x)(23)=10x3+2y33z34x3+4y38z38y3+4z3+6x3=8x32y37z3.

Last, to find Dvf(1,2,3), we substitute x=1,y=2, and z=3:

Dvf(1,2,3)=8(1)32(2)37(3)3=83+43213=253.

Exercise 6:

Calculate Dvf(x,y,z) and Dvf(0,2,5) in the direction of v=3ˆi+12ˆj4ˆk for the function

f(x,y,z)=3x2+xy2y2+4yzz2+2xz.

Hint

First, divide v by its magnitude, calculate the partial derivatives of f, then use Equation ???.

Answer

Dvf(x,y,z)=313(6x+y+2z)+1213(x4y+4z)413(2x+4y2z)

Dvf(0,2,5)=38413

Summary

  • A directional derivative represents a rate of change of a function in any given direction.
  • The gradient can be used in a formula to calculate the directional derivative.
  • The gradient indicates the direction of greatest change of a function of more than one variable.

Key Equations

  • directional derivative (two dimensions)

Duf(a,b)=limh0f(a+hcosθ,b+hsinθ)f(a,b)h

or

Duf(x,y)=fx(x,y)cosθ+fy(x,y)sinθ

or

Duf(x,y)=f(x,y)u, where u is a unit vector in the xy-plane

  • gradient (two dimensions)

f(x,y)=fx(x,y)ˆi+fy(x,y)ˆj

  • gradient (three dimensions)

f(x,y,z)=fx(x,y,z)ˆi+fy(x,y,z)ˆj+fz(x,y,z)ˆk

  • directional derivative (three dimensions)

Duf(x,y,z)=f(x,y,z)u=fx(x,y,z)cosα+fy(x,y,z)cosβ+fx(x,y,z)cosγ

Glossary

directional derivative

the derivative of a function in the direction of a given unit vector

gradient

the gradient of the function f(x,y) is defined to be f(x,y)=(f/x)ˆi+(f/y)ˆj, which can be generalized to a function of any number of independent variables

Contributors

  • Gilbert Strang (MIT) and Edwin “Jed” Herman (Harvey Mudd) with many contributing authors. This content by OpenStax is licensed with a CC-BY-SA-NC 4.0 license. Download for free at http://cnx.org.

  • Example 6 is adapted from Apex Calculus by Gregory Hartman (Virginia Military Institute)
  • Edited and expanded by Paul Seeburger (Monroe Community College)

This page titled Directional Derivatives and the Gradient is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by OpenStax.

Support Center

How can we help?