A method of evaluating a double integral that nobody taught you in school

Many times we are given integrals to evaluate. The standard way to evaluate is to find a series of transformations that will render the integral into something we know how to evaluate and then proceed. Examples of such transformations are substitutions, parts, replacement of an integrand with another integral, reversing order of integration, and so on.

However, once in a blue moon, we find an integral that is really something else. The trick that will allow us to locate the closed form is no mere algebraic transformation but is something else entirely. Yes, there is the use of symmetry, but there is something else entirely that just comes with experience.

The problem before us is to evaluate the following double integral:

$$\int_0^{2 \pi} dx \, \int_0^{\pi} dy\, \sin{y} \, e^{\sin{y} (\cos{x}-\sin{x})} $$

A direct evaluation of this integral is at best a mess. No matter what we will have some intermediate step involving a Bessel function or worse. Maybe that is the way we must proceed. However, I know the answer is quite simple and, thus, I do not want to involve Mr. Bessel.

Instead, the first insight I had was to notice the integral element $\sin{y} \,dx \, dy $. This describes an element of solid angle in a unit sphere, and wouldn’t you know, the integration limits imply we are integrating over the full unit sphere.

Notation becomes crucial at a time like this, so if we are going to think unit sphere, let’s notate the integration variables as azimuthal and polar angles, respectively. Thus, we write the integral as

$$\int_0^{2 \pi} d\phi \, \int_0^{\pi} d\theta \, \sin{\theta} \, e^{\sin{\theta} (\cos{\phi}-\sin{\phi})} $$

All we have done is write the integral suggestively – we have done nothing to actually transform it into something else.

Now, note that we can replace the $\cos{\phi}-\sin{\phi}$ in the exponential with simply $\sqrt{2} \cos{\phi}$, as we are integrating over the whole azimuth anyway. Thus, the integral is

$$\int_0^{2 \pi} d\phi \, \int_0^{\pi} d\theta \, \sin{\theta} \, e^{\sqrt{2} \sin{\theta} \cos{\phi}} $$

Now, note that on the unit sphere, $\sin{\theta} \cos{\phi} = x$, the $x$-coordinate. Thus, by simple geometry, we can replace this double integral with a single integral over $x$ by noting that the function we are integrating over only depends on $x$. The contribution to the integral from a ring a distance $x$ from the plane $x=0$ is $2 \pi \sqrt{1-x^2} e^{\sqrt{2} x} ds$, where $ds$ is an element of arc length. Of course, over a cross-section of the sphere, $y=\pm \sqrt{1-x^2}$ and

$$ds = \sqrt{1+\left ( \frac{dy}{dx} \right )^2} dx = \frac{dx}{\sqrt{1-x^2}}$$

Thus the integral is simply

$$2 \pi \int_{-1}^1 dx \, e^{\sqrt{2} x} = 2 \sqrt{2} \pi \sinh{\sqrt{2}} $$

I have independently verified the numerical value.


Deceptively easy product

The problem is to evaluate $$\prod_{n=2}^{\infty} \left (1+\frac{(-1)^{n-1}}{a_n} \right ) $$ where $$a_n = n! \sum_{k=1}^{n-1} \frac{(-1)^{k-1}}{k!} $$ This is one of those cases where trying out a bunch of numbers really isn’t going to help all that much. The $a_n$ look kind of like $n!$, except off by some. Even so, I can find […]


A sum I can only imagine being evaluated using the residue theorem

The challenge this time is to evaluate the following sum: $$\sum_{n=1}^{\infty} \frac{1}{n^3\sin{\left (\sqrt{2} \, n\pi \right)}}$$ It should be clear that the sum converges…right? No? Then how do we show this? Numerical experiments are more or less helpful, but as one might expect, there is a bit of jumping around about some value. So, even […]


A little perspective on reaching 100K Rep on Math.SE

