ee2 mathematics: vector calculus - imperial college …jdg/ee2ma-vc.pdf · 14th/10/10...

31
EE2 Mathematics : Vector Calculus J. D. Gibbon (Professor J. D Gibbon 1 , Dept of Mathematics) [email protected] http://www2.imperial.ac.uk/jdg These notes are not identical word-for-word with my lectures which will be given on a BB/WB. Some of these notes may contain more examples than the corresponding lecture while in other cases the lecture may contain more detailed working. I will NOT be handing out copies of these notes – you are therefore advised to attend lectures and take your own. 1. The material in them is dependent upon the Vector Algebra you were taught at A-level and your 1st year. A summary of what you need to revise lies in Handout 1 : “Things you need to recall about Vector Algebra” which is also §1 of this document. 2. Further handouts are : (a) Handout 2 : “The role of grad, div and curl in vector calculus” summarizes most of the material in §3. (b) Handout 3 : “Changing the order in double integration” is incorporated in §5.5. (c) Handout 4 : “Green’s, Divergence & Stokes’ Theorems plus Maxwell’s Equations” summarizes the material in §6, §7 and §8. Technically, while Maxwell’s Equations themselves are not in the syllabus, three of the four of them arise naturally out of the Divergence & Stokes’ Theorems and they connect all the subsequent material with that given from lectures on e/m theory given in your own Department. 1 Do not confuse me with Dr J. Gibbons who is also in the Mathematics Dept.

Upload: haquynh

Post on 06-Feb-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

EE2 Mathematics : Vector Calculus

J. D. Gibbon

(Professor J. D Gibbon1, Dept of Mathematics)

[email protected] http://www2.imperial.ac.uk/∼jdg

These notes are not identical word-for-word with my lectures which will be given on a BB/WB.

Some of these notes may contain more examples than the corresponding lecture while in other

cases the lecture may contain more detailed working. I will NOT be handing out copies of

these notes – you are therefore advised to attend lectures and take your own.

1. The material in them is dependent upon the Vector Algebra you were taught at A-level

and your 1st year. A summary of what you need to revise lies in Handout 1 : “Things

you need to recall about Vector Algebra” which is also §1 of this document.

2. Further handouts are :

(a) Handout 2 : “The role of grad, div and curl in vector calculus” summarizes most

of the material in §3.

(b) Handout 3 : “Changing the order in double integration” is incorporated in §5.5.

(c) Handout 4 : “Green’s, Divergence & Stokes’ Theorems plus Maxwell’s Equations”

summarizes the material in §6, §7 and §8.

Technically, while Maxwell’s Equations themselves are not in the syllabus, three of

the four of them arise naturally out of the Divergence & Stokes’ Theorems and

they connect all the subsequent material with that given from lectures on e/m

theory given in your own Department.

1Do not confuse me with Dr J. Gibbons who is also in the Mathematics Dept.

Page 2: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 1

Contents

1 Revision : Things you need to recall about Vector Algebra 2

2 Scalar and Vector Fields 3

3 The vector operators : grad, div and curl 3

3.1 Definition of the gradient operator ∇ . . . . . . . . . . . . . . . . . . 3

3.2 Definition of the divergence of a vector field divB . . . . . . . . . . 4

3.3 Definition of the curl of a vector field curlB . . . . . . . . . . . . . 5

3.4 Five vector identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.5 Irrotational and solenoidal vector fields . . . . . . . . . . . . . . . . . 6

4 Line (path) integration 8

4.1 Line integrals of Type 1 :∫Cψ(x, y, z) ds . . . . . . . . . . . . . . . . 10

4.2 Line integrals of Type 2 :∫CF (x, y, z) ∙ dr . . . . . . . . . . . . . . 11

4.3 Independence of path in line integrals of Type 2 . . . . . . . . . . . 13

5 Double and multiple integration 15

5.1 How to evaluate a double integral . . . . . . . . . . . . . . . . . . . . 165.2 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.3 Examples of multiple integration . . . . . . . . . . . . . . . . . . . . . 175.4 Change of variable and the Jacobian . . . . . . . . . . . . . . . . . . . 185.5 Changing the order in double integration . . . . . . . . . . . . . . . . 20

6 Green’s Theorem in a plane 22

7 2D Divergence and Stokes’ Theorems 25

8 Maxwell’s Equations 29

Page 3: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 2

1 Revision : Things you need to recall about Vector Algebra

Notation: a = a1i+ a2j + a3k ≡ (a1, a2, a3).

1. The magnitude or length of a vector a is

|a| = a =(a21 + a

22 + a

23

)1/2. (1.1)

2. The scalar (dot) product of two vectors a = (a1, a2, a3) & b = (b1, b2, b3) is given by

a ∙ b = a1b1 + a2b2 + a3b3 . (1.2)

Since a ∙ b = ab cos θ, where θ is the angle between a and b, then a and b are

perpendicular if a ∙ b = 0, assuming neither a nor b are null.

3. The vector (cross) product 2 between two vectors a and b is

a× b =

∣∣∣∣∣∣∣

i j k

a1 a2 a3b1 b2 b3

∣∣∣∣∣∣∣. (1.3)

Recall that a× b can also be expressed as

a× b = (ab sin θ) n (1.4)

where n is a unit vector perpendicular to both a and b in a direction determined by the

right hand rule. If a× b = 0 then a and b are parallel if neither vector is null.

4. The scalar triple product between three vectors a, b and c is

a∙(b×c) =

∣∣∣∣∣∣

a1 a2 a3b1 b2 b3c1 c2 c3

∣∣∣∣∣∣

a

↗ ↘c ←− b

Cyclic Rule:

clockwise +ve(1.5)

According to the cyclic rule

a ∙ (b× c) = b ∙ (c× a) = c ∙ (a× b) (1.6)

One consequence is that if any two of the three vectors are equal (or parallel)

then their scalar product is zero: e.g. a ∙ (b× a) = b ∙ (a× a) = 0. If a ∙ (b× c) = 0and no pair of a, b and c are parallel then the three vectors must be coplanar.

5. The vector triple product between three vectors is

a× (b× c) = b(a ∙ c)− c(a ∙ b) . (1.7)

The placement of the brackets on the LHS is important: the RHS is a vector that lies

in the same plane as b and c whereas (a× b)× c = b(c ∙a)−a(c ∙ b) lies in the planeof a and b. Thus, a× b× c without brackets is a meaningless statement!

