Unit 4: Vector Calculus
Chapter 20: Additional Vector Differential Operators
Sections20.1: divergence and its meaning
Copyright
Copyright * 2001 by Addison Wesley Longman, Inc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.
Initializations
> restart;
>
with(linalg):
with(plots):
with(student):
with(plottools):
read(`C:/Program Files/Maple 6.01/pvac.txt`):
Warning, the protected names norm and trace have been redefined and unprotected
Warning, the name changecoords has been redefined
>
Definition 20.1
Given the vector field
F =
i
+
j
+
k
the
divergence
of
F
at the point
is the scalar
f
.
F
= div(
F
) =
The divergence of the field F is a scalar which measures the "spread" of the field at each point. Notational clarifications, as well as xxamples and calculations designed to illuminate this claim about divergence measuring "spread" of the field at a point, follow.
Maple computes the divergence of the vector field
> F := vector([u(x,y,z), v(x,y,z), w(x,y,z)]);
>
with the command
> diverge(F, [x,y,z]);
>
Example 20.1
The field F given by
> F := vector([x,y]);
>
graphed in Figure 20.1 (below), appears to be "flowing" radially outward, with flow lines
, the solution of the differential equations
contained in
R
'
=
F
Figure 20.1 is generated in Maple by executing the following commands.
>
p1 := circle([0,0],1/2,color=red):
p2 := circle([0,0],3/2,color=green):
f1 := z -> arrow([.5*cos(z),.5*sin(z)],vector([.5*cos(z),.5*sin(z)]), .05,.2,.2, color=red):
f2 := z -> arrow([1.5*cos(z),1.5*sin(z)],vector([1.5*cos(z),1.5*sin(z)]), .05,.2,.2, color=green):
p3:=plot([[t,t,t=-2..2],[-t,t,t=-2..2],[t,t*tan(Pi/12),t=-2.5..2.5], [t,t*tan(5*Pi/12),t=-.7.. .7],[t,t*tan(7*Pi/12),t=-.7.. .7],[t,t*tan(11*Pi/12),t=-2.5..2.5]], color=black):
display([p||(1..3),seq(f1(Pi/6*k),k=0..11),seq(f2(Pi/6*k),k=0..11)], scaling=constrained, xtickmarks=7, ytickmarks=7, labels=[` x`,y], labelfont=[TIMES,ITALIC,12]);
>
The parameter
is eliminated from the equations
by writing
=
and the solution
is immediate.
The field arises from the scalar potential
where the minus sign has been ignored.
The level curves of
are concentric circles orthogonal to the flow lines of the field
F
, as seen in Figure 20.1.
The divergence is div( F ) = 2. The constant and positive value of the divergence signals the uniform spread of the field, evidenced by the flow pointing radially outwards from the origin.
To implement these calculations in Maple, begin with R , the radius-vector form of the flow line,
> R := vector([x(p), y(p)]);
>
and differentiate with respect to the parameter t to form the tangent vector.
> `R'` := map(diff,R,p);
>
Equating the vectors R ' and F means equating their components, accomplished in Maple with
> q := equate(`R'`,F);
>
This set of differential equations is then solved via
> q1 := dsolve(q, {x(p),y(p)});
>
Forming the ratio
eliminates the parameter
and shows analytically that the flow lines
are rays emanating from the origin.
Maple claims
F
has a scalar potential
since the potential command returns
true
.
> potential(F, [x,y], 'u');
>
Thus, F is conservative with the potential function
> u;
>
where the physicist's minus sign has been ignored. Thus, F is
> grad(u, [x,y]);
>
The level curves of
are orthogonal to the flow lines of the field
F
., as suggested by the following figure.
>
p4 := contourplot(u, x = -1..1, y = -1..1, contours=[.1, .3, .5], color=black, scaling=constrained):
display([p3,p4]);
>
Finally, the divergence of this now throroughly-familiar field is given by
> diverge(F, [x,y]);
>
Divergence as Limiting Value of Flux per Unit Area
We next give a physical interpretation of the divergence based on the notion of flux through a closed curve C . It demonstrates that in the limit as the curve C shrinks to a point P , the ratio of the flux of the field F through C divided by the area enclosed in C , becomes the divergence of the field F evaluated at P .
To compute the flux of the arbitrary plane vector
F
=
i
+
j
, that is,
> F := vector([f(x,y),g(x,y)]);
>
through
C
, a circle of radius
a
, centered at the point
P
whose coordinates are (
), write the parametric representation of this circle as
>
X := x[0]+a*cos(p);
Y := y[0]+a*sin(p);
>
so that on
C
we have
F
=
F
, that is,
> Fc := subs(x=X,y=Y, op(F));
>
As the circle
C
shrinks to the point
P
, the radius
a
goes to zero. Hence, expand
F
in a Taylor series about
, obtaining
F
=
that is,
> map(taylor,Fc,a=0,2);
>
Rather than try to use Maple to simplify the notation, just enter the expanded, and simplified versions of f and g , writing
>
fC := f[0]+(f[x]*cos(p)+f[y]*sin(p))*a;
gC := g[0]+(g[x]*cos(p)+g[y]*sin(p))*a;
>
The integrand for the flux integral for
F
is given by
F
.
N
ds
=
, formed in Maple by
> `fdy - gdx` := fC*diff(Y,p) - gC*diff(X,p);
>
The flux integral
> q := Int(`fdy - gdx`, p=0..2*Pi);
>
is then divided by
, the area enclosed by the circle
C
, and evaluated, giving
> simplify(value(q/(Pi*a^2)));
>
As predicted, in the limit as
goes to zero, the limiting ratio of flux to area becomes
, the divergence of
F
.
>
Solenoidal Fields
Because the magnetic field set up by a solenoid (coil of wire) has zero divergence in the space surrounded by the coil, physicists use the term solenoidal for fields whose divergence is everywhere zero. For example, the field
> F := vector([x,-y]);
>
is solenoidal since its divergence vanishes, as the following shows.
> diverge(F,[x,y]);
>
On the other hand, the field
> F := vector([x,y]);
>
is not solenoidal, since div( F ) = 2, as shown by
> diverge(F,[x,y]);
>
Connections between conservative fields and solenoidal fields are detailed in Sections21.5.
If F is the field of velocity vectors for a steady fluid flow with constant density, then its divergence must be zero, as we discuss in Sections23.3. But a steady flow with constant density is incompressible , so the analog of the solenoidal field is the incompressible flow.
>
The laplacian
The
laplacian
of the scalar
is the scalar field
=
f
.
(
f
u
) =
f
u
the divergence of the gradient field of u .
The laplacian of the scalar
is given in Maple by
>
u := 'u':
laplacian(u(x,y,z),[x,y,z]);
>
To obtain this same result at the divergence of the gradient, compute
> diverge(grad(u(x,y,z),[x,y,z]),[x,y,z]);
>
In cartesian coordinates, the del operator (Sections18.2) is (using an equation editor)
or (using Maple and the special font BCSYMA to create the nabla , or del, symbol)
f
=
i
+
j
+
k
The gradient of the scalar
is the vector
that is,
=
f
i
+
j
+
k
=
Similarly, the divergence of F is given by
that is, div( F ) is
f
.
F
= (
i
+
j
+
k
)
.
(
i
+
j
+
k
)
=
Consequently, the laplacian of
, the divergence of the gradient, is
that is
f
.
(
f
u
) = (
i
+
j
+
k
)
.
(
i
+
j
+
k
)
u
= (
+
+
)
u
=
=
f
u
Thus, the laplacian operator is generally called "del-squared", and in cartesian coordinates is written
that is, as
f
=
+
+
>
Generalizations of the Directional Derivative
First Generalization
Texts on fluid dynamics or electromagnetic theory generalize
D
f
=
.
U
, the directional derivative of the scalar
, by introducing the operator
that is,
V
.
f
= (
u
i
+
v
j
+
w
k
)
.
(
i
+
j
+
k
)
=
u
+
v
+
w
The directional derivative of Sections18.2 requires the vector
U
to be a unit vector. In this first generalization of the directional derivative, the vector
V
need not be a unit vector. When applied to a scalar
, this operator is just the gradient dotted with
V
, giving for
a derivative in the direction
V
.
>
Example (Not in Text)
Let the vector V be given by
> V := vector([u,v,w]);
>
In Maple, the action of the operator
V
.
f
acting on the scalar
is captured by the syntax
> dotprod(V, grad(g(x,y,z),[x,y,z]), orthogonal);
>
Second Generalization
Between two neighboring points
and
, a change in the vector field
F
=
i
+
j
+
k
is again a vector. If
V
is proportional to
P
P
, then at
te directional derivative of
F
in the direction
V
is given by
(
V
.
f
)
F
=
=
where the matrix on the right is the Jacobian matrix for
F
, and the operator
V
.
f
=
is as defined in the first generalization of the directional derivative. The formalism for the second generalization is established in Exercise B1 of Sections18.2. The idea behind the formalism is a generalization of the directional derivative.
Think of F as a force field in which
R
=
P
V
is a line through
with direction
V
. Evaluating F along the line gives
F
, and
F
|
is the directional derivative of the field measured at
in the direction of
V
.
When this process was carried out in Sections18.2 for
D
f
=
.
U
, the directional derivative of the scalar field
, the gradient vector
appeared as a new object dotted with the direction vector
U
. The matrix which appears in the second generalization of the directional derivative is a new object, one "rank" higher that the vector field
F
, called the covariant derivative. Multiplication of the direction vector
V
by this object gives the desired rate of change.
>
Example (Not in Text)
Let the vector belonging to the operator be V , given by
> print(V);
>
and let the operator act on the vector F , given by
> F := vector([f(x,y,z), g(x,y,z), h(x,y,z)]);
>
In Maple, the operator itself cannot be represented. However, the action of the operator on the vector F can be computed with the following syntax.
> map(dotprod,map(grad, F, [x,y,z]),V, orthogonal);
>
Each of the scalar components of the vector F are subjected to the generalized directional derivative, yielding the components
>
for k from 1 to 3 do
dotprod(V, grad(F[k],[x,y,z]), orthogonal);
od;
>