I stumbled onto math.stackexchange.com) on December 16, 2012. Before that, I was occasionally on the prowl for Putnam exam prep questions, various university math contests, and stuff like the IBM monthly puzzle.  At this point 1132 days later, I forget what I was looking for in the first place – likely a new problem to […]


Systematic treatment of a deceptively messy Cauchy principal value integral

The problem here is to evaluate the following: $$PV \int_0^{\infty} dx \frac{\log^2{x}}{(x-1)^2(x-4) \sqrt{x}} $$ This can be done using complex analysis, but it is a pretty involved affair, deceptively so. After struggling with the problem of how to present the solution, I am going to lay out a systematic approach that ignores the motivation behind […]


Cauchy principal value of a convolution

The problem here is to compute the following convolution-type integral: $$\int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x}$$ When $-1 \lt \lambda \lt 1$, this integral is infinite, but its Cauchy principal value may be defined. This integral is interesting because of the branch points. And so, away we go… Consider the following contour integral: $$\oint_C dz \frac{\sqrt{z^2-1}}{\lambda-z} $$ where […]


Computing the Convolution of Two Pulses: Graphical vs Analytical

Recently, a user on Math.SE presented a problem of computing the convolution of two pulses: a triangular pulse (impulse response) $$h(t) = \begin{cases} t & 0 \lt t \lt 2 T \\ 0 & t \lt 0 \cup t \gt 2 T\end{cases} $$ and a rectangular pulse (input) $$x(t) = \begin{cases} 1 & 0 \lt […]


Integral with two branch cuts II

The problem here is to compute $$\int_0^\infty \log(1+tx)t^{-p-1}dt$$ where $p\in(0,1)$ and $x>0$. This is a great problem for contour integration. Just tricky enough to be really interesting. What makes it interesting is that there are two functions in the integrand needing their own separate branch cuts. One must keep in mind that each function only […]


Integral with two branch cuts

The problem is to evaluate the following integral: $$\int_{-1}^1 dx \frac{\log{(x+a)}}{(x+b) \sqrt{1-x^2}} $$ where $a \gt 1$ and $|b| \lt 1$. It should be obvious to those who spend time around these integrals that this integral does not converge as stated. However, we only have a simple pole at $x=-b$ so that we can compute […]


Fascinating Fourier Transform

Sometimes I come across a Fourier integral that I have no idea how to attack. And then I find that I can convert it to another, more familiar integral using complex analysis. So here’s an example of such a satisfying situation. The problem is to evaluate $$\int_{-\infty}^{\infty} dx \, (1+i a^2 x)^{-1/2} (1+i b^2 x)^{-1/2} […]


Cauchy Principal Value

On Math.SE, we frequently get integrals that simply do not exist in the usual sense because the integration path intersects a pole of the integrand. Occasionally, we come across such integrals in the course of evaluating integrals of functions with removable singularities using complex methods. However, sometimes such integrals are interesting in their own right. […]


Inverse Laplace Transforms and Delta Functions

Problem: find the inverse Laplace transform of $$F(s) = \frac{s}{s-1}$$ Solution: Well, this one should be easy and one wonders why we are even bothering.  Just split $F$ up as follows: $$F(s) = \frac1{s-1} + 1$$ The ILT of $1/(s-1)$ is simply $e^t$, and the ILT of $1$ is $\delta(t)$.  Done. Or are we?  Why […]


Adventures in integration, University Edition

I got a request from an old friend whom I didn’t even know existed. He is the son of my grand-advisor, if that makes any sense. He teaches, among others, a course in Real Analysis at a university in Australia. I know I must like this guy because he says stuff like this: Currently, within the School […]


Inverse Laplace Transform with a coinciding pole and branch point

Recently, the following Laplace transform was asked to be inverted: $$F(s) = s^{-a-1} e^{-s^a} $$ where $a \in (0,1)$. This is a tough problem for two reasons. One is that there is very little chance of there being an analytical result for arbitrary values of $a$. The other, however, is more subtle: there is a […]


