You are on page 1of 11

A/ Prof. C.

Ulrich

Electromagnetism PHYS2050
1

Vector Analysis

1.3
1.3.1

Differential Calculus
Scalar field Vector field

Scalar field
A scalar field f (x, y, z) associates every point P (x, y, z) in space with a scalar, i.e.
a number: f (~x) = f (x1 , x2 , x3 ).
Examples: temperature distribution (weather map), density, potential energy, altitude on a map.
Areas or lines with f (x, y, z) = conts. are equipotential areas or lines. (contour lines
on a map, isothermal lines, isobar lines, etc.).
The function f (x, y, z) varies as faster, as closer the equipotential lines are.
Vector field
A vector field (function) ~v (~r) = ~v (x, y, z) associates every point in space to a vector,
i.e.
a direction and
a magnitude
Examples: flow of water, force field, electrical field, magnetic field, wind direction
on a weather card, etc.

Figure 1.7: Scalar field (left) and vector field (right).

1.3.2

Ordinary Derivatives

In a three dimensional space the derivative is performed separately for each component,
partial differentiation (partial = ).
f (x, y, z)
x

f (x + x, y, z) f (x, y, z)
x0
x

lim

(1)

The derivative describes the slope of a curve f (x, y, z) at a certain point.

1.3.3

Differentiation of a Scalar Field: Gradient

How does a function f (x, y, z) change, if you move by d~r = dx ~ex + dy ~ey + dz ~ez i.e.
what is df (x, y, z) in this case?

gradf (x, y, z) =

f (x, y, z) =

f
f
f
~ex +
~ey +
~ez =

x
y
z

f
x
f
y

(2)

f
z

The gradient is the three dimensional derivative of a scalar field. The result is a vector
field.
The gradient describes the change in df (x, y, z) if one moved by d~r = dx ~ex +dy ~ey +dz ~ez :
df

= gradf d~r = f d~r

(3)

If the direction is chosen along an equipotential line, the magnitude of f (x, y, z) will not
change and df (x, y, z) = 0. Therefore:
df

f d~r = 0

According to the rules for the scalar product of vectors, gradf and d~r are perpendicular
to each other in this case. Therefore, the gradient of f (x, y, z) is perpendicular to the
equipotential lines of a scalar field. Furthermore, the gradient is pointing towards the
direction of the steepest ascent. Further, the gradient is largest when the density of
equipotential lines is largest.

Figure 1.8: Gradient of the scalar function f (x, y, z).

The NablaOperator
The Nablaoperator is defined as follows:

~ex +
~ey +
~ez =

x
y
z

(4)

An operator acts on a function and can also have the form of a vector.

Directional Derivative
The directional derivative is the derivative of a scalar function along a certain direction.
is the angle between the gradient of f (x, y, z) and the direction of ~a.
df (x, y, z) =

gradf d~a = f d~a = |gradf | |d~a| cos

Therefore:
f
(~x0 ) =
~a

gradf (~x0 )

~a
|~a|

(5)

The result of the directional derivative is a scalar and describes the slope in the direction
of the vector ~a.

1.3.4

Differentiation of a Vector Field I: Divergence

The divergence is one of the two different derivatives of a vector field:

div ~v (~r)

= ~v (~r) =

vx

vy = vx + vy + vz

x
y
z
vz

(6)

The result of the divergence of a vector field is a scalar field. The divergence describes
how much a vector field ~v (~r) spreads over a certain point in space.
As an example: consider an open box and a liquid is flowing in and out. If the same
amount is flowing in as it is flowing out of the box, the overall amount inside the box
remains the same and the change is zero: div ~v = 0.
div ~v > 0 more liquid is flowing out of the box: faucet.
div ~v < 0 more liquid is flowing in the box: drain.
For example, a vector field can describe the flow of a liquid. The derivative (divergence)
describes the changes at a certain point.

1.3.5

Definition of the Potential

The derivative of a scalar field (gradient of f (x, y, z)) is a vector field.


A vector field is not necessarily the gradient of a scalar field

f
f
f
~ex +
~ey +
~ez
x
y
z

~v (~x)
but if this is the case:
- the vector field is conservative,

- and the corresponding scalar field is the potential.


This has several important consequences:
1. The integration in a conservative vector field is independent of the path between
the start and the endpoint.
2. Therefore, an integral over a closed curve in space must give zero
I
~v (~x) d~r

3. Furthermore:
vx
vy
=
,
y
vx

vx
vz
=
,
z
vx

vy
vz
=
z
vy

4. As direct consequence: curl ~v (~r) must disappear


curl ~v (~r) is introduced in the next chapter 1.3.6

curl ~v (~x) =

~v (~x) = 0

Example: Is the following vector field conservative?

~v (~x)

1
ey
=
cos z

+
+
+

yz exyz
xz exyz
xy exyz

Integration, line by line:


Z
vx dx

R
= (1 + yzexyz ) dx

= x + exyz + f (y, z)

vy dy

R
= (ey + xzexyz ) dy

= ey + exyz + f (x, z)

