%% This document created by Scientific Notebook (R) Version 3.0


\documentclass[12pt,thmsa]{article}
\usepackage{amssymb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{makeidx}
\usepackage{sw20jart}

%TCIDATA{TCIstyle=article/art4.lat,jart,sw20jart}

%TCIDATA{<META NAME="ViewSettings" CONTENT="31">}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="Title" CONTENT="Gradient, Divergence, and Curl">}
%TCIDATA{Created=Mon Aug 19 14:52:24 1996}
%TCIDATA{LastRevised=Thu Feb 13 17:11:40 1997}
%TCIDATA{Language=American English}
%TCIDATA{CSTFile=MathHelp.cst}
%TCIDATA{<LINK REL="author" HREF="DM0-1.tex">}
%TCIDATA{<LINK REL="first" HREF="DM9-1.tex">}
%TCIDATA{<LINK REL="contents" HREF="DM0-0.tex">}
%TCIDATA{<LINK REL="copyright" HREF="DM0-2.tex">}
%TCIDATA{<LINK REL="end" HREF="DM9-7.tex">}
%TCIDATA{<LINK REL="index" HREF="DMIndex.tex">}
%TCIDATA{<LINK REL="next" HREF="DM9-3.tex">}
%TCIDATA{<LINK REL="parent" HREF="DM9.tex">}
%TCIDATA{<LINK REL="previous" HREF="DM9-1.tex">}
%TCIDATA{<LINK REL="top" HREF="DM0-0.tex">}

\input{tcilatex}
\begin{document}


\section{\label{Gradient}Gradient, Divergence, and Curl}

Gradient, divergence, and curl are notable omissions from the \textsf{Vector
Calculus} menu of \textsl{Scientific Notebook}, because they are implemented
as ``$\nabla $'', ``$\nabla \cdot $'', and ``$\nabla \times $'' followed by 
\textsf{Evaluate}. For the symbol $\nabla $, choose \FRAME{itbpF}{0.3009in}{%
0.3009in}{0.0701in}{}{}{del.wmf}{\special{language "Scientific Word";type
"GRAPHIC";display "PICT";valid_file "F";width 0.3009in;height 0.3009in;depth
0.0701in;original-width 20.3125pt;original-height 23.3125pt;cropleft
"0";croptop "1";cropright "1";cropbottom "0";filename
'Del.wmf';file-properties "XNPEU";}} \thinspace from the binary-operations
symbol panel under \FRAME{itbpF}{0.3009in}{0.3009in}{0.0701in}{}{}{binop.wmf%
}{\special{language "Scientific Word";type "GRAPHIC";display
"PICT";valid_file "F";width 0.3009in;height 0.3009in;depth
0.0701in;original-width 24.8125pt;original-height 23.3125pt;cropleft
"0";croptop "1";cropright "1";cropbottom "0";filename
'Binop.wmf';file-properties "XNPEU";}}, or choose it directly from \textsf{%
Common Symbols} toolbar.

\subsection{\ The Gradient}

If $f(x_{1},x_{2},\ldots ,x_{n})$ is a scalar function of $n$ variables,
then the vector 
\[
\left( \dfrac{\partial f}{\partial x_{1}}\left( c_{1},c_{2},\ldots
,c_{n}\right) ,\dfrac{\partial f}{\partial x_{2}}\left( c_{1},c_{2},\ldots
,c_{n}\right) ,\ldots ,\dfrac{\partial f}{\partial x_{n1}}\left(
c_{1},c_{2},\ldots ,c_{n}\right) \right) 
\]
is the 
\index{Gradient@Gradient}\textsl{gradient} of $f$ at the point $\left(
c_{1},c_{2},\ldots ,c_{n}\right) $ and is denoted $\nabla f$. For $n=3$, the
vector $\nabla f$ at $\left( a,b,c\right) $ is normal to the level surface $%
f(x,y,z)=f(a,b,c)$ at the point $\left( a,b,c\right) $.

\begin{quote}
$\blacktriangleright $ To compute the gradient of the function $f(x,y,z)=xyz$
\end{quote}

