Mathematical Physics-08-Contour and Surface Integrals

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Contour and surface integrals

Contour integrals of the scalar type


These are integrals of the type

I = ‡ f@rD  l
C

where C is a contour and „l is an infinitesimal element of the contour length. If the contour can be described by {y[x], z[x]),
one can use

y 2 z 2
l = 1+ +  x.
x x

For more complicated contours one can rewrite the contour integral as an integral over a parameter t and use the expression
of the contour in the parametric form {x[t], y[t], z[t]}. In this case the length element becomes

x 2 y 2 z 2
l = + +  t.
t t t

ü Perimeter of an ellipse

As an example, let us calculate the perimeter of the ellipse

x2 y2
+ = 1,
a2 b2
Here, for the upper part of the ellipse, one has

x2 y − x ë a2
y=b 1− , =b
a2 x
x2
1−
a2

Thus the perimeter is given by

b2 x2 ë a4 a2 − J1 − N x2
b2
a y 2 a a
P=2‡ x = 2 ‡ x = 2 ‡
a2
1+ 1+  x.
−a x −a 1−
x2 −a a2 − x2
a2

In the case of a circle, a = b = R, one easily obtains P = 2pR. However, in the general case the integral cannot be expressed
via elementary functions.
2 Mathematical_physics-08-Contour_and_surface_integrals.nb

a2 + J− 1 + N x2
b2
a2
2 IntegrateB , 8x, − a, a<, Assumptions → 80 < a < b<F
a2 − x2

a2 + J− 1 + N x2
b2
a2
2 IntegrateB , 8x, − a, a<, Assumptions → 80 < b < a<F
a2 − x2

b2
4 a EllipticEB1 − F
a2

b2
4 a EllipticEB1 − F
a2

The solution is one of elliptic integrals that received their name from the ellipse. For the circle one has

P = 4 a EllipticE@0D

2aπ

In the case of b Ø 0 one has

P = 4 a EllipticE@1D

4a

that is an expected result as well. A similar result arises in the case a Ø 0

b2
4 a EllipticEB1 − F
a2

b2
P = 4 LimitBa EllipticEB1 − F, a → 0F
a2

4 b2

Let us check that the solution is symetric in a and b

b2 a2
In[31]:= FullSimplifyBa EllipticEB1 − F  b EllipticEB1 − F, Assumptions → 80 < b < a<F
a2 b2
a2 b2
Out[31]= b EllipticEB1 − F  a EllipticEB1 − F
b2 a2

This is too difficult for Mathematica that seemingly does not know relations between elliptic integrals. Let us define the
function

b2 a2
In[34]:= fab@a_, b_D := a EllipticEB1 − F − b EllipticEB1 − F
a2 b2

This function is zero for any set of arguments:

In[35]:= fab@1, 2D êê FullSimplify


fab@1, 2.D
3
Out[35]= EllipticE@− 3D − 2 EllipticEB F
4

Out[36]= 4.44089 × 10−16

that is zero up to the Mathematica's standard precision. Let us now plot P/(4a) that has particular cases
Mathematical_physics-08-Contour_and_surface_integrals.nb 3

1, b << a
= : π ê 2, b = a
P
4a b ê a, b >> a

as a function of rba ª b/a.

In[1]:= PlotA9rba, EllipticEA1 − rba2 E, π ê 2=, 8rba, 0, 4<, PlotStyle → 8Dashed, Thick, Dotted<E

Out[1]= 2

1 2 3 4

The ratio of the area of the ellipse S = pab to the a square of its perimeter is
S π b 1
=
P2 F
16 a b2 2
EllipticEB1 − a2

This means that we have expressed the area through the perimeter and the ratio rba ª b/a, as two independent variables:

π b P2
S=
F
16 a b2 2
EllipticEB1 − a2

Let us plot this function vs b/a for a fixed P = 1 to see that its maximum corresponds to b/a = 1

π P2
In[2]:= PlotB rba ê. P → 1, 8rba, 0, 5<F
EllipticEA1 − rba2 E
16 2