vz dz

R
= ( cos z + xyexyz ) dz

Z
Z

= sin z + exyz + f (x, y)

The direct comparison yields:


x + ey sin z + exyz

f (x, y, z) =

The vector field is conservative and f (x, y, z) is the corresponding potential.

Now let us calculate:


vx
y

vy
vx

vx
y
vy
x

= z exyz + yz xz exyz
= z exyz + xz yz exyz

These two partial derivatives are identical. The same holds for all other combinations of
partial derivatives of ~v (~r) by (x, y, z).
Therefore:

vz
y

vy
z

vx
z

vz
x

vy
x

vx
y

= 0

This expression corresponds to the curl of the vector field, i.e.:


curl ~v (~x) = ~v = 0

1.3.6

Differentiation of a Vector Field II: Curl

The curl (rotation) is a differential operation on a vector field. The result is a vector
field:

curl ~v

~v =

vz
y

vy
z

vx
z

vz
x

vy
x

vx
y

The curl describes the rotation of a vector field at a certain point.


- curl ~v : the direction corresponds to the rotational axis,
- |curl ~v | the magnitude is a measure for the strength of the rotation.

(7)

Example: The flow in a river


As an example lets look at the flow in a river. At the riverbank the flow is zero, whereas
the velocity of the water reaches its maximum in the center of the river.

R
.

vx = 1 - y

.
x

Figure 1.9: Profile of the flow in a river


The flow in a river can be described approximately by the equation of a flow through a
tube (Hagen-Poiseuille):
v(~r) =

P 2
g% 2
(R r2 ) =
(R r2 ) ,
4l
4

where P is the difference of pressure at the length of the entire tube l, is the viscosity
and R is the diameter. For simplification, we ignore all prefactors and obtain the following
profile for the flow in a river:

~v (r)

1 y2

0
=
0

thus, the speed of the flow of water is v(y0 ) = (1 y02 , 0, 0) at a distance of y0 from the
center of the river.
Divergence
div ~v

(1 y 2 ) +
0+
0 = 0
x
y
z

In case of a constant flow of water (no faucet and no drain) the divergence must vanish.
Curls (rotation)

curl ~v

0
0
= 0
0
~v =

y
(1 y 2 )
2y

The resulting vector curl ~v , i.e. the rotational axis, is pointing along the z-axis and
therefore perpendicular to the xyplane. Its magnitude is a measure for the strength of
the rotation and the sign denotes the rotational sense (right-hand-rule):

curl ~v > 0
curl ~v < 0
curl ~v = 0

counterclockwise (the vector is pointing up)


clockwise (the vector is pointing town)
no rotation

Rules for the Gradient, Divergence, and Curl


In general, the rules for the gradient, divergence, and curl can be derived from the rules of the vector algebra. In this case the nabla operator is treated as a ordinary vector.
Lets assume that f (~r) and g(~r) are two scalar fields and ~u(~r) and ~v (~r) are two vector
fields. a is a simple scalar.

The operations grad, div, and curl are linear


grad (f + g)

grad f + grad g

grad a f

a grad f

div (~u + ~v )

div ~u + div ~v

div a ~v

a div ~v

curl (~u + ~v )

curl ~u + curl ~v

curl a ~v

a curl ~v

or in the notation of the nabla operator:


grad (a f + b g)

= (a f + b g) = af + bg

div (a ~u + b ~v )

= (a ~u + b ~v ) = a~u + b~v

curl (a ~u + b ~v )

= (a ~u + b ~v ) = a( ~u) + b( ~v )

Product rules:
Gradient:
grad (f g)

f grad g + g grad f = f g + g f

grad(~u ~v )

~u ( ~v ) + ~v ( ~u) + (~u )~v + (~v )~u

div (f ~v )

f div ~v + (grad f ) ~v

div (~u ~v )

~v curl ~u ~u curl ~v = ~v ( ~u) ~u ( ~v )

curl (f ~v )

f curl ~v + (grad f ) ~v

curl (~u ~v )

(~v ) ~u (~u ) ~v + ~u div ~v ~v div ~u

Divergence:

Curl:

Second Derivatives:

curl (grad f ) =

(f ) = 0

div (curl f ) =

( f ) = 0

div (grad f ) =

f = f

curl (curl ~v ) =

grad(div~v ) ~v

The second derivative (div(grad f ) = f ) is the LaplaceOperator.

2f
2f
2f
+
+
x2
y 2
z 2

= f =

Prove of some of the important rules:


div (curl v) = 0
div (curl v) =

( v) = 0

From vector algebra:


~a (~a ~b)

as

~a (~a ~b)

Divergence: The change in a vector field is pointing towards the direction of the
field.
Curl (Rotation): the rotational axis is perpendicular to the plane of the rotation.
The scalar product of two vectors, which are perpendicular to each other, is zero.
curl (grad f ) = 0
curl (grad f )

= (f ) = 0

From vector algebra:


~a ~a =

0,

because

~a k ~a

In case of two parallel vectors, the cross product is zero.