The art of using the Residue Theorem in evaluating definite integrals

As many of you know, using the Residue Theorem to evaluate a definite integral involves not only choosing a contour over which to integrate a function, but also choosing a function as the integrand. Many times, this is an easy task when integrating, say, rational functions over the real line. Sometimes there are less trivial […]


A Tale of Two Integrals

Two integrals look almost the same, and even to those fairly well-versed in the art, are the same. But alas, as we shall see. Consider the integral $$I_1 = \int_0^{\pi} dx \frac{x \sin{x}}{1+\cos^2{x}} $$ This may be evaluated by subbing $x \mapsto \pi-x$ as follows: $$\begin{align} I_1 &= \int_0^{\pi} dx \frac{(\pi-x) \sin{x}}{1+\cos^2{x}} \\&= \pi \int_0^{\pi} […]


Weird integral whose simplicity is only apparent in the complex plane

Every so often we come across an integral that seems absolutely impossible on its face, but is easily attacked – in fact, is custom designed – for the residue theorem. I wonder why a first year complex analysis class doesn’t show off this case as Exhibit A in why the residue theorem is so useful. […]


Expansions of $e^x$

A very basic question was asked recently: What is a better approximation to $e^x$, the usual Taylor approximation, or a similar approximation involving $1/e^{-x}$? More precisely, given an integer $m$, which is a better approximation to $e^x$: $$f_1(x) = \sum_{k=0}^m \frac{x^k}{k!} $$ or $$f_2(x) = \frac1{\displaystyle \sum_{k=0}^m \frac{(-1)^k x^k}{k!}} $$ The answer is amazingly simple: […]


Real evaluation of an improper log integral

The problem posed in M.SE concerns real methods of evaluating $$\int_0^{\infty} dx\frac{\log(x)}{\cosh(x) \sec(x)- \tan(x)} $$ The place I started is the nifty result, proven here, that $$\frac{\sin{x}}{\cosh{t} – \cos{x}} = 2 \sum_{k=1}^{\infty} e^{-k t} \sin{k x} $$ Of course, the integral actually looks like $$\int_0^{\infty} dx \frac{\cos{x}}{\cosh{x} – \sin{x}} \log{x} $$ so we need to […]


Generalizing an already tough integral

I did the case $p=1$ here. The generalization to higher $p$ may involve higher-order derivatives as follows: $$\begin{align}K_p &= \int_0^{\pi/2} dx \frac{x^{2 p}}{1+\cos^2{x}} = \frac1{2^{4 p-1}} \int_{-\pi}^{\pi} dy \frac{y^{2 p}}{3+\cos{y}} \end{align}$$ So define, as before, $$J(a) = \int_{-\pi}^{\pi} dy \frac{e^{i a y}}{3+\cos{y}} $$ Then $$K_p = \frac{(-1)^p}{2^{4 p-1}} \left [\frac{d^{2 p}}{da^{2 p}} J(a) \right ]_{a=0}$$ […]


Mathematica v9.0.1 states that this integral does not converge.

The problem is to evaluate the following integral: $$\int_0^{\infty} dx \frac{\log(1+x)}{\left(1+x^2\right)\,\left(1+x^3\right)}$$ This one turned out to be messy but straightforward. What did surprise is the way in which I would need to employ the residue theorem. Clearly, the integral is more amenable to real methods than a contour integration. What happens, though, is that the […]


An unusually alternating sum

Problem: evaluate the following sum… $$\sum_{k=0}^{\infty}\dfrac{(-1)^{\frac{k(k+1)}{2}}}{(2k+1)^2}$$ This is unusual because the $-1$ is raised to the $k (k+1)/2$ power, rather than the usual $k$th power. On the surface, this problem may look hopeless, but really, it is all about determining the pattern of odd and even numbers from the sequence $k (k+1)/2$, which turns out […]