0.08

0.06

Out[2]= 0.04

0.02

1 2 3 4 5

ü Center of mass of a parabola segment

Let us calculate the position of the center of mass of the parabola segment

k x2
y= , −a < x < a
2
4 Mathematical_physics-08-Contour_and_surface_integrals.nb

The vertical coordinate of the center of mass is given by the contour integral

1 1 y 2 k a x2
yCM = ‡ y l = ‡ y 1+ x = ‡ 1 + k2 x2  x
L C L C x L −a 2

where
a
L = ‡ l = ‡ 1 + k2 x2  x
C −a

is the length of the parabola segment. Calculation of the integrals yields

In[37]:= L = IntegrateB 1 + k2 x2 , 8x, − a, a<, Assumptions → 8a > 0, k > 0<F

ArcSinh@a kD
Out[37]= a 1 + a2 k2 +
k

and

k x2
In[38]:= FullSimplifyByCM = IntegrateB 1 + k2 x2 , 8x, − a, a<, Assumptions → 8a > 0, k > 0<F,
L 2
Assumptions → k > 0F

ak 1 + a2 k2 I1 + 2 a2 k2 M − ArcSinh@a kD
Out[38]=

8k ak 1 + a2 k2 + ArcSinh@a kD

Particular value:

In[39]:= yCM = yCM ê. 8a → 1, k → 1.<

Out[39]= 0.183029

In[49]:= ShowB
x2
PlotB , 8x, − 1, 1<, AspectRatio → 0.25F,
2
Graphics@Disk@80, yCM<, 0.015DD

0.5
0.4
0.3
Out[49]=
0.2
0.1

-1.0 -0.5 0.5 1.0

ü Length of a cycloide

Find the length of a cycloid


x@φD = Sin@φD + a φ; y@φD = Cos@φD;

in the interval aœ{0,2p}. Here is a plot of the cycloid.


Mathematical_physics-08-Contour_and_surface_integrals.nb 5

In[56]:= x@φ_D := Sin@φD + a φ; y@φ_D := Cos@φD;


ParametricPlot@8x@φD ê. a → 1 ê 2, y@φD<, 8φ, 0, 4 π<D H∗ Cycloide ∗L

1.0

0.5

Out[57]=
1 2 3 4 5 6
-0.5

-1.0

One can see that for a < 1 the dependence y[x] is non-monotonic. In this case parametric representation is the only conve-
nient way to calculate the contour integral.

In[24]:= SimplifyAH∂φ x@φDL2 + H∂φ y@φDL2 E

Out[24]= 1 + a2 + 2 a Cos@φD

For a < 1 the length of the cycloid is given by

In[62]:= 2 IntegrateB H∂φ x@φDL2 + H∂φ y@φDL2 , 8φ, 0, π<, Assumptions → 8a ∈ Reals, a ≠ 1, a ≠ 0<F

4a
Out[62]= 4 Abs@− 1 + aD EllipticEB− F
H− 1 + aL2

In[58]:= L1@a_D = 2 IntegrateB H∂φ x@φDL2 + H∂φ y@φDL2 , 8φ, 0, π<, Assumptions → 0 < a < 1F

4a
Out[58]= − 4 H− 1 + aL EllipticEB− F
H− 1 + aL2

and for a > 1 it is given by

In[4]:= L2@a_D = 2 IntegrateB H∂φ x@φDL2 + H∂φ y@φDL2 , 8φ, 0, π<, Assumptions → 1 < aF

4a
Out[4]= 4 H− 1 + aL EllipticEB− F
H− 1 + aL2

The full dependence for a > 0 can be represented by

In[5]:= L@a_D := If@0 < a < 1, L1@aD, L2@aDD


L@aD
PlotB , 8a, 0, 2<, PlotRange → 80, 2<F

2.0

1.5

Out[6]= 1.0

0.5

0.0 0.5 1.0 1.5 2.0