curl (curl ~v ) = grad(div ~v ) ~v
curl (curl ~v )

grad(div ~v ) ~v

From vector algebra:


~a ~b ~c =

(~a ~c) ~b (~a ~b) ~c

therefore:
curl (curl ~v ) =

~v = ( ~v ) () ~v

div v = 0

curl v = 0

div v ? 0

curl v = 0

div v = 0

curl v ? 0

div v ? 0

curl v ? 0

Figure 1.10: Divergence and Curl of different vector fields.

1. div ~v = 0,

curl ~v = 0

The first example show a constant and homogeneous flow. At every point point
in this vector field the flow is constant, i.e. no change in the amount (div ~v = 0).
Furthermore, no rotation is observed (curl ~v = 0).
2. div ~v 6= 0,

curl ~v = 0

The second example shows a faucet. The divergence at this point is larger than
zero (div ~v > 0). On the other side, no rotation can be observed at this point
(curl ~v = 0).
3. div ~v = 0,

curl ~v 6= 0

In the third example the flux is constant. Therefore, the divergence is zero (div ~v =
0). On the other side, at every point an observer experiences a certain rotation.
The curl is not zero (curl ~v 6= 0).
4. div ~v 6= 0,

curl ~v 6= 0

The fourth example is a general case. It is clear that there are more long arrows
than short arrows. Therefore, there must be a faucet (div ~v > 0). Furthermore, an
observer at a certain point experiences a rotation counterclockwise. Therefore, the
curl must be positive: (curl ~v > 0).

Gradient, Divergence, and Curl in Spherical Coordinates

x
y
z
r2

= r sin cos
= r sin sin
= r cos
z
cot = p
;
2
x + y2

x2 + y 2 + z 2 ;

tan =

y
x

The unit vectors in spherical coordinates are:

sin cos
sin sin
cos

~er

sin
~e = cos
0

cos cos
~e = cos sin
sin

The gradient of a scalar field can be determined as follows:

grad f (r, , ) =

f
r

1 f

r sin

!
1 f

Derivation
f
x

r
x

r
y
r
z

f r

r x
p
x
x2 + y 2 + z 2
x
r sin cos
= =
=p
= sin cos
2
2
2
x
r
r
x +y +z

p
x2 + y 2 + z 2
y
y
r sin sin
= =
=p
= sin sin
2
2
2
y
r
r
x +y +z

p
x2 + y 2 + z 2
z
z
r cos
= =
=p
= cos
2
2
2
z
r
r
x +y +z

From the comparison of the resulting coordinates one realizes that the three partial
derivatives of r by x, y, and z correspond to the unit vector ~er .
f
x

arctan xy
1
y
y
=
( ) = 2
x
(+( xy )2 x2
x + y2

=
=

r2

1
r sin sin
=
( sin )
2
2
2
2
r
sin

sin cos + r sin sin


2

arctan xy
1
1
x
=
( )= 2
y
1 + ( xy )2 x
x + y2
r2

r sin cos
1
(cos )
=
2
2
2
2
r
sin

sin sin + r sin cos


2

arctan xy
= 0
z
10

From the comparison of the resulting coordinates one realizes that the three partial
derivatives of by x, y, and z correspond to the unit vector ~e with an additional
1
prefactor of r sin
.

f
x

arccot
=

1
1+

z2
x2 +y 2

(x2

zx
xz
p
=
2
3/2
2
2
+y )
(x + y + z 2 ) x2 + y 2

x
r sin cos cos
1
z
x
p
= (cos cos )
= 2 cot =
2
2
2
2
r
r
r
sin
r
x +y
z
x2 +y 2

1
1+

z2
x2 +y 2

zy
yz
p
=
(x2 + y 2 )3/2
(x2 + y 2 + z 2 ) x2 + y 2

y
z
y
r sin sin cos
1
p
= 2 cot =
= (sin cos )
r 2 x2 + y 2
r
r2
sin
r
arccot

z
x2 +y 2

arccot

z
x2 +y 2

1
1
p
z2
2
1 + x2 +y2
x + y2
p
p
x2 + y 2
r sin2 cos2 + sin2 sin2
1
=
= ( sin )
r2
r2
r
z

From the comparison of the resulting coordinates one realizes that the three partial
derivatives of by x, y, and z correspond to the unit vector ~e with an additional
prefactor of 1r .
This is the proof for the expression of the gradient in spherical coordinates. The expressions for the divergence, curl, and the Laplace operator can be derived in a similar way.
The results are given below:

grad f (r, , ) =

div ~v (~r) =

f
r

1 f

r sin

!
1 f

1 2
1

1 v
(r vr ) +
(v sin ) +
2
r r
r sin
r sin
2 f
1
2f
1 2f
1
f
2f
+
+ 2 2
+ 2 2 + 2
2
2
r
r r
r
r tan
r sin

curl ~v (r, , ) = ~v (r, , ) =

11

v
1

r sin (v sin )
vr
1
1
r sin r r (rv )
1
1 vr
r r (rv ) r

You might also like