Hello everyone, and welcome to this exciting post! Today, I’ll be showing you how to use contour integration, a very useful technique from complex analysis, to evaluate a certain integral. What’s nice about contour integration is that it allows you to evaluate so many integrals that you could not otherwise, as a lot of integrands have no elementary anti-derivative. Now, the integral we’ll be focusing on today can be computed using real methods, but I wanted to start using contour integration on this blog. And we won’t even be starting with an “easy” example, as this integral will make us discuss branch points, branch cuts and other things like that from complex analysis. But that will only make it more interesting!
So this is the integral we’ll be investigating. But in order to see why complex integration will be useful to evaluate real integrals, we’re going to discuss a few ideas and an important theorem that we will need.
First of all, what is complex integration? Well, it can be useful to think of it as line integration in the complex plane. Take a function and a curve . The integral of along is denoted as
But this doesn’t really help us evaluate it, which we will want to do. Choose a parametrization be a parametrization of that is consistent with its direction. Then, the same integral can also be defined as
Now this definition will be useful to us. Next, we’ll talk about contours. A contour is a sum of piece-wise continuous whose endpoints are connected so that they all point in one direction. Here are some examples of different contours:
Now you may be asking yourself how a complex line integral will help us evaluate a real integral that we are after. The main tool that will help us is the Residue Theorem:
Let be a simply connected open subset, and let be holomorphic in . Let be a closed contour contained in that encircles all the singularities of . Then, the contour integral of over is equal to
The residue at a pole, or singularity, depends on the pole’s order. If has a pole at , then the order of the pole is the smallest integer , such that is finite. If we know the order of the pole, which ususally isn’t too hard to find, we can calculate the Residue of at that pole using the following formula:
In our integral today, we’ll be dealing with a simple pole, where . The formula then reduces to
Which is much simpler. We are now ready to tackle our integral! Well almost. We have two more things to go over, and those are branch points and branch cuts. Basically, a branch point of a multi-valued function is a point around which the function is discontinuous on a circle enclosing the point. For the complex natural logarithm, , 0 is a branch point. This is because, starting from the point , and going around the circle counterclockwise, the logarithm gains an argument of . There is thus a discontinuity at the point , as , but . This stems from the fact that the complex log is a multivalued function.
Finally, branch cuts are the points where the single-valued functions come together to make the multi-valued function. For example, going back to the log function, we can define a branch cut on , letting , in such a way that the log function is now single-valued and analytic on .
You may think that this multi-valuedness is just going to cause us problems when evaluating integrals in the complex plane, but it will actually help us with a wide range of integrals, as you will see.
We are now ready to compute the integral we started with, using contour integration. The first step is choosing a contour. When I first started, this step was very mysterious to me and I wasn’t exactly sure which contour to choose. That intuition will come with practice and time as you get to better understand contour integration with different integrands. Today, we’ll be using a special contour named a “keyhole contour”, as you may see why:
Because , we will have to make a branch cut. In thise case, it will be along the real axis. And we’re going to be choosing . Basically, we’re going have 4 different integrals, one for each segment of the contour. In this case, we will let . I’ll parametrize the large circular part by for . The smaller circle will be similarly parameterized. Our contour integral is then
As wel let and , the first and third integrals vanish, leaving us with only the second and fourth. And as we let , our second integral will gain a factor of , as the logarithm from the function has gained an argument of as it circle back to the real axis. Our contour integral is now
Which is very close to our desired integral! Now, you may see the purpose of the keyhole contour. It takes advantage of the fact that the logarithm is multivalued in order to let us compute our integral, as if the log did not gain that argument of , our desired integral would simply vanish from the overall contour integral. We can now use the Residue Theorem to finish the computation. We know that there are two poles at . Summing the Residues and muptiplying them by , we obtain
After some compuations, we obtain
What a beautiful result! This really shows the power of contour integration, and although it can be long to arrive at the result, it is a very useful technique.