Tricki
a repository of mathematical know-how

Revision of If you are calculating an integral, complex substitutions are not forbidden from Thu, 30/04/2009 - 09:25

Quick description

Sometimes an integral \int_a^bf(x)dx can be made simpler if one makes the substitution u=g(x) for some invertible function g. The new integral is then \int_{g(a)}^{g(b)}f(g(u))(g^{-1})'(u)du. What if g is a complex-valued function, such as g(x)=ix? Then the range of integration seems to be a path in the complex plane, which looks very dodgy. However, substitutions of this kind can sometimes be justified with the help of Cauchy's residue theorem, and they are sometimes very useful. This is one way of looking at some of the real integrals that can be calculated with the help of contour integration.

Prerequisites

Complex analysis up to the residue theorem and contour integration.

Note iconIncomplete This article is incomplete. More examples needed.

Example 1

Let us try to calculate the integral \int_0^\infty\sin(x^2)dx. Before we do so, let us note that this is an excellent example of an oscillatory integral: although \sin(x^2) does not tend to zero, it remains bounded and oscillates faster and faster, so the corresponding oscillations of the function F(t)=\int_0^t\sin(x^2)dx become smaller and smaller. So we expect this integral to be finite.

The function \sin(x^2) is sufficiently similar to e^{x^2} that we do not expect to be able to find an antiderivative. Does that make our task hopeless? Not quite, because this is a definite integral, and we might remember that there is at least one integral like that that has a nice answer: \int_0^\infty e^{-x^2}dx=\frac 12\sqrt{\pi}. This suggests that we should try to turn our integral into the integral of a Gaussian.

An easy way to involve the exponential function is to use the fact that \sin(x^2) is the imaginary part of e^{ix^2}. So we will be done if we can calculate the integral \int_0^\infty e^{ix^2}dx (which we still expect to be finite, because the same reasoning applies to its real part). And now we might observe that a simple substitution will turn this integral into one of the form we want: we just choose u in such a way that ix^2=-u^2, which tells us that u^2=-ix^2, which we can achieve by taking u=e^{-i\pi/4}x. Here, e^{-i\pi/4} is chosen because it is one of the square roots of -i.

If we make this substitution, then x=e^{i\pi/4}u, so dx=e^{i\pi/4}du, and our integral becomes \int_0^\infty e^{-u^2}e^{i\pi/4}du. Therefore, the answer is \frac {e^{i\pi/4}}2\sqrt{\pi}, which has imaginary part \sqrt{\pi/8}.

But was that a legitimate argument? Isn't there something very fishy about taking the range of integration to be [0,\infty)?

To answer this question, let us try to interpret the integral \int_0^\infty e^{-u^2}e^{i\pi/4}du as a path integral involving the function e^{iz^2}. After a bit of experiment, we find that it is the integral of e^{iz^2} along the line that starts at the origin and slopes upwards at 45 degrees. To see this, write \gamma for this path, and think of it as the function u\mapsto e^{i\pi/4}u (defined on [0,\infty). Then the definition of a path integral tells us that \int_\gamma e^{iz^2}dz is indeed precisely \int_0^\infty e^{-u^2}du. So our question now is whether the path integral \int_\gamma e^{iz^2}dz is equal to our original integral \int_0^\infty e^{ix^2}dx, which is the integral of the same function, but along the positive real axis.

We can use standard techniques to prove that the two are equal. Consider a closed curve C that goes from 0 to R, then from R to e^{i\pi/4}R round the circle of radius R about 0, and then back from e^{i\pi/4}R to 0 again. Since the function e^{iz^2} is holomorphic everywhere, its integral round C is zero, so we are done if we can prove that the contribution from the circular arc tends to zero. Since e^{iw} is small when w has a large imaginary part, which it does almost everywhere on this circular arc, this is indeed the case.

General discussion

When presenting a solution to the above problem, it would not be normal practice to discuss integration by substitution. Rather, one would observe that the integral is simpler along a different path and use that as motivation for choosing the contour C. The point of this article is that the way one thinks of a good contour to choose is more or less identical to the way one thinks of a good substitution in an ordinary real integral.

Sometimes, one obtains a path integral that does not give the same answer as the original integral. But if that is merely because there are some residues inside the contour C, then we can still use the transformed integral (together with calculation of the residues) to work out the original one.

Example 2

The Fourier transform of a Gaussian fits nicely here too.

Comments

Inline comments

The following comments were made inline in the article. You can click on 'view commented text' to see precisely where they were made.

I don't think this statement

I don't think this statement is true, nor the consequence immediately obvious given it (otherwise we could apply the same sort of argument to \sin(x) for instance).

Parameterizing the arc as Re^{it} for t \in [0, \pi/4], the integral over the arc is \int_0^{\pi/4}e^{iR^2e^{2it}}(iRe^{it}dt).

Expanding with Euler's Formula gives R \int_0^{\pi/4} \left(i \cos(t + R^2 \cos 2t) - \sin(t + R^2 \cos 2t) \right) e^{-R^2 \sin 2t} dt.

Both the real and imaginary integrands are bounded above in absolute value by Re^{-2R^2t}, which means the integrals are bounded above by {(1-e^{\pi R^2/4}) \over 2R} \leq {1 \over 2R} and so the contribution from the arc does vanish at infinity.