5. Line Integrals#

If we apply the total differential expression:

fdr=df

and now try to integrate this:

df=fdr

we see that this can be thought of doing the scalar product between two vectors F and dr before finally integrating:

Fdr

We call integrals of this kind line integrals or otherwise called contour integrals.

Definition

We can define:

CF(r)dr

which we call a vector line integral. This is an integral through coordinate space along a contour, here denoted C.

For some vector field:

F(r)=x^P(r)+y^Q(r)+z^R(r)

this simplifies to:

CF(r)dr=C(Fdx+Gdy+Rdz)

We notice that that this is a scalar, found from scalar product of F with the differential line element dr along the path C.

We can also think about a scalar line integral:

Cf(r)ds

where ds is the infinitesimal arc length element, which is given by:

dr=x^dx+y^dy+z^dzds=|dr|=dx2+dy2+dz2

If we pick a closed path through the vector field, we call this a loop integral:

CF(r)dr

What does a line integral actually do? We can think about moving along some line which we denoted C, broken up into infintesimal sections dr, as depicted in Fig. 5.1.

../_images/lineintegral.png

Fig. 5.1 Ilustration of a line integral, with CF(r)dr#

5.1. Parameterising and evaluating integrals#

Whilst our expressions for line integrals are powerful, they also do not really explain how we can go about calculating integrals.
To see how we can go about this, we need to think about how to parameterise our paths (contours) through coordinate space. Once we have a good way to think about parameterising our contours, we will aim to use a change of variable to evaluate the integrals.

5.1.1. Parameterising contours#

Lets think about different contours between the points A(1,1) and B(1,1), as depicted in Fig. 5.2.

../_images/linecontours.png

Fig. 5.2 Ilustration of a three contours C1,C2,C3 between the points A(1,1) and B(1,1).#

If we travel along contour C1 which follows y=x2 for 1x1, whilst we can also travel along contour C2 which takes y=1 for  leqx1 and C3 which is a contour with theopposite direction. These sorts of contours are problematic to describe using just x,y variables and the orientation of the contours is also not well captured.

We can use some standard parameterisation schemes to capture all the relevant details here:

  • For straight lines over points (x0,y0,z0) to (x1,y1,z1), we can parameterise this contour using:

x=x1(1t)+x1ty=y1(1t)+y1tz=z1(1t)+z1t

where 0t1.

Worked example

For the contour C2 between A(1,1) and B(1,1), we can see that with 0t1:

x=2t1y=1

and for the contour C3 between B(1,1) and A(1,1), we can see that with 0t1:

x=12ty=1
  • For functions y=f(x) over range axb, i.e. over (a,f(a))b,f(b), we can parameterise using atb:

y=f(t)x=t

We note that here we can also go in the opposite orientation (b,f(b))(a,f(a)) by switching x=tx=t.

Worked example

For the contour C1 between A(1,1) and B(1,1), we can see that with 1t1:

y=t2x=t

and in order to reverse the contour direction we can just switch x=tx=t.

  • For a circular path (or circular arc) between points (a,b) and (c,d) such that a2+b2=c2+d2=r2, we can parameterise using tittf:

x=rcos(t)y=rsin(t)

For scalar line integrals, the direction we travel along the contour does not change the result:

Cfds=Cfds

this is because the length element ds=|dr| is taken from the magnitude of a vector, so any changes in the orientation are washed out in this.

For vector line integrals, the direction we travel along the contour does change the result:

CFdr=CFdr

and given that for Q=R=0, we can do a line integral in x, or similarly for y z:

CP(r)dx=CP(r)dxCQ(r)dy=CQ(r)dyCR(r)dz=CR(r)dz

5.1.2. Evaluating line integrals#

If we can find one variable t which will effectively parameterise the path through the (scalar or vector) field, then our expression simplify:

Cf(r)ds=t=at=b(f(r(t))dsdt)dtCF(r)dr=t=at=b(F(r(t))drdt)dt

where the infinitesimal coordinate vector derivatives are given by:

drdt=x^dxdt+y^dydt+z^dzdtdsdt=|drdt|=(dxdt)2+(dydt)2+(dzdt)2

Worked examples

1. Evaluate the scalar line integral C(x2+y2)ds over the contours:

a. A straight line linking (1,0)(1,0).

Here we can use the straight line parametrisation for 0t1:

x=x0(1t)+x1t=1tt=12ty=y0(1t)+y1t=0

Then we can rewrite the integrand in this parameterisation:

x2+y2=(12t)2+02=14t+4t2dxdt=2dydt=0dsdt=(2)2+02=2

Finally lets evaluate the integral:

012(14t+4t2)dt=[2t4t2+83t3]01=23

b. A semi-circular arc linking (1,0)(1,0) in the top half of the plane.

Here we can use polar coordinates, with r=1

x=cos(θ)y=sin(θ)

with 0θπ.

Rewriting the integrand in this parameterisation:

x2+y2=(cos(θ))2+(sin(θ))2=1dxdt=sin(θ)dydt=cos(θ)dsdt=(sin(θ))2+(cos(θ))2=1

Finally lets evaluate the integral:

0π(1)(1)dθ=[θ]0π=π

We can picture this system by plotting the surface z=x2+y2:

../_images/parabola.png

Fig. 5.3 Ilustration of a parabolic surface z=x2+y2 with the contours in (a) and (b) shown.#

We can see that the distance for contour (a) is shorter than for contour (b) and since the scalar function is x2 along both contours, the integral is the weighted sum of x2 along each of these lengths, hence it makes sense that Ia<Ib.

2. Evaluate the vector line integral CFdr for F=xzx^yzz^ along the line linking (1,2,0)(3,0,1).

Here we need a parameterise the line over 0t1:

x=x0(1t)+x1t=1(1t)+3(t)=4t1y=y0(1t)+y1t=2(1t)+0(t)=22tz=z0(1t)+z1t=0(1t)+1(t)=t

Using this we can rewrite the variables in terms of t:

F=t(4t1)x^t(22t)z^drdt=4x^2y^+z^

and so we can find the dot product:

Fdrdt=4(4t2t)2t(1t)=18t26t

which we can then just integrate:

01(18t26t)dt=[6t33t2]01=3

5.2. Conservative vector fields#

In the case of a conservative vector field F=f, then we find that the line integral is actually path independent, something which allows us to dramatically simplify calculating it in some cases. To see this fact, go back to the total derivative:

fdr=df

If this is true, then when we calculate the line integral of a conservative vector field:

Cfdr=finitialffinaldf=[f]finitialffinal=ffinalfinitial

over some points finitialffinal which correspond to the points atb in the parameterised version of the line integral.

Hence this answer only depends on the starting/ending values of the path integral, not the path taken.