The Gradient

If f (x1, x2,…, xn) is a scalar function of n variables, then the vector

$\displaystyle \left(\vphantom{ \dfrac{\partial f}{\partial x_{1}}\left( c_{1},c...
...c{\partial f}{\partial x_{n1}}\left(
c_{1},c_{2},\ldots ,c_{n}\right) }\right.$$\displaystyle {\dfrac{{\partial f}}{{\partial x_{1}}}}$$\displaystyle \left(\vphantom{ c_{1},c_{2},\ldots
,c_{n}}\right.$c1, c2,…, cn$\displaystyle \left.\vphantom{ c_{1},c_{2},\ldots
,c_{n}}\right)$,$\displaystyle {\dfrac{{\partial f}}{{\partial x_{2}}}}$$\displaystyle \left(\vphantom{ c_{1},c_{2},\ldots
,c_{n}}\right.$c1, c2,…, cn$\displaystyle \left.\vphantom{ c_{1},c_{2},\ldots
,c_{n}}\right)$,…,$\displaystyle {\dfrac{{\partial f}}{{\partial x_{n1}}}}$$\displaystyle \left(\vphantom{ c_{1},c_{2},\ldots
,c_{n}}\right.$c1, c2,…, cn$\displaystyle \left.\vphantom{ c_{1},c_{2},\ldots
,c_{n}}\right)$$\displaystyle \left.\vphantom{ \dfrac{\partial f}{\partial x_{1}}\left( c_{1},c...
...c{\partial f}{\partial x_{n1}}\left(
c_{1},c_{2},\ldots ,c_{n}\right) }\right)$

is the gradient of f at the point $\left(\vphantom{
c_{1},c_{2},\ldots ,c_{n}}\right.$c1, c2,…, cn$\left.\vphantom{
c_{1},c_{2},\ldots ,c_{n}}\right)$ and is denoted ∇f. For n = 3, the vector ∇f at $\left(\vphantom{ a,b,c}\right.$a, b, c$\left.\vphantom{ a,b,c}\right)$ is normal to the level surface f (x, y, z) = f (a, b, c) at the point $\left(\vphantom{ a,b,c}\right.$a, b, c$\left.\vphantom{ a,b,c}\right)$.

$\blacktriangleright$ To compute the gradient of the function f (x, y, z) = xyz

$\blacktriangleright$ Evaluate

xyz = $\left(\vphantom{ yz,xz,xy}\right.$yz, xz, xy$\left.\vphantom{ yz,xz,xy}\right)$ 

You can also operate on the function value after defining the function. For example, if f is defined by the equation f (x, y, z) = xyz , then you can evaluate f (x, y, z).


$\blacktriangleright$ Evaluate

f (x, y, z) = $\left(\vphantom{ yz,xz,xy}\right.$yz, xz, xy$\left.\vphantom{ yz,xz,xy}\right)$ 

Since gradients can be calculated for scalar functions of n arbitrary variables, the gradient operator uses all the variables that appear in the function, assuming that the variables are ordered lexicographically. For this reason, you may have to edit the result if you are representing arbitrary constants with letters. In the following example, if c is a constant parameter, take the answer

$\blacktriangleright$ Evaluate

$\left(\vphantom{ cuv+v^{2}w}\right.$cuv + v2w$\left.\vphantom{ cuv+v^{2}w}\right)$ = $\left(\vphantom{ uv,cv,cu+2vw,v^{2}}\right.$uv, cv, cu + 2vw, v2$\left.\vphantom{ uv,cv,cu+2vw,v^{2}}\right)$

and delete the first entry to get

$\left(\vphantom{ cuv+v^{2}w}\right.$cuv + v2w$\left.\vphantom{ cuv+v^{2}w}\right)$ = $\left(\vphantom{ cv,cu+2vw,v^{2}}\right.$cv, cu + 2vw, v2$\left.\vphantom{ cv,cu+2vw,v^{2}}\right)$ 

In the preceding example, we regarded a function of four variables as a function of three variables by treating one of the letters as a constant parameter. You can also regard a function of two variables as a function of three variables. In the following example, we regard ∇xy as the value of a function of three variables.

$\blacktriangleright$ To find the gradient for f (x, y, z) = ∇xy

1.
Leave the insertion point in the expression ∇xy.

2.
Apply Evaluate.

3.
Place the insertion point after the x and enter zero as the third coordinate.

Note    In physics, f represents potential energy, and ∇f represents force.