What is a Contour Integral and How is it Calculated?

In summary, a contour integral is a generalization of the "normal" integral, used to calculate the total mass or effective impact across a contour. It can be of the first kind, for scalar fields, or the second kind, for vector fields. The key is to find a good parametrization to simplify the integration. The result of the integration should be independent of the chosen parametrization.
  • #1
Char. Limit
Gold Member
1,222
22
I saw a contour integral in a text I was recently reading, but unfortunately a contour integral is beyond my understanding at the moment. As such, I would greatly appreciate it if someone could explain a contour integral to me.

If it helps, I know about derivatives, integrals, partial derivatives, gradients, divergences and curls, and a bit on differential equations.
 
Mathematics news on Phys.org
  • #2
Was it a contour integral over a scalar field or a vector field?
 
  • #3
I'm sure someone will be able more detailed answers than I, but I just want to quickly give an outlook. You also know about complex numbers?

Do you know about the divergence theorem?
Basically contour integrals are used like a 2D divergence theorem. Instead of integrating on a curve over a contour in the complex plane you can sum over some "divergence" of the interiour to get the same result. The trick is that for most "reasonable" functions this divergence is zero at all points except for the points with singularities (like where you'd divide by zero). So you could
1) without changing the value of the contour integral deform the contour as you wish, as long you keep the relevant singularities inside the contour
2) calculate the contour integral by summing over the contributions of the singularities only to get the its value

You usually integrate over a closed loop in the complex planes.
So you write
[tex]\oint f(z)dz[/tex]
and mean the you go over all values for z on the given path in the complex plane. For example try integrating
[tex]\oint z^2dz=\int_0^1 zdz+\int_1^{1+i} zdz+\int_{1+i}^{i} zdz+\int_i^0 zdz[/tex]
from z=0 to z=1 to z=1+i to z=i back to z=0 (which is a square in the complex plane). You should get zero.
Now try integrating
[tex]\oint \frac{1}{z}dz[/tex]
from z=-1-i to z=1-i to z=1+i to z=-1+i back to z=-1-i which is a square about the origin. You could use any other square or arbitrary contour, but as long as you include the origin you will always get the same result for the contour integral. As I said, instead of integrating over the contour you could just sum over the contributions for singularities inside the contour. The function 1/z has only one such contributing singularity at the origin. Maybe you can make sense of
http://en.wikipedia.org/wiki/Residue_theorem

Contour integrals are usually used to calculate normal integrals from [itex]-\infty[/itex] to [itex]+\infty[/itex]. In the first step you look at it in the complex plane. The normal integral is the integral along the real axis. Now you add a half-circle of infinite radius above this real axis to form a big closed "half-circle" contour. For the practical cases the half-circle you added has a vanishing contribution for a half-circle of infinite radius. Therefore we equal contour integral and normal integral.
Now we know that to calculate a closed curve integral, all we need is to sum over the residues (contributions from singularities inside). Therefore we effectively calculate the normal infinite integral we needed in the first place.

OK, maybe someone else continue from here. Or just ask questions :)
 
  • #4
I'll briefly summarize you the theory of calculating such integrals. I guess you're talking about integrals of real fields rather than complex functions, so I'll talk about real integration (which is pretty much like complex integration)

A contour integral is a generalization of the "normal" integral, which is integration over the line segement which contained in the x-axis. To extend this, you need to introduce functions of several variables (scalar fields or vector fields) and its sufficient to do this on a two-dimensional case.

1. Contour Integral of The First Kind

You have a scalar field f(x,y), which represents some distribution, let's say of mass. You'd like to calculate the total mass on a wire which is your contour [tex]\gamma[/tex]. Observe that a contour is a pair of two functions x(t) & y(t) which accepts a variable a<=t<=b and describe a set of points creating the contour. (x(t),y(t)) is called the parametrization. Each contour has infinitely many parametrizations, and you can do the same with polar coordinates or any legitimate coordinates you'd like to choose. But we'll stick to the cartesian parametrization (also the differentials change when considering other coordinate systems).

You'd like, like in normal integrals, to slice up your contour into really small peaces, evaluate the field at an arbitrary point in the peace, multiply by the length, and sum over all of them. Then you do a limiting process to get a smooth summation.
It can all be done by Reimann Sums but i'll skip this. The important things are that the differential length of the curve at each points can be given formally by the pithagorean theorem: (as the peaces go to zero-length, they approach straight lines)

[tex]ds=\sqrt{dx^{2}+dy^{2}}=\sqrt{(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}dt[/tex]

Integration is denoted by [tex]I=\int_{\gamma}f(x,y)ds[/tex]
By change of variables, it reduces to a simple one-dimensional integration:

[tex]I=\int^{t=b}_{t=a}f(x(t),y(t))\sqrt{\dot{x}^{2}+\dot{y}^{2}}dt[/tex]
(Here dot denotes derivation wrt t)

The integrand here is only a function of t, and your integrate wrt t so you ought to get a numerical result (independent of x,y or t).
The trick here is to get a good parametrization so that your integral will be simple.

A good result from that, is that a length of the curve can be simply calculate by letting f(x,y)=1 and then

[tex]L(\gamma)=\int^{t=b}_{t=a}\sqrt{\dot{x}^{2}+\dot{y}^{2}}dt[/tex]

Of course notice that the result of the integration must be independent of the parametrization you've chosen to work with (otherwise you've done things wrong).

2. Contour Integral of the Second Kind

This is the equivalent of physical work definition. Here instead of a scalar field (that might represent mass, electric charge), you have a vector field (might represent electric field, gravitational force), and you'd like to calculate it's "effective impact" across some contour [tex]\gamma[/tex].

So you have
[tex]\vec{F}(x,y)=P(x,y)\hat{i}+Q(x,y)\hat{j}[/tex]

(i & j are the unit vectors in the direction of x & y)

And a parametrization

[tex]\vec{\gamma}(t)=x(t)\hat{i}+y(t)\hat{j}[/tex]

Effective impact means that at each differential slice of the curve, you collect the component of the field which is parallel to the curve. The tangent of the curve is:

[tex]\vec{ds}=dx\hat{i}+dy\hat{j}[/tex]

And therefore the parallel component\the projection is given by:

[tex]\vec{F}.\vec{ds}=Pdx+Qdy[/tex]

The notations of the integral are:

[tex]\int_{\gamma}\vec{F}.\vec{ds}=\int_{\gamma}Pdx+Qdy[/tex]

And by a similar change of variables you get:

[tex]I=\int^{t=b}_{t=a}(P(x(t),y(t))\dot{x}(t)+Q(x(t),y(t))\dot{y}(t))dt[/tex]

Which is again a simple integral wrt t.

P.S. I worked under the assumptions that your contours are smooth enough. Notice that some contours are not smooth, and may be defined only piecewise.
You can also use the fact that integrals are additive: the integral over a contour which is made of two contours united together, is the sum of integrals over each contour seperately.

Also, there's the matter of direction. In the first kind, direction doesn't matter, since we are talking about scalars. Of course [tex]\int^{t=b}_{t=a}=-\int^{t=a}_{t=b}[/tex] But if you've chosen to start integrating from t=b, then your parametrization must change also, keeping the integral itself unchanged.

In second kind integration, direction is important (it alters the result by a minus sign) so you must know from where to where you perform the integration.

And finally, once you've done the leap from one to two dimensions, you'll probably easily understand how to generalize to 3,4 and n-dimensions.

I hope I've helped, yet I think a more rigorous establishment (justifying all change of variables) will be in literature rather than in here.
 
  • #5
All right, I think I get it. I'd like just one more thing: a simple example of each. Perhaps put the solution in spoilers so that I can try to work it out first?
 
  • #6
For the first kind, try to compute the integral of x^2+y^2 over the unit circle (the circle with center (0,0) and radius 1).
 
  • #7
For the second kind try calculating the integral of the field
[tex]\vec{F}(x,y)=\frac{x}{x^{2}+y^{2}}\hat{i}-\frac{y}{x^{2}+y^{2}}\hat{j}[/tex]

Over the unit circle counter-clockwise (remember that direction is important?)

This is an interesting vector field :)
 
  • #8
hamster143 said:
For the first kind, try to compute the integral of x^2+y^2 over the unit circle (the circle with center (0,0) and radius 1).

So far, I'm having difficulty with one part of this. I figured that the parametrization of the unit circle is:
[tex]x(t)=cos(t),y(t)=sin(t)[/tex]

So... here's what I've done...

[tex]\int_0^{2\pi} f(cos(t),sin(t))\sqrt{(-sin(t))^2+(cos(t))^2}dt[/tex]

That radical should reduce to one. So, do I do this?

[tex]\int_0^{2\pi} cos(t)^2+sin(t)^2 dt = \int_0^{2\pi} dt[/tex]

But that just equals 2pi. The answer seems too simple, I must have done something wrong.
 
  • #9
2 pi is correct.

What about x^2 + 2*y^2?
 
  • #10
Over the same contour?

First, I can see the usefulness of working with the unit circle. Getting rid of half of the problem... good idea.

So, the integral will go out to 1+cos^2(x)...

Let's see what we can do...
Cosine squared of a number is equal to sine squared of a number minus twice the number...

1-cos(2x)+sin^2(x)

which equals

1-cos(2x)+.5-.5cos(2x)

which simplifies to

.5 -1.5cos(2x)

So, the integral of that is

.5x+.75sin(2x)

which from zero to 2pi is...

just pi. Right?
 
  • #11
No. The answer should obviously be greater than 2 pi.
 
  • #12
Where did I go wrong?
 
  • #13
Simple arithmetical error. .5 -1.5cos(2x) should be 1.5 -1.5cos(2x).

Here's how you can get the same results without any trigonometry at all.

The first integral is of a function that is constant along the entire contour. So, its value is just the value of the function (1) times length of the contour (2 pi).

Symmetry tells us that [itex]\oint x^2 dl = \oint y^2 dl = 1/2 \oint (x^2+y^2) dl = \pi[/itex].

Therefore [itex]\oint (x^2+2y^2) dl = \pi + 2\pi = 3\pi[/itex].
 
  • #14
Oh my god, I can't believe I made that error.

So, in general, the contour integral for [tex]ax^2+by^2[/tex] with the contour being the unit
circle is equal to [tex](a+b)\pi[/tex]?
 
  • #15
OK, so I think I get the first kind of contour (line, path) integral. The second kind is confusing me though. How do you parametrize a vector?
 
  • #16
You parametrize the curve like in the first kind (in both kinds the parametrization will be off course identical for the same curve).

But instead of taking the differential length of the curve, you now need to take the differential direction of the curve=the tangent vector.

if your curve is parametrized by (x(t),y(t)) then at each point the tangent vector will be

[tex]\vec{dr}=dx\hat{i}+dy\hat{j}[/tex]

Now at each point you need to take the dot product of the vector field you're integrating, with the tangent direction. So you integral is

[tex]\int_{\gamma}\vec{F}.\vec{dr}=\int_{\gamma}Pdx+Qdy[/tex]
(Here F(x,y)=( P(x,y), Q(x,y) ))
Now you need to change variables. From (x,y) to (x(t),y(t)) and what you get is

[tex]=\int^{b}_{t=a}(P\dot{x}+Q\dot{y})dt[/tex]

And simply integrate.
 

1. What is a contour integral?

A contour integral is a type of line integral that is used to integrate functions along a specific path or contour in the complex plane. It is often used in complex analysis to calculate the value of a function at a point or to find the area enclosed by a curve.

2. How is a contour integral different from a regular integral?

A contour integral is different from a regular integral because it is calculated along a specific path or contour in the complex plane, rather than over a range of values on the real number line. This allows for the integration of complex-valued functions and can yield more precise results.

3. What is the relationship between a contour integral and a closed contour?

A contour integral can be evaluated along any path, but it is most commonly used with closed contours. This is because closed contours form a complete loop and allow for the calculation of the enclosed area or net change of a function around that loop.

4. What are some applications of contour integrals?

Contour integrals have many applications in physics, engineering, and mathematics. They can be used to solve problems in fluid dynamics, electromagnetism, and quantum mechanics. They are also used in the calculation of complex-valued functions, such as the Fourier transform and Laplace transform.

5. How can I calculate a contour integral?

To calculate a contour integral, you first need to parameterize the contour into a function of a single variable. Then, you can use the fundamental theorem of calculus or Cauchy's integral formula to evaluate the integral. It is also important to consider the singularities of the function within the contour, as they can affect the value of the integral.

Similar threads

Replies
2
Views
953
Replies
7
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
824
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
Replies
1
Views
726
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Replies
4
Views
1K
  • General Math
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
238
Replies
1
Views
2K
Back
Top