L[a] has a singularity at a = 1. that becomes better visible if we plot the derivative of L[a]
6 Mathematical_physics-08-Contour_and_surface_integrals.nb

In[75]:= L1Der@a_D = ∂a L1@aD; H∗ Immediate set is mandatory! ∗L


L2Der@a_D = ∂a L2@aD;
LDer@a_D := If@0 < a < 1, L1Der@aD, L2Der@aDD
Plot@LDer@aD, 8a, 0, 2<D
6

Out[77]= 3

0.5 1.0 1.5 2.0

Note that LDer cannot be determined as

LDer@a_D := If@0 < a < 1, ∂a L1@aD, ∂a L2@aDD


LDer@2D H∗ with delayed set,
Mathematica tries to calculate derivatives when they are needed, i.e.,
when a is set to 2. But it cannot differentiate with respect to 2 ∗L

General::ivar : 2 is not a valid variable. à


Out[18]= ∂2 H4 EllipticE@− 8DL

or as

LDer@a_D = If@0 < a < 1, ∂a L1@aD, ∂a L2@aDD


H∗ This remains a delayed set because it depends on a condition,
and delayed set does not work ∗L
LDer@2D

Out[22]= If@0 < a < 1, ∂a L1@aD, ∂a L2@aDD

General::ivar : 2 is not a valid variable. à


Out[23]= ∂2 H4 EllipticE@− 8DL

Contour integrals of the work / circulation type


An example of a contour integral is work along the trajectory C that is a line in 3d space

W = ‡ F ⋅ r
C

Such integrals can be introduced in a usual way by splitting of the trajectory into a sum of many small finite displacements
∆rn and taking the limit of the sum
N
W = limN→∞ ‚ Fn ⋅ ∆rn
n=1

Practically contour integrals can be calculated in the parametric form as ordinary integrals over a parameter. The natural
parameter for the mechanical integral above is time t. Changing the variable to , one obtains
Mathematical_physics-08-Contour_and_surface_integrals.nb 7

t2 r t2
W=‡ F⋅ t = ‡ F ⋅ v t
t1 t t1

that is, the work is the integral of the power P = F·v over time. As an example, consider the work of the gravity force
F = mg = − mgez

along a contour being a part of a circle


z = R Cos@φD, x = R Sin@φD, φ1 ≤ φ ≤ φ2

to compute the work, one could consider motion of the particle along the circular trajectory with f = f[t] and write

IFx vx + Fy vy + Fz vz M  t =
t2
W=‡
t1
t2 z t2 z φ t2 φ
‡ −m g t = ‡ −m g t = ‡ m g R Sin@φD  t.
t1 t t1 φ t t1 t

The result does not depend on the angular velocity „f/„t with which the particle moves along the trjectory, because one can
change the integration variable to f
φ2
W=‡ m g R Sin@φD  φ.
φ1

In fact, f could be used as the parameter for the contour integration instead of t from the very beginning. Moreover, one can
firther change the integration variable to z and finally calculate the integral
φ2
W = −‡ m g  z = − m g Hz2 − z1 L = − m g R HCos@φ2 D − Cos@φ1 DL.
φ1

Of course, this was a toy example because the gravity force is a potential force and its work can be related to the difference
of potential energies,
W = − HU2 − U1 L

This relation can be proven in a general form. If the force is potential, F = −“U(r), then the infinitesimal work is simply the
negative differential of the potential energy:
 W = F ⋅  r = - ∇ U HrL ⋅  r
∂U ∂U ∂U ∂U ∂U ∂U
= − ex + ey + ez ⋅  r = − x + y + z = − U
∂x ∂y ∂z ∂x ∂y ∂z

Thus

W = ‡ - ∇ U HrL ⋅  r = - ‡  U = − HU2 − U1 L.
C C

Work of any potential force over a closed contour is zero. If instead of the force one has a vector function that is not a
gradient of a scalar, the integral of this type over a closed contour can be non-zero. In this case it can be called circulation.