\begin{itemize}
\item  \textsf{Evaluate} $\nabla xyz$.
\end{itemize}

\begin{quote}
$\blacktriangleright $ \textsf{Evaluate}
\end{quote}

\begin{quotation}
$\nabla xyz=\left( yz,xz,xy\right) \,$
\end{quotation}

$\strut $

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 $\nabla f(x,y,z)$.\medskip

\begin{quote}
$\blacktriangleright $ \textsf{Evaluate}
\end{quote}

\begin{quotation}
$\nabla f(x,y,z)=\left( yz,xz,xy\right) \,$
\end{quotation}

$\strut $

Since gradients can be calculated for scalar functions of $n$ arbitrary
variables, the gradient operator uses \emph{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

\begin{quote}
$\blacktriangleright $ \textsf{Evaluate}
\end{quote}

\begin{quotation}
$\nabla \left( cuv+v^{2}w\right) =\left( uv,cv,cu+2vw,v^{2}\right) $
\end{quotation}

$\strut $

and delete the first entry to get

\begin{quotation}
$\nabla \left( cuv+v^{2}w\right) =\left( cv,cu+2vw,v^{2}\right) \,$
\end{quotation}

$\strut $

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 $\nabla xy$ as the
value of a function of three variables.

\begin{quote}
$\blacktriangleright $ To find the gradient for $f(x,y,z)=\nabla xy$
\end{quote}

\begin{enumerate}
\item[1.]  Leave the insertion point in the expression $\nabla xy$.

\item[2.]  Apply \textsf{Evaluate}.

\begin{itemize}
\item  $\nabla xy=\left( y,x\right) $
\end{itemize}

\item[3.]  Place the insertion point after the $x$ and enter zero as the
third coordinate.

\begin{itemize}
\item  $\nabla xy=\left( y,x,0\right) \,\medskip $
\end{itemize}
\end{enumerate}

\begin{quotation}
\emph{Note\quad }In physics, $f$ represents potential energy, and $\nabla f$
represents force.
\end{quotation}

\strut

\subsection{\ Divergence\label{Divergence}}

A vector field is a vector-valued function. If $F(x,y,z)=\left[
p(x,y,z),q(x,y,z),r(x,y,z)\right] $ is a vector field, then the scalar 
\[
\nabla \cdot F=%
\frac{\partial p}{\partial x}\left( a,b,c\right) +\frac{\partial q}{\partial
y}\left( a,b,c\right) +\frac{\partial r}{\partial z}\left( a,b,c\right) 
\]
is the 
\index{Divergence@Divergence}\textsl{divergence} of $F$ at the point $\left(
a,b,c\right) $. The dot product notation is used because the symbol $\nabla $
can be thought of as the vector operator $\nabla =\left( 
\frac{\partial }{\partial x},\frac{\partial }{\partial y},\frac{\partial }{%
\partial z}\right) $. The default is that the field variables are $x$, $y$,
and $z$, in that order. If you wish to label the field variables
differently, reset the default with \textsf{Set Basis Variables}\label%
{Basis variables} on 
\index{Basis variables} the \textsf{Vector Calculus} submenu.

For the following example, use \textsf{Define + New Definition} to define
the following vector fields. 
\begin{eqnarray*}
F &=&[yz,2xz,xy]%
\text{\qquad \qquad \ }G=(xz,2yz,z^{2})\qquad \\
H &=&\,\left[ 
\begin{array}{ccc}
yz & 2xz & xy
\end{array}
\right] \text{\qquad }J=\left( 
\begin{array}{c}
x^{2} \\ 
xy \\ 
2xz
\end{array}
\right)
\end{eqnarray*}
where $F$ and $G$ are represented as $3$-tuples, $H$ is represented as a $%
1\times 3$ matrix, and $J$ as a $3\times 1$ matrix. Compute divergence with 
\textsf{Evaluate}.

\begin{quote}
$\blacktriangleright $ \textsf{Evaluate}
\end{quote}

\begin{quotation}
$\nabla \cdot F=\,0$

$\nabla \cdot G=\,5z$

$\nabla \cdot (xz,2yz,z^{2})=\,5z$

$\nabla \cdot (xy,x,0)=\,y$

$\nabla \cdot H=0$

$\nabla \cdot J=5x$

$\nabla \cdot \left( a,b,c\right) =0$

$\nabla \cdot \left[ ax,bxy,cz^{2}\right] =a+bx+2cz\smallskip $
\end{quotation}

\strut

\subsection{\ Curl 
\index{Curl@Curl}\label{Curl}}

If $F(x,y,z)=\left( p(x,y,z),q(x,y,z),r(x,y,z)\right) $ is a vector field,
then the vector 
\[
\nabla \times F=\left( 
\frac{\partial r}{\partial y}-\frac{\partial q}{\partial z},\frac{\partial p%
}{\partial z}-\frac{\partial r}{\partial x},\frac{\partial q}{\partial x}-%
\frac{\partial p}{\partial y}\right) 
\]
is called the\textsl{curl} of $F$. The default is that the field variables
are $x$, $y$, and $z$, in that order. If you wish to label the field
variables differently, reset the default with \textsf{Set Basis Variables}
on the \textsf{Vector Calculus} submenu. The vector field $F$ in the
following example is defined as in the previous section.

\begin{quote}
$\blacktriangleright $ \textsf{Evaluate}
\end{quote}

\begin{quotation}
$\nabla \times (yz,2xz,xy)=\left( -x,0,z\right) \vspace{6pt}$

$\nabla \times F=\left[ -x,0,z\right] \vspace{6pt}$

$\nabla \times \left( 
\begin{array}{ccc}
yz & 2xz & xy
\end{array}
\right) =\left( 
\begin{array}{ccc}
-x & 0 & z
\end{array}
\right) \vspace{6pt}$

$\nabla \times \left( 
\begin{array}{c}
x^{2} \\ 
xy \\ 
2xz
\end{array}
\right) =\left( 
\begin{array}{c}
0 \\ 
-2z \\ 
y
\end{array}
\right) \vspace{6pt}$

$\nabla \times \left[ 
\begin{array}{c}
ax^{2} \\ 
bxy \\ 
2cxz
\end{array}
\right] =\left[ 
\begin{array}{c}
0 \\ 
-2cz \\ 
by
\end{array}
\right] $
\end{quotation}

\strut

\subsection{\ Laplacian 
\index{Laplacian@Laplacian}\label{Laplacian}}

The \textsl{Laplacian} of a scalar field $f(x,y,z)$ is the divergence of $%
\nabla f$ and is written 
\begin{eqnarray*}
\nabla ^{2}f &=&\nabla \cdot 
\vspace{6pt}\nabla f \\
&=&\nabla \cdot \left( \frac{\partial f}{\partial x},\frac{\partial f}{%
\partial y},\frac{\partial f}{\partial z}\right) \vspace{6pt} \\
&=&\frac{\partial ^{2}f}{\partial x^{2}}+\frac{\partial ^{2}f}{\partial y^{2}%
}+\frac{\partial ^{2}f}{\partial z^{2}}
\end{eqnarray*}
The default is that the field variables are $x$, $y$, and $z$, in that
order. If you wish to label the field variables differently, reset the
default with \textsf{Set Basis Variables} on the \textsf{Vector Calculus}
submenu.

\begin{quote}
$\blacktriangleright $ \textsf{Evaluate}
\end{quote}

\begin{quotation}
$\nabla ^{2}\left( x+y^{2}+2z^{3}\right) =2+12z$

$\nabla \left( x+y^{2}+2z^{3}\right) =\left( 1,2y,6z^{2}\right) $

$\nabla \cdot \nabla \left( x+y^{2}+2z^{3}\right) =2+12z$
\end{quotation}

$\strut $

\subsection{\ Directional Derivatives\label{Directional derivative}}

The 
\index{Directional derivative@Directional derivative}\textsl{directional
derivative} of a function $f$ at the point $\left( a,b,c\right) $ in the
direction $\mathbf{u}=\left( u_{1},u_{2},u_{3}\right) $ is given by the
inner product of $\nabla f$ and $\mathbf{u}$ at the point $\left(
a,b,c\right) $. That is, for a vector $\mathbf{u}$ of unit length and a
scalar function $f$, 
\begin{eqnarray*}
D_{\mathbf{u}}f\left( a,b,c\right) &=&\nabla f\left( a,b,c\right) \cdot 
\mathbf{u} \\
&=&%
\frac{\partial f}{\partial x}\left( a,b,c\right) u_{1}+\frac{\partial f}{%
\partial y}\left( a,b,c\right) u_{2}+\frac{\partial f}{\partial z}\left(
a,b,c\right) u_{3}
\end{eqnarray*}
\medskip

\begin{quote}
$\blacktriangleright $ To compute the directional derivative of $%
f(x,y,z)=xyz $ in the direction 
\[
\mathbf{u}=\left( \cos \frac{\pi }{8}\sin \frac{\pi }{9},\sin \frac{\pi }{8}%
\sin \frac{\pi }{9},\cos \frac{\pi }{9}\right) 
\]
\end{quote}

\begin{enumerate}
\item[1.]  Select $\nabla xyz$.

\item[2.]  While holding down the \textsc{ctrl }key, choose \textsf{Evaluate}%
.

\item[3.]  Choose \textsf{Evaluate} (or \textsf{Evaluate Numerically}).
\end{enumerate}

\begin{quote}
$\blacktriangleright $ \textsc{ctrl}\textsf{\ + Evaluate, Evaluate, Evaluate
Numerically}
\end{quote}

\begin{quotation}
$\nabla xyz\cdot \left( \cos \frac{\pi }{8}\sin \frac{\pi }{9},\sin \frac{%
\pi }{8}\sin \frac{\pi }{9},\cos \frac{\pi }{9}\right) $

$\quad =\left( yz,xz,xy\right) \cdot \left( \cos \frac{\pi }{8}\sin \frac{%
\pi }{9},\sin \frac{\pi }{8}\sin \frac{\pi }{9},\cos \frac{\pi }{9}\right) $

$\quad =\allowbreak \frac{1}{2}yz\sqrt{\left( 2+\sqrt{2}\right) }\sin \frac{1%
}{9}\pi +\frac{1}{2}xz\sqrt{\left( 2-\sqrt{2}\right) }\sin \frac{1}{9}\pi
+\allowbreak xy\cos \frac{1}{9}\pi $

$\quad =\allowbreak .31599yz+.13089xz+\allowbreak .93969xy$
\end{quotation}

$\strut $

\subsection{\ Related topics}

\begin{itemize}
\item  \hyperref{Vectors}{}{}{DM9-1.tex#Vectors}

\item  \hyperref{Plots of Vector Fields and Gradients}{}{}{DM9-3.tex#Vector
field}

\item  \hyperref{Scalar and Vector Potentials}{}{}{DM9-4.tex#Scalar potential%
}

\item  \hyperref{Matrix-Valued Operators}{}{}{DM9-5.tex#Hessian}

\item  \hyperref{Plots of Complex Functions}{}{}{DM9-6.tex#Conformal plot}

\item  \hyperref{Exercises and Solutions}{}{}{DM9-7.tex#Exercises}
\end{itemize}

\rule{0.67in}{0.01in}

\hyperref{\FRAME{itbpF}{0.5275in}{0.3399in}{0.0519in}{}{}{index.wmf}{\special%
{language "Scientific Word";type "GRAPHIC";display "PICT";valid-file
"F";width 0.5275in;height 0.3399in;depth 0.0519in;original-width
36.875pt;original-height 22.5625pt;cropleft "0";croptop "1";cropright
"1";cropbottom "0";filename 'index.wmf';file-properties "XNPEU";}}}{}{}{%
DMIndex.tex#Math Index}\quad {\small Index entries: \hyperref{Derivative}{}{%
}{DMIndex.tex#Derivative}, \hyperref{Matrices}{}{}{DMIndex.tex#Matrices}, 
\hyperref{Vector}{}{}{DMIndex.tex#Vector}, \hyperref{Vector calculus}{}{}{%
DMIndex.tex#Vector calculus}}

\end{document}