2It is acceptable to use the notation a ∧ b as an alternative to a× b.

Page 4: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 3

2 Scalar and Vector Fields

(L1) Our first aim is to step up from single variable calculus – that is, dealing with functionsof one variable – to functions of two, three or even four variables. The physics of electro-

magnetic (e/m) fields requires us to deal with the three co-ordinates of space (x, y, z) and

also time t. There are two different types of functions of the four variables :

1. A scalar field 3 is written as

ψ = ψ(x, y, z, t) . (2.1)

Note that one cannot plot ψ as a graph in the conventional sense as ψ takes values at

every point in space and time. A good example of a scalar field is the temperature of

the air in a room. If the box-shape of a room is thought of as a co-ordinate system with

the origin in one corner, then every point in that room can be labelled by a co-ordinate

(x, y, z). If the room is poorly air-conditioned the temperature in different parts may

vary widely : moving a thermometer around will measure the variation in temperature

from point to point (spatially) and also in time (temporally). Another example of a

scalar field is the concentration of salt or a dye dissolved in a fluid.

2. A vector field B(x, y, z, t) must have components (B1, B2, B3) in terms of the three

unit vectors (i, j, k)

B = iB1(x, y, z, t) + jB2(x, y, z, t) + kB3(x, y, z, t) . (2.2)

These components can each be functions of (x, y, z, t). Three physical examples of

vector fields are :

(a) An electric field :

E(x, y, z, t) = iE1(x, y, z, t) + jE2(x, y, z, t) + kE3(x, y, z, t) , (2.3)

(b) A magnetic field :

H(x, y, z, t) = iH1(x, y, z, t) + jH2(x, y, z, t) + kH3(x, y, z, t) , (2.4)

(c) The velocity field u(x, y, z, t) in a fluid.

A classic illustration of a three-dimensional vector field in action is the e/m signal received

by a mobile phone which can be received anywhere in space.

3 The vector operators : grad, div and curl

3.1 Definition of the gradient operator ∇

The gradient operator (grad) is denoted by the symbol ∇ and is defined as

∇ = i∂

∂x+ j

∂y+ k

∂z. (3.1)

3The convention is to use Greek letters for scalar fields and bold Roman for vector fields.

Page 5: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 4

As such it is a vector form of partial differentiation because it has spatial partial derivatives in

each of the three directions. On its right, ∇ can operate on a scalar field ψ(x, y, z)

∇ψ = i∂ψ

∂x+ j

∂ψ

∂y+ k

∂ψ

∂z. (3.2)

Note that while ψ is a scalar field, ∇ψ itself is a vector.

• Example 1) : With ψ = 13

(x3 + y3 + z3

)

∇ψ = ix2 + jy2 + kz2. (3.3)

As explained above, the RHS is a vector whereas ψ is a scalar.

• Example 2) : With ψ = xyz the vector ∇ψ is

∇ψ = iyz + jxz + kxy . (3.4)

End of L1

3.2 Definition of the divergence of a vector field divB

L2 Because vector algebra allows two forms of multiplication (the scalar and vector products)

there are two ways of operating ∇ on a vector

B = iB1(x, y, z, t) + jB2(x, y, z, t) + kB3(x, y, z, t) . (3.5)

The first is through the scalar or dot product

divB = ∇ ∙B =

(

i∂

∂x+ j

∂y+ k

∂z

)

∙(iB1 + jB2 + kB3

). (3.6)

Recalling that i ∙ i = j ∙ j = k ∙ k = 1 but i ∙ j = i ∙ k = k ∙ j = 0, the result is

divB = ∇ ∙B =∂B1

∂x+∂B2

∂y+∂B3

∂z. (3.7)

Note that divB is a scalar because div is formed through the dot product. The

best physical explanation that can be given is that divB is a measure of the compression or

expansion of a vector field through the 3 faces of a cube.

• If divB = 0 the the vector field B is incompressible ;• If divB > 0 the the vector field B is expanding ;

• If divB < 0 the the vector field B is compressing .

Page 6: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 5

Example 1 : Let r be the straight line vector r = ix+ jy + kz then

div r = 1 + 1 + 1 = 3 (3.8)

Example 2 : Let B = ix2 + jy2 + kz2 then

divB = 2x+ 2y + 2z (3.9)

Note : the usual rule in vector algebra that a ∙ b = b ∙ a (that is, a and b commute)doesn’t hold when one of them is an operator. Thus

B ∙ ∇ = B1∂

∂x+B2

∂y+B3

∂z6= ∇ ∙B (3.10)

3.3 Definition of the curl of a vector field curlB

The alternative in vector multiplication is to use ∇ in a cross product with a vector B :

curlB = ∇×B =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂zB1 B2 B3

∣∣∣∣∣∣∣. (3.11)

The best physical explanation that can be given is to visualize in colour the intensity of B

then curlB is a measure of the curvature in the field lines of B.

Example 1) : Take the vector denoting a straight line from the origin to a point (x, y, z)

denoted by r = ix+ jy + kz. Then

curl r = ∇× r =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂zx y z

∣∣∣∣∣∣∣= 0 . (3.12)

Example 2) : Choose B = 12

(ix2 + jy2 + kz2

)then

curlB = ∇×B =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂z12x2 1

2y2 1

2z2

∣∣∣∣∣∣∣= 0 . (3.13)

Example 3) : Take the vector denoted by B = iy2z2 + jx2z2 + kx2y2. Then

curlB = ∇×B =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂zy2z2 x2z2 x2y2

∣∣∣∣∣∣∣= 2x2i(y−z)−2y2j(x−z)+2z2k(x−y) . (3.14)

Page 7: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 6

Example 4) : For the curl of a two-dimensional vector B = iB1(x, y) + jB2(x, y) we have

curlB = ∇×B =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂zB1(x, y) B2(x, y) 0

∣∣∣∣∣∣∣= k

(∂B2

∂x−∂B1

∂y

)

, (3.15)

which points in the vertical direction only because there are no i and j components. End of L2

3.4 Five vector identities

L3 There are 5 useful vector identities (see hand out No 2). The proofs of 1), 4) and 5) are

obvious : for No 1) use the product rule. 2) and 3) can be proved with a little effort.

1. The gradient of the product of two scalars ψ and φ

∇(φψ) = ψ∇φ+ φ∇ψ . (3.16)

2. The divergence of the product of a scalar ψ with a vector b

div (ψB) = ψ divB + (∇ψ) ∙B . (3.17)

3. The curl of the product of a scalar ψ with a vector B

curl (ψB) = ψ curlB + (∇ψ)×B . (3.18)

4. The curl of the gradient of any scalar ψ

curl (∇ψ) = ∇×∇ψ = 0 , (3.19)

because the cross product ∇×∇ is zero.5. The divergence of the curl of any vector B

div (curlB) = ∇ ∙ (∇×B) = 0 . (3.20)

The cyclic rule for the scalar triple product in (3.20) shows that this is zero for all vectors

B because two vectors (∇) in the triple are the same.

3.5 Irrotational and solenoidal vector fields

Consider identities 4) & 5) above (see also Handout 2 “The role of grad, div & curl ...”)

curl (∇φ) = ∇×∇φ = 0 , (3.21)

div (curlB) = 0 . (3.22)

(3.21) says that if any vector B(x, y, z) can be written as the gradient of a scalar φ(x, y, z)

(which can’t always be done)

B = ∇φ (3.23)

Page 8: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 7

then automatically curlB = 0. Such vector fields are called irrotational vector fields.

It is equally true that for a given field B, then if it is found that curlB = 0, then we can

write 4

B = ±∇φ (3.24)

φ is called the “scalar potential”. Note that not every vector field has a corresponding

scalar potential, but only those that are curl-free.

Likewise we now turn to (3.22) : vector fields B for which divB = 0 are called solenoidal,

in which case B can be written as

B = curlA (3.25)

where the vector A is called a “vector potential”. Note that only vectors those that are

div-free have a corresponding vector potential 5.

Example : The Newtonian gravitational force between masses m and M (with gravitational

constant G) is

F = −GmMr

r3, (3.26)

where r = ix+ jy + kz and r2 = x2 + y2 + z2 .

1. Let us first calculate curlF

curlF = −GmM curl (ψr) , where ψ = r−3 . (3.27)

The 3rd in the list of vector identities gives

curl (ψr) = ψ curl r + (∇ψ)× r (3.28)

and we already know that curl r = 0. It remains to calculate ∇ψ :

∇ψ = ∇{(x2 + y2 + z2

)−3/2}= −

3(ix+ jy + kz)

(x2 + y2 + z2)5/2= −3r

r5. (3.29)

Thus, from (3.26),

curlF = −GmM

(

0−3r

2r5× r

)

= 0 . (3.30)

Thus the Newton gravitational force field is curl-free, which is why a gravita-

tional potential exists. We can write 6

F = −∇φ . (3.31)

One can find φ by inspection : it turns out that φ = −GmM 1/r.

4Whether we use + or − in (3.24) depends on convention : in e/m theory normally uses a minus signwhereas fluid dynamics uses a plus sign.5The last lecture on Maxwell’s Equations stresses that all magnetic fields in the universe are div-free as no

magnetic monopoles have yet been found : thus all magnetic fields are solendoidal vector fields.6In this case a negative sign is adopted on the scalar potential.

Page 9: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 8

2. Now let us calculate divF

divF = −GmM div (ψr) where ψ = r−3 . (3.32)

The 2nd in the list of vector identities gives

div (ψr) = ψ div r + (∇ψ) ∙ r (3.33)

and we already know that div r = 3 and we have already calculated ∇ψ in (3.29).

divF = −GmM

(3

r3−3r

r5∙ r

)

= 0 . (3.34)

Thus the Newton gravitational force field is also div-free, which is why a

gravitational vector potential A also exists.

As a final remark it is noted that with F satisfying both F = −∇φ and divF = 0, then

div (∇φ) = ∇2φ = 0 , (3.35)

which is known as Laplace’s equation. End of L3.

4 Line (path) integration

(L4) In single variable calculus the idea of the integral

∫ b

a

f(x) dx =N∑

i=1

f(xi)δxi (4.1)

is a way of expressing the sum of values of the function f(xi) at points xi multiplied by the

area of small strips δxi : correctly it is often expressed as the area under the curve f(x).

Pictorially the concept of an area sits very well in the plane with y = f(x) plotted against x.

However, the idea of area under a curve has to be dropped when line integration is

considered because we now wish to place our curve C in 3-space where a scalar field

ψ(x, y, z) or a vector field F (x, y, z) take values at every point in this space. Instead,

we consider a specified continuous curve C in 3-space – known as the path 7 of integration –

and then work out methods for summing the values that either ψ or F take on that curve.

It is essential to realize that the curve C sitting in 3-space and the scalar/vector

fields ψ or F that take values at every point in this space are wholly independent

quantities and must not be conflated.

7The same idea arises in complex integration where, by convention, a closed C is known as a ‘contour’.

Page 10: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 9

z

x

y A

B

C

Figure 3.1 : The curve C in 3-space starts at the point A and ends at B.

A

B

O

δr

δs

r

r + δr

Figure 3.2 : On a curve C, small elements of arc length δs and the chord δr, where O is the origin.

δx

δy

δs

Figure 3.3 : In 2-space we can use Pythagoras’ Theorem to express δs in terms of δx and δy.

Pythagoras’ Theorem in 3-space (see Fig 3.3 for a 2-space version) express δs in terms of δx,

δy and δz : (δs)2 = (δx)2 + (δy)2 + (δz)2. There are two types of line integral :

Type 1 : The first concerns the integration of a scalar field ψ along a path C∫

C

ψ(x, y, z) ds (4.2)

Page 11: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 10

Type 2 : The second concerns the integration of a vector field F along a path C∫

C

F (x, y, z) ∙ dr (4.3)

Remark : In either case, if the curve C is closed then we use the designations∮

C

ψ(x, y, z) ds and

C

F (x, y, z) ∙ dr (4.4)

4.1 Line integrals of Type 1 :∫Cψ(x, y, z) ds

How to evaluate these integrals is best shown by a series of examples keeping in mind that,

where possible, one should always draw a picture of the curve C :

Example 1) : Show that∫Cx2y ds = 1/3 where C is the circular arc in the first quadrant of

the unit circle.

y

x(0, 0)

(1, 0)

(0, 1)

δs

δθ

θ

(x, y)

C is the arc of the unit circle x2 + y2 = 1

represented in polars by x = cos θ and y = sin θ

for 0 ≤ θ ≤ π/2. Thus the small element of

arc length is δs = 1.δθ.

C

x2y ds =

∫ π/2

0

cos2 θ sin θ(dθ)

= 1/3 . (4.5)

Example 2) : Show that∫Cxy3 ds = 54

√10/5 where C is the line y = 3x from x = −1→ 1.

y

x

y = 3x

C is an element on the line y = 3x. Thus

δy = 3δx so

(δs)2 = (δx)2 + 9(δx)2 = 10(δx)2

C

xy3 ds = 27√10

∫ 1

−1x4dx = 54

√10/5 .

Example 3) : Show that∮Cx2y ds = −

√2/12 where C is the closed triangle in the figure.

Page 12: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 11

y

xC1 (1, 0)

(0, 1)

C3

C2

On C1 : y = 0 so ds = dx and∫C1= 0 (because y = 0).

On C2 : y = 1− x so dy = −dx and so (ds)2 = 2(ds)2.On C3 : x = 0 so ds = dy and

∫C3= 0 (because x = 0).

Therefore∮

C

=

C1

+

C2

+

C3

= 0 +

∫ 0

1

x2(1− x)√2 dx+ 0 = −

√2/12 . (4.6)

Note that we take the positive root of (ds)2 = 2(dx)2 but use the fact that following the

arrows on C2 the variable x goes from 1→ 0.

Example 4) : (see Sheet 2). Find∫C(x2 + y2 + z2) ds where C is the helix

r = i cos θ + j sin θ + kθ , (4.7)

with one turn : that is θ running from 0→ 2π .

From (4.7) we note that x = cos θ, y = sin θ and z = θ. Therefore dx = − sin θdθ,dy = cos θdθ and dz = dθ. Thus

(ds)2 =(sin2 θ + cos2 θ + 1

)(dθ)2 = 2(dθ)2 . (4.8)

Therefore we can write the integral as∫

C

(x2 + y2 + z2) ds =√2

∫ 2π

0

(1 + θ2

)dθ = 2π

√2(1 + 4π2/3

). (4.9)

End of L4

4.2 Line integrals of Type 2 :∫CF (x, y, z) ∙ dr

A

B

O

δr

δs

r

r + δr

F

Figure 3.4 : A vector F and a curve C with the chord δr : O is the origin.

(L5)

Page 13: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 12

1. Think of F as a force on a particle being drawn through the path of the curve C. Then

the work done δW in pulling the particle along the curve with arc length δs and chord

δr is δW = F ∙ δr. Thus the full work W is

W =

C

F ∙ dr . (4.10)

2. The second example revolves around taking F as an electric field E(x, y, z). Then

the mathematical expression of Faraday’s Law says that the electro-motive force on a

particle of charge e travelling along C is precisely e∫CE(x, y, z) ∙ dr .

Example 1 : Evaluate∫CF ∙ dr given that F = ix2y + j(x− z) + kxyz and the path C is

the parabola y = x2 in the plane z = 2 from (0, 0, 2)→ (1, 1, 2).y

x

↗ C1↗C2

(1, 1)

C1 is along the curve y = x2 in the plane z = 2 in which

case dz = 0 and dy = 2x dx. C2 is along the straight

line y = x in which case dy = dx.

C1

F ∙ dr =∫

C1

(F1dx+ F2dy + F3dz)

=

C1

(x2y dx+ (x− z) dy + xyz dz

)

=

C1

(x2y dx+ (x− 2) dy

)(4.11)

Using the fact that dy = 2x dx we have

I =

∫ 1

0

(x4 dx+ (x− 2)2x dx

)

=

∫ 1

0

(x4 + 2x2 − 4x

)dx = −17/15 . (4.12)

Finally, with the same integrand but along C2 we have

C2

F ∙ dr =∫ 1

0

(x3 dx+ (x− 2) dx

)

= 1/4 + 1/2− 2 = −5/4 . (4.13)

This example illustrates the point that with the same integrand and start/end points

the value of an integral can differ when the route between these points is varied.

Page 14: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 13

Example 2 : Evaluate I =∫C(y2dx − 2x2dy) given that F = (y2,−2x2) with the path C

taken as y = x2 in the z = 0 plane from (0, 0, 0)→ (2, 4, 0).y

x

C

(2, 4)

C is the curve y = x2 in the plane z = 0, in which

case dz = 0 and dy = 2x dx. The starting point has

co-ordinates (0, 0, 0) and the end point (2, 4, 0).

I =

C

(y2dx− 2x2dy)

=

∫ 2

0

(x4 − 4x3

)dx = −48/5 . (4.14)

Example 3 : Given that F = ix− jz+2ky, where C is the curve z = y4 in the x = 1 plane,show that from (1, 0, 0)→ (1, 1, 1) the value of the line integral is 7/5.

On C we have dz = 4y3dy and in the plane x = 1 we also have dx = 0. Therefore∫

C

F ∙ dr =∫

C

(x dx− z dy + 2y dz)

=

∫ 1

0

(−y4 + 8y4

)dy = 7/5 . (4.15)

End of L5

4.3 Independence of path in line integrals of Type 2

(L6) Are there circumstances in which a line integral∫CF ∙ dr, for a given F , takes values

which are independent of the path C?

To explore this question let us consider the case where F ∙ dr is an exact differential : that isF ∙ dr = −dφ for some scalar8 φ. For starting and end co-ordinates A and B of C we have

C

F ∙ dr = −∫

C

dφ = φ[A]− φ[B] . (4.16)

This result is independent of the route or path taken between A and B. Thus we

need to know what F ∙ dr = −dφ means. Firstly, from the chain rule

dφ =∂φ

∂xdx+

∂φ

∂ydy +

∂φ

∂zdz = ∇φ ∙ dr . (4.17)

8As stated earlier, the choice of sign is by convention.

Page 15: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 14

Hence, if F ∙ dr = −dφ we have F = −∇φ, which means that F must be a curl-freevector field

curlF = 0 , (4.18)

where φ is the scalar potential. A curl-free F is also known as a conservative vector field.

Result : The integral∫CF ∙ dr is independent of path only if curlF = 0. Moreover, when C

is closed then ∮

C

F ∙ dr = 0 . (4.19)

Example 1 : Is the line integral∫C(2xy2 dx+ 2x2y dy) independent of path?

We can see that F is expressed as F = 2xy2i+ 2x2yj + 0k. Then

curlF =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂z2xy2 2x2y 0

∣∣∣∣∣∣∣= (4xy − 4xy)k = 0 . (4.20)

Thus the integral is independent of path and we should be able to calculate φ from F = −∇φ.

−∂φ

∂x= 2xy2 , −

∂φ

∂y= 2x2y , −

∂φ

∂z= 0 . (4.21)

Partial integration of the 1st equation gives φ = −x2y2 + A(y) where A(y) is an arbitraryfunction of y only, whereas from the second φ = −x2y2 + B(x). Thus A(y) = B(x) =

const = C. Hence

φ = −x2y2 + C . (4.22)

Example 2 : Find the work done∫CF ∙ dr by the force F = (yz, xz, xy) moving from

(1, 1, 1)→ (3, 3, 2).

Is this line integral independent of path? We check to see if curlF = 0.

curlF =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂zyz xz xy

∣∣∣∣∣∣∣= 0 . (4.23)

Thus the integral is independent of path and φ must exist. In fact −φx = yz, − φy = xz

and −φz = xy. Integrating the first gives φ = −xyz + A(y, z), the second gives φ =

−xyz +B(x, z) and the third φ = −xyz + C(x, y). Thus A = B = C = const and

φ = −xyz + const . (4.24)

W = −∫ (3,3,2)

(1,1,1)

dφ =[xyz](3,3,2)(1,1,1)

= 18− 1 = 17 . (4.25)

Page 16: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 15

Example 3 : Find∫CF ∙ dr on every path between (0, 0, 1) and (1, π/4, 2) where

F =(2xyz2, (x2z2 + z cos yz), (2x2yz + y cos yz)

). (4.26)

We check to see if curlF = 0.

curlF =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂z2xyz2 (x2z2 + z cos yz) (2x2yz + y cos yz)

∣∣∣∣∣∣∣= 0 . (4.27)

Thus the integral is independent of path and φ must exist. Then φx = −2xyz2, φy =−(x2z2 + z cos yz) and φz = −(2x2yz + y cos yz). Integration of the first gives

φ = −x2yz2 + A(y, z) , (4.28)

of the second

φ = −(x2yz2 + sin yz) + B(x, z) , (4.29)

and the third

φ = −(x2yz2 + sin yz) + C(x, y) . (4.30)

The only way these are compatible is if A(y, z) = sin yz + c and B = C = c = const. and so

φ = −(x2yz2 + sin yz) + c. In consequence∫

C

F ∙ dr = −[φ](1,π/4, 2)(0,0,1)

= π + 1 . End of L6 (4.31)

5 Double and multiple integration

(L7) Now we move on to yet another different concept of integration : that is, summationover an area instead of along a curve.

Consider the value of a scalar function ψ(xi, yi) at the co-ordinate point (xi, yi) at the lower

left hand corner of the square of area δAi = δxiδyi. Then

N∑

i=1

M∑

j=1

ψ(xi, yi) δAi →∫ ∫

R

ψ(x, y) dxdy

︸ ︷︷ ︸double integral

as δx→ 0, δy → 0 . (5.1)

We say that the RHS is the “double integral of ψ over the region R”. Note : do not confuse

this with the area of R itself, which is

Area of R =

∫ ∫

R

dxdy . (5.2)

Page 17: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 16

5.1 How to evaluate a double integral

y

x

y = h(x)

R

y = g(x)

a b

Figure 4.2 : The region R is bounded between the upper curve y = h(x), the lower curve y = g(x)

and the vertical lines x = a and x = b.

∫ ∫

R

ψ(x, y) dxdy =

∫ b

a

{∫ y=h(x)

y=g(x)

ψ(x, y) dy

}

dx (5.3)

The inner integral is a partial integral over y holding x constant. Thus the inner integral is a

function of x ∫ y=h(x)

y=g(x)

ψ(x, y) dy = P (x) (5.4)

and so ∫ ∫

R

ψ(x, y) dxdy =

∫ b

a

P (x) dx . (5.5)

Moreover the area of R itself is

Area of R =

∫ b

a

{∫ y=h(x)

y=g(x)

dy

}

dx =

∫ b

a

{h(x)− g(x)} dx (5.6)

5.2 Applications

1. Area under a curve: For a function of a single variable y = f(x) between limits x = a

and x = b

Area =

∫ b

a

{∫ f(x)

0

dy

}

dx =

∫ b

a

f(x) dx . (5.7)

2. Volume under a surface : A surface is 3-space may be expressed as z = f(x, y)

Volume =

∫ ∫ ∫

V

dxdydz =

R

{∫ f(x,y)

0

dz

}

dxdy

=

∫ ∫

R

f(x, y) dxdy (5.8)

Page 18: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 17

By this process, a 3-integral has been reduced to a double integral. A specific example

would be the volume of an upper unit hemisphere z = +√1− (x2 + y2) ≡ f(x, y)

centred at the origin.

3. Mass of a solid body : Let ρ(x, y, z) be the variable density of the material in a solid

body. Then the mass δM of a small volume δV = δxδyδz is δM = ρ δV , End of L7

Mass of body =

∫ ∫ ∫

V

ρ(x, y, z) dV . (5.9)

5.3 Examples of multiple integration

L8 Example 1 : Consider the first quadrant of a circle of radius a. Show that :y

x(0, 0)

(a, 0)

(0, a)

(x, y)

C

R

(i) Area of R = πa2/4

(ii)

∫ ∫

R

xy dxdy = a4/8

(iii)

∫ ∫

R

x2y2 dxdy = πa6/96

i) : The area of R is given by

A =

∫ a

0

{∫ √a2−x2

0

dy

}

dx =

∫ a

0

√a2 − x2 dx . (5.10)

Let x = a cos θ and y = a sin θ then A = 12a2∫ π/20(1− cos 2θ) dθ = πa2/4.

ii) :∫ ∫

R

xy dxdy =

∫ a

0

x

(∫ √a2−x2

0

y dy

)

dx

= 12

∫ a

0

x(a2 − x2) dx

= 12

[12x2a2 − 1

4x4]a0= a4/8 . (5.11)

iii) :∫ ∫

R

x2y2 dxdy =

∫ a

0

x2

(∫ √a2−x2

0

y2 dy

)

dx

= 13

∫ a

0

x2(a2 − x2)3/2 dx

= 13a6∫ π/2

0

cos2 θ sin4 θ dθ

= 13a6(I2 − I3

). (5.12)

Page 19: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 18

where In =∫ π/20sin2n θ dθ. Using a Reduction Formula method we find that

In =

(2n− 12n

)

In−1 , I0 = π/2 . (5.13)

Thus I2 = 3π/16 and I2 = 15π/96 and so from (5.12) the answer is πa6/96.

5.4 Change of variable and the Jacobian

In the last example it might have been easier to have invoked the natural circular symmetry

in the problem. Hence we must ask how δA = δxδy would be expressed in polar co-ordinates.

This suggests considering a more general co-ordinate change. In the two figures below we see

a region R in the x − y plane that is distorted into R∗ in the plane of the new co-ordinatesu = u(x, y) and v = v(x, y)

y

x

R

v

u

R∗

The transformation relating the two small areas δxδy and δuδv is given here by (the modulus

sign is a necessity) :

Result 1 :

dxdy = |Ju,v(x, y)| dudv , (5.14)

where the Jacobian Ju,v(x, y) is defined by

Ju,v(x, y) =

∣∣∣∣∂x∂u

∂x∂v

∂y∂u

∂y∂v

∣∣∣∣ (5.15)

Note that∂x

∂u6=

(∂u

∂x

)−1(5.16)

because ux is computed at y = const whereas xu is computed at v = const. However, luckily

there is an inverse relationship between the two Jacobians

Jx,y(u, v) = [Ju,v(x, y)]−1 (5.17)

dudv = |Jx,y(u, v)| dxdy (5.18)

Either (5.14) and (5.18) can therefore be used at one’s convenience.

Page 20: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 19

Proof : (not examinable). Consider two sets of orthogonal unit vectors ; (i , j) in the x− y-plane, and (u , v) in the u− v-plane. Keeping in mind that the component of δx along u is(δx/δu)δu (v is constant along u), in vectorial notation we can write

δx = uδx

δuδu+ v

δx

δvδv (5.19)

δy = uδy

δuδu+ v

δy

δvδv (5.20)

and so the cross-product is

δx× δy =

(

uδx

δuδu+ v

δx

δvδv

)

×

(

uδy

δuδu+ v

δy

δvδv

)

, (5.21)

Therefore

dx dy = |δx× δy| =

∣∣∣∣det

(∂x∂u

∂x∂v

∂y∂u

∂y∂v

)∣∣∣∣ |u× v| dudv

= |Ju,v(x, y)| dudv . (5.22)

The inverse relationship (5.18) can be proved in a similar manner �

Result 2 :∫ ∫

R

f(x, y) dxdy =

∫ ∫

R∗f(x(u, v), y(u, v)) |Ju,v(x, y)| dudv . (5.23)

Example 1 : For polar co-ordinates x = r cos θ and y = r sin θ we take u = r and v = θ

Jr,θ(x, y) =

∣∣∣∣∂x∂r

∂x∂θ

∂y∂r

∂y∂θ

∣∣∣∣ =

∣∣∣∣cos θ −r sin θsin θ r cos θ

∣∣∣∣ = r (5.24)

Thus dxdy = r drdθ .

Example 2 : To calculate the volume of a sphere of radius a we note that z = ±√a2 − x2 − y2.

Doubling up the two hemispheres we obtain

Volume = 2

∫ ∫

R

√a2 − x2 − y2 dxdy (5.25)

where R is the circle x2 + y2 = a2 in the z = 0 plane. Using a change of variable

Volume = 2

∫ ∫

R

√a2 − x2 − y2 dxdy

= 2

∫ ∫

R

√a2 − r2 rdrdθ

= 2

∫ a

0

√a2 − r2 rdr

∫ 2π

0

= 4πa3/3 . (5.26)

Page 21: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 20

Example 3 : From the example in §5.3 over the quarter circle in the first quadrant it wouldbe easier to compute in polars. Thus

Area of R =

∫ ∫

R

dxdy =

∫ ∫

R

rdrdθ

=

∫ a

0

rdr

∫ π/2

0

dθ = πa2/4 (5.27)

∫ ∫

R

xy dxdy =

∫ ∫

R

r3 cos θ sin θdrdθ

=

∫ a

0

r3dr

∫ π/2

0

cos θ sin θdθ

= 14a4∫ π/2

0

12sin 2θdθ

= (a4/16)[− cos 2θ]π/20 = a4/8 . (5.28)

Likewise one may show that

∫ ∫

R

x2y2 dxdy =

∫ ∫

R

r5 cos2 θ sin2 θ drdθ

=

∫ a

0

r5dr

∫ π/2

0

cos2 θ sin2 θdθ = πa6/96 . (5.29)

Example 4 : Show that∫ ∫R(x2 + y2) dxdy = 8/3 using u = x+ y and v = x− y. where R

has corners at (0, 0), (1, 1), (2, 0) and (1,−1) and rotates to a square with corners at (0, 0),(2, 0), (2, 2) and (0, 2). From x = 1

2(u+ v) and y = 1

2(u− v) it is found that

Ju,v(x, y) = − 12

(5.30)

I = 14

∫ ∫

R∗2(u2 + v2) |− 1

2| dudv

= 14

{[13u3]20[v]20 +

[13v3]20[u]20

}= 8/3 . (5.31)

End of L8

5.5 Changing the order in double integration

In a handout, not in lectures. An example is used to illustrate this : consider

I =

∫ a

0

(∫ a

y

x2 dx

x2 + y2

)

dy . (5.32)

Page 22: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 21

Performing the integration in this order is hard as it involves a term in tan−1(ay

). To make

evaluation easier we change the order of the x-integration and the y-integration; first, however,

we must deduce what the area of integration is from the internal limits in (5.32). The internal

integral is of the type ∫ x=a

x=y

f(x, y) dx. (5.33)

Being an integration over x means that we are summing horizontally so we have left and right

hand limits. The left limit is x = y and the right limit is x = a. This is shown in the drawing

of the graph where the region of integration is labelled as R:

y

xa

x = a

y = 0

x = y

R

Now we want to perform the integration over R but in reverse order to that above: we integrate

vertically first by reading off the lower limit as y = 0 and the upper limit as y = x. After

integrating horizontally with limits x = 0 to x = a, this reads as

I =

∫ a

0

(∫ y=x

y=0

x2 dy

x2 + y2

)

dx. (5.34)

The inside integral can be done with ease. x is treated as a constant because the integration

is over y. Therefore define y = xθ where θ is the new variable. We find that

∫ x

0

x2 dy

x2 + y2= x

∫ 1

0

1 + θ2=xπ

4. (5.35)

Hence

I =π

4

∫ a

0

x dx

=πa2

8. (5.36)

Page 23: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 22

6 Green’s Theorem in a plane

L9 Green’s Theorem in a plane – which will be quoted at the bottom of an exam question

where necessary – tells us how behaviour on the boundary of a close curve C through a closed

line integral in two dimensions is related to the double integral over the region inside R.

Theorem 1 Let R be a closed bounded region in the x − y plane with a piecewise smoothboundary C. Let P (x, y) and Q(x, y) be arbitrary, continuous functions within R having

continuous partial derivatives Qx and Py. Then∮

C

(Pdx+Qdy) =

∫ ∫

R

(Qx − Py) dxdy . (6.1)

y

x

C1

y = g(x)

C2

y = h(x)

R

a b

Figure : In the x − y plane the boundary curve C is made up from two counter-clockwise curves

C1 and C2 : R denotes the region inside.

Proof : R is represented by the upper and lower boundaries (as in the Figure above)

g(x) ≤ y ≤ h(x) (6.2)

and so∫ ∫

R

∂P

∂ydxdy =

∫ b

a

{∫ y=h(x)

y=g(x)

∂P

∂ydy

}

dx

=

∫ b

a

{P(x, h(x)

)− P

(x, g(x)

)}dx

= −∫ b

a

P(x, g(x)

)dx−

∫ a

b

P(x, h(x)

)dx

︸ ︷︷ ︸switched limits & sign

= −∫

C1

P(x, y)dx−

C2

P(x, y)dx

= −∮

C

P(x, y)dx . (6.3)

Page 24: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 23

The same method can be used the other way round to prove that (note the +ve sign)

∫ ∫

R

∂Q

∂xdxdy =

C

Q(x, y)dy (6.4)

Both these results are true separately but can be pieced together to form the final result. �

Example 1 : Use Green’s Theorem to evaluate the line integral∮ {(x− y) dx− x2dy

}, (6.5)

where R and C are given byy

x

C1 → 2

2

↑ C2

C3

C4 ↓ R

(2, 2)

Using G.T. with P = x − y and Q = −x2 over thebox-like region R we obtain

∮ {(x− y) dx− x2dy

}=

∫ ∫

R

(1− 2x) dxdy

=

∫ 2

0

dy

∫ 2

0

(1− 2x) dx

= −4 . (6.6)

Direct valuation gives∮C=∫C1+∫C2+∫C3+∫C4where C1 is y = 0 ; C2 is x = 2 ; C3 is

y = 2 and C4 is x = 0. Thus

C

=

∫ 2

0

x dx− 4∫ 2

0

dy +

∫ 0

2

(x− 2) dx+ 0 = 2− 8 + 2 = −4 . (6.7)

Example 2 : Using Green’s Theorem over R in the diagram, show that∮ {

y3 dx+ (x3 + 3xy2) dy}= 3/20 (6.8)

y

x

C1

y = x2

C2

y = x

R

(1, 1)

Page 25: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 24

Using Green’s Theorem

∮ {y3 dx+ (x3 + 3xy2) dy

}= 3

∫ ∫

R

x2 dxdy

= 3

∫ 1

0

x2(∫ y=x

y=x2dy

)

dx

= 3

∫ 1

0

(x3 − x4

)dx = 3/20 . End of L9 (6.9)

L10 Example 3 : (Part of 2005 exam) : With a suitable choice of P and Q and R as in the

figure, show that

12

C

(x dy − y dx) =∫ ∫

R

dxdy = 1/3 . (6.10)

y

x

↗↓y = 1

2x2

y = x

R

(2, 2)

1 2

∫ ∫

R

dxdy =

∫ 2

1

(∫ x

12x2dy

)

dx =

∫ 2

1

(x− 1

2x2)dx = 1/3 . (6.11)

Around the line integral we have

∮= 1

2

∫ 2

1

(x2 − 1

2x2)dx+ 1

2

∫ 2

1

(xdx− xdx) + 12

∫ 1/2

1

dy

= 7/12− 1/4 = 1/3 . (6.12)

Example 4 : (Part of 2004 exam) : If Q = x2 and P = −y2 and R is as in the figure below,show that ∮

C

(x2dy − y2dx) = 2∫ ∫

R

(x+ y) dxdy = 24/5 . (6.13)

Page 26: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 25

y

x

y = 12x2

y2 = 2x

R

(2, 2)

2

The RHS is obvious in the sense that Qx − Py = 2x+ 2y and so

2

∫ ∫

R

(x+ y) dxdy = 2

∫ 2

0

x

(∫ √2x

12x2

dy

)

dx+ 2

∫ 2

0

(∫ √2x

12x2

y dy

)

dx

= 2

∫ 2

0

[x(√2x− 1

2x2)+ 1

2

(2x− 1

4x4)]dx

= 2

∫ 2

0

[√2x3/2 − 1

2x3 + x− 1

8x4]dx = 24/5 . (6.14)

The sum of the three line integrals can be done to get the same answer.

7 2D Divergence and Stokes’ Theorems

A

B

O

δr

δs

r

r + δr

Figure 6.1 : On a curve C, with starting and ending points A and B, small elements of arc length

δs and the chord δr, where O is the origin.

Page 27: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 26

The chord δr and the arc δs in the figure show us how to define a unit tangent vector T

T = limδr→0

δr

δs=dr

ds

= idx

ds+ j

dy

ds. (7.1)

The unit normal n must be perpendicular to this : that is n ∙ T = 0, giving

n = ±

(

idy

ds− j

dx

ds

)

, (7.2)

where ± refer to inner and outer normals.

A) The Divergence Theorem : Define a 2D vector u = iQ− jP . Then

u ∙ n = Pdx

ds+Q

dy

dsdivu = Qx − Py (7.3)

Thus Green’s Theorem turns into a 2D version of Divergence Theorem∫ ∫

R

divu dxdy =

C

u ∙ n ds (7.4)

This line integral simply expresses the sum of the normal component of u around the

boundary. If u is a solenoidal vector (divu = 0) then automatically∮Cu ∙ n ds = 0.

The 3D version 9 uses an arbitrary 3D vector field u(x, y, z) that lives in some finite,

simply connected volume V whose surface is S: dA is some small element of area on the

curved surface S ∫ ∫ ∫

V

divu dV =

∫ ∫

S

u ∙ n dA (7.5)

End of L10

B) Stokes’ Theorem : L11 Now define a 2D vector v = iP + jQ. Then

v ∙ dr = (v ∙ T ) ds = P dx+Qdy . (7.6)

Moreover

curlv =

∣∣∣∣∣∣∣

i j k

∂x ∂y ∂zP Q 0

∣∣∣∣∣∣∣= k (Qx − Py) (7.7)

Page 28: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 27

Thus Green’s Theorem turns into a 2D version of Stokes’ Theorem∫ ∫

R

(k ∙ curlv

)dxdy =

C

v ∙ dr (7.8)

The line integral on the RHS is called the circulation. Note that if v is an irrotational

vector then∮Cv ∙ dr = 0 which means there is no circulation.

The 3D-version of Stokes’ Theorem for an arbitrary 3D vector field v(x, y, z) in a volume

V is given by ∮

C

v ∙ dr =∫ ∫

S

n ∙ curlv dA . (7.9)

n is the unit normal vector to the surface S of V . C is a closed circuit circumscribed on

the surface of the volume and S is the surface of the ‘cap’ above C.

Example 1 : (part of 2002 exam) If v = iy2 + jx2 and R is as in the figure below, by

evaluating the line integral, show that∮

C

v ∙ dr = 5/48 . (7.10)

y

x112

y = 1/(4x)

y = x

y = x

R

C1 ↘

↑ C2↙ C3

Firstly ∮v ∙ dr =

C

(y2dx+ x2dy

). (7.11)

(i) On C1 we have y = 1/(4x) and so dy = −dx/(4x2). Therefore∫

C1

v ∙ dr =∫ 1

12

(1

16x2−1

4

)

dx = −1

16. (7.12)

(ii) On C2 we have x = 1 and so dx = 0. Therefore∫

C2

v ∙ dr =∫ 1

14

dy =3

4. (7.13)

Page 29: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 28

(iii) On C3 we have y = x and so dy = dx. Therefore

C3

v ∙ dr = 2∫ 1

2

1

x2 dx = −7

12. (7.14)

Summing these three results gives − 116+ 34− 712= 548.

Example 2 : (part of 2003 exam) If

u = ix2y

1 + y2+ j

[x ln(1 + y2)

](7.15)

and R is as in the figure below, show that∫ ∫

R

divu dxdy = 2 ln 2− 1 . (7.16)

y

x1C1 →

y = x

R

↑ C2C3 ↙

Firstly we calculate divu

divu =4xy

1 + y2(7.17)

and so∫ ∫

R

divu dxdy = 4

∫ ∫

R

xy

1 + y2dxdy

= 4

∫ 1

0

x

(∫ y=x

y=0

∫y dy

1 + y2

)

dx

= 4

∫ 1

0

x[12ln(1 + y2)

]x0dx

= 2

∫ 1

0

x ln(1 + x2) dx

= 2 ln 2− 1 (7.18)

End of L11

Page 30: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 29

8 Maxwell’s Equations

L12 Maxwell’s equations are technically not in my syllabus but I give this lecture to tie every-

thing together in a physical context.

Consider a 3D volume with a closed circuit C drawn on its surface. Let’s use the 3D

versions of the Divergence (7.5) and Stokes’ Theorems (7.9) to derive some relationships

between various electro-magnetic variables.

1. Using the charge density ρ, the total charge within the volume V must be equal to

surface area integral of the electric flux density D through the surface S (recall thatD = εE where E is the electric field).

∫ ∫ ∫

V

ρ dV =

∫ ∫

S

D ∙ n dA . (8.1)

Using a 3D version of the Divergence Theorem (7.5) above on the RHS of (8.1)

∫ ∫ ∫

V

ρ dV =

∫ ∫ ∫

V

divD dV . (8.2)

Hence we have the first of Maxwell’s equations

divD = ρ (8.3)

This is also known as Gauss’s Law.

2. Following the above in the same manner for the magnetic flux density B (recall that

B = μH whereH is the magnetic field) but noting that there are no magnetic sources

(so ρmag = 0), we have the 2nd of Maxwell’s equations

divB = 0 (8.4)

3. Faraday’s Law says that the rate of change of magnetic flux linking a circuit C is

proportional to the electromotive force (in the negative sense). Mathematically this is

expressed asd

dt

∫ ∫

S

B ∙ n dA = −∮

C

E ∙ dr (8.5)

Using a 3D version of Stokes’ Theorem (7.9) on the RHS of (8.4), and taking the time

derivative through the surface integral (thereby making it a partial derivative) we have

the 3rd of Maxwell’s equations

curlE +∂B

∂t= 0 (8.6)

Page 31: EE2 Mathematics: Vector Calculus - Imperial College …jdg/ee2ma-vc.pdf · 14th/10/10 (EE2Ma-VC.pdf) 1 Contents 1 Revision: Things you need to recall about Vector Algebra 2 2 Scalar

14th/10/10 (EE2Ma-VC.pdf) 30

4. Ampere’s (Biot-Savart) Law expressed mathematically (the line integral of the magnetic

field around a circuit C is equal to the current enclosed) is

∫ ∫

S

J ∙ n dA =∮

C

H ∙ dr , (8.7)

where J is the current density and H is the magnetic field. Using 3D-Stokes’ Theorem

(7.9) on the RHS we find that we have curlH = J and therefore divJ = 0, which is

inconsistent with the first three of Maxwell’s equations. Why? The continuity equation

for the total charge is

d

dt

∫ ∫ ∫

V

ρ dV = −∫ ∫

S

J ∙ n dA . (8.8)

Using the Divergence Theorem on the LHS we obtain

divJ +∂ρ

∂t= 0 . (8.9)

If divJ = 0 then ρ would have to be independent of t. To get round this problem we

use Gauss’s Law ρ = divD expressed above to get

div

{

J +∂D∂t

}

= 0 (8.10)

and so this motivates us to replace J in curlH = J by J + ∂D/∂t giving the 4th ofMaxwell’s equations

curlH = J +∂D∂t

(8.11)

5. We finally note that because divB = 0 then B is a solenoidal vector field: there must

exist a vector potential A such that B = curlA. Using this in the 3rd of Maxwell’s

equations, we have

curl

[

E +∂A

∂t

]

= 0 . (8.12)

This means that there must also exist a scalar potential φ that satisfies

E = −∂A

∂t−∇φ . (8.13)

End of L12 and the Vector Calculus part of EE2 Maths.