ü Circulation of the magnetic field

As an illustration of the circulation, consider the magnetic field produced by an infinite thin straight wire directed along the z
axis and carrying a current I in the positive z direction. The magnetic field is directed in the x-y plane and in the polar
coordinate system is given by
eφ µ0 I
B=a , a= ,
r 2π
8 Mathematical_physics-08-Contour_and_surface_integrals.nb

where r is the distance from the wire that is put into the origin of the coordinate system, and eφ is the unit vector perpendicu-
lar to r (in the x-y plane) and directed in the direction of increasing of f, in accordance with the screw rule
eφ = − Sin@φD ex + Cos@φD ey .

Let us first calculate the contour integral

‡ B ⋅ r
C

with the contour C being a circle of radius R centered at the wire and going in the positive f direction. Since for this contour
„r = eφ „r = eφ R„f, this integral simplifies to
2π 2π
Heφ ⋅ eφ L R  φ = ‡
a a
‡ B ⋅ r = ‡ R  φ = 2 πa = µ0 I,
C 0 R 0 R
independently of R.

In fact, the contour integral (circulation of the magnetic field) depends only on the current that crosses the surface bounded
by the contour and not on the shape of the contour (Ampere's law). To illustrate this, let us use the contour that consists of an
infinite horizontal line y = -y1 going to the right and another horizontal line y = y2 going to the left. With
Sin@φD y
Bx = B ⋅ ex = − a = −a
r x2 + y2

the contour integral is given by


∞ −∞
‡ B ⋅  r = ‡ Bx y=−y1 x + ‡ Bx y=y2 x =
C −∞ ∞
∞ a y1 ∞ a y2 ∞ a ∞ a
‡ x + ‡ =‡ u + ‡  u = πa + πa = 2 πa = µ0 I,
−∞ x2 + y1 2 −∞ x2 + y2 2 −∞ u2 + 1 −∞ u2 + 1

the same value as that along the circular contour.

Surface integrals of the scalar type


These are the integrals of the type

‡ f@rD  S
S

where S is a surface in a 3d space. Surface can be parametrized by two parameters, r = r(u,v). The surface element „S
created by changing u and v by „u and „v is given by the absolute value of the vector product
∂r ∂r
S = × u v
∂u ∂v
For instance, the surface of a sphere can be parametrized by the two angles J and f, and the surface element is elementarily
given by

 S = R2 Sin@ϑD  ϑ  φ ,
where R is the radius of the sphere. With
r = 8R Sin@ϑD Cos@φ D, R Sin@ϑD Sin@φ D, R Cos@ϑD<

and
Mathematical_physics-08-Contour_and_surface_integrals.nb 9

∂r
= 8R Cos@ϑD Cos@φ D, R Cos@ϑD Sin@φ D, − R Sin@ϑD<
∂ϑ
∂r
= 8− R Sin@ϑD Sin@φ D, R Sin@ϑD Cos@φ D, 0<
∂φ

one obtains
∂r ∂r
× = 9− R2 Cos@ϑD Cos@φD Sin@ϑD, − R2 Cos@ϑD Sin@ϑD Sin@φD, R2 Sin@ϑD2 =
∂ϑ ∂φ

that can be computed as

Cross@8R Sin@ϑD Cos@φ D, R Sin@ϑD Sin@φ D, R Cos@ϑD<,


8− R Sin@ϑD Sin@φ D, R Sin@ϑD Cos@φ D, 0<D êê Simplify

9− R2 Cos@ϑD Cos@φD Sin@ϑD, − R2 Cos@ϑD Sin@ϑD Sin@φD, R2 Sin@ϑD2 =

The absolute value of this vector is

SimplifyB

%.%
, Assumptions → 8R > 0, 0 < ϑ < π ê 2<F

R2 Sin@ϑD

∂r ∂r
the same result. Let us now compute | ∂ϑ × ∂φ
in one step:

r = 8R Sin@ϑD Cos@φ D, R Sin@ϑD Sin@φ D, R Cos@ϑD<;


SimplifyB

Cross@∂ϑ r, ∂φ rD.Cross@∂ϑ r, ∂φ rD
, Assumptions → 8R > 0, 0 < ϑ < π ê 2<F

R2 Sin@ϑD

In most cases, like the sphere, one can write down the expression for „S without using the general formula. For instant, for
the paraboloid

k Ix2 + y2 M k ρ2
z= =
2 2
10 Mathematical_physics-08-Contour_and_surface_integrals.nb

k ρ2
In[81]:= ParametricPlot3DB:ρ Cos@φD, ρ Sin@φD, ê. k → 1>, 8φ, 0, 2 π<, 8ρ, 0, 3<F
2

Out[81]=

in the cylindrical coordinate system one has

z 2
S = 1+ ρ ρ φ = 1 + Hk ρL2 ρ  ρ  φ

Excersice: derive this from the general formula. The area of the paraboloid in the region r < a is

In[24]:= S = 2 π IntegrateB 1 + Hk ρL2 ρ, 8ρ, 0, a<, Assumptions → 8a > 0, k > 0<F

2 −1 + 1 + a2 k2 + a2 k2 1 + a2 k2 π
Out[24]=
3 k2

This result can be simplified by the Simplify command applied locally

2 − 1 + SimplifyB 1 + a2 k2 + a2 k2 1 + a2 k2 F π

3 k2

2 I− 1 + I1 + a2 k2 M Mπ
3ê2

3 k2

whereas Simplify applied to the whole expression does not work. In the limit ak <<1 the area of the paraboloid reduces to the
1
area of the circle pa2 ,as it should be. In fact, this integral is very simple because r„r = 2
„ r2 . Similar integral describing the
length of a parabola above is much more complicated.

Surface integrals of the flux type


These are integrals of the type

‡ F@rD ⋅  S, S = n S
S

where n is a unit vector perpendicular to the surface at the point r. If the surface is parametrized by two parameters, r =
r(u,v), then „S generated by changing u and v by „u and „v is given by
Mathematical_physics-08-Contour_and_surface_integrals.nb 11

∂r ∂r
S = × u v
∂u ∂v
and the flux integral becomes
∂r ∂r
‡ F@rD ⋅ ×  u  v, S = n S
S ∂u ∂v
As in the case of surface integrals of the scalar type, in most cases the expression for „S can be written without calculation.
For instance, for the sphere of radius R one has
r
S = R2 Sin@ϑD  ϑ  φ
r

ü Flux of the electric field

As an illustration we calculate the flux of the Coulomb field produced by a point charge Q
r Q
E= a , a=
r3 4 πε0

through the sphere of radius R:


2π π r π Q
Φ = ‡ E@rD ⋅  S = ‡ ‡ R2 Sin@ϑD  ϑ  φ = 2 π a ‡ Sin@ϑD  ϑ = 4 π a =
r
a ⋅ .
S 0 0 R3 R 0 ε0

Gauss theorem states that the flux of the electric field depends only on the total charge inside the surface but not on the
position of the charge (charges) and the surface shape. To illustrate this, let us calculate the flux of the same Coulomb field
through the paraboloid

k Ix2 + y2 M k ρ2
z= − z0 = − z0
2 2
In the integral

Φ = ‡ E@rD ⋅  S
S

„S is perpendicular to the paraboloid at a given point of its surface. It is convenient to make a general calculation of „S in
the cylindrical coordinate system

k ρ2
r = 8ρ Cos@φD, ρ Sin@φD, z< = :ρ Cos@φD, ρ Sin@φD, − z0 >.
2

The vector product I ∂ρ × Mcan


∂r ∂r
∂φ
be computed as follows

k ρ2
r = :ρ Cos@φD, ρ Sin@φD, − z0 >;
2
Simplify@
Cross@∂φ r, ∂ρ rD
D

9k ρ2 Cos@φD, k ρ2 Sin@φD, − ρ=

This vector is directed out of the paraboloid. Then, the electric field on the paraboloid becomes

:ρ Cos@φD, ρ Sin@φD, − z0 >


k ρ2
r 2
E=a =a
Kρ2 + J k 2ρ − z0 N O
r3 2 2 3ê2
12 Mathematical_physics-08-Contour_and_surface_integrals.nb

Thus E ⋅ I ∂ρ × M
∂r ∂r
∂φ
is given by

:ρ Cos@φD, ρ Sin@φD, − z0 >


k ρ2

.9k ρ2 Cos@φD, k ρ2 Sin@φD, − ρ= êê Simplify


2
a
2 3ê2
Kρ2 + J − z0 N O
k ρ2
2

4 a ρ Ik ρ2 + 2 z0 M

I4 ρ2 + k2 ρ4 − 4 k ρ2 z0 + 4 z20 M
3ê2

Now the flux through the paraboloid is given by

∞ 4 a ρ Ik ρ2 + 2 z0 M ∞ 2 a Hk u + 2 z0 L
Φ=2π‡ ρ = 2 π ‡ u
I4 ρ2 + k2 ρ4 − 4 k ρ2 z0 + 4 z20 M I4 u + k2 u2 − 4 k u z0 + 4 z20 M
0 3ê2 0 3ê2

that is

2 π 2 a Hk u + 2 z0 L
In[27]:= Φ = IntegrateB , 8u, 0, ∞<, Assumptions → 8z0 > 0, k > 0<F
I4 u + k2 u2 − 4 k u z0 + 4 z20 M
3ê2

Out[27]= 4aπ

This result is correct and in accordance with the Gauss theorem saying that the flux must be the same as the flux through the
sphere. In the case z0 < 0 the charge is outside the paraboloid and the flux is zero:

2 π 2 a Hk u + 2 z0 L
Φ = IntegrateB , 8u, 0, ∞<, Assumptions → 8z0 < 0, k > 0<F
I4 u + k2 u2 − 4 k u z0 + 4 z20 M
3ê2

In the case z0 < 0 the charge is exactly on the surface of the paraboloid and the flux is

2 π 2 a Hk u + 2 z0 L
Φ = IntegrateB , 8u, 0, ∞<, Assumptions → 8z0 == 0, k > 0<F
I4 u + k2 u2 − 4 k u z0 + 4 z20 M
3ê2

2aπ

The same result arises if the charge is placed on the surface of a sphere.

Vector integral relations: Stokes and Gauss theorems


There are important vector integral relations between integrals over a region and over the border of this region. The simplest
example of these relations is the formula
b
‡ ∂x F@xD  x = F@bD − F@aD
a

and a slightly more complicated formula for the integral of a gradient over a contour. In both cases, the region is one-
dimensional and its border is zero-dimensional, thus there is no integral over the border, just values of the functions at the
border points. Next of these relations is the Stokes' theorem that relates the flux through an open surface (a 2d integral) with
a work-type integral over a contour bounding this surface. It has the form

‡ ı × F ⋅ S = ‡ F ⋅ r .
S C
Mathematical_physics-08-Contour_and_surface_integrals.nb 13

There is a one-dimensional integral on the right but a two-dimensional integral on the left, however, of a differentiated
function, the curl. The physical implication of the Stokes theorem is the Ampere's law, where F is the magnetic field B and
õ×F is proportional to the density of current flowing through the surface.

Next there is the Gauss theorem relating a volume integral with a flux through the closed surface bounding this volume

‡ ı ⋅ F V = ‡ F ⋅ S .
V S

Here there is a two-dimensional integral on the right but a three-dimensional integral on the left, however, of a differentiated
function, the divergence. The physical implication of the Gauss theorem is the relation between the electric-field flux out of
the volume V through its surface S, F being the electric field E, and the total electric charge in the volume, the charge
density being proportional to õ·E.

There is a vector variant of the Gauss theorem

‡ ı × F V = −‡ F × S
V S

arising in the theory of magnetism.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy