We find in Arnold's Trivium the following problem, numbered 39. (The double integral should have a circle through it, but the command /oiint does not work here.)

Calculate the Gauss integral

$$\int \int \frac{(d\vec A, d\vec B, \vec A-\vec B)}{|\vec A-\vec B|^3},$$

where $\vec A$ runs along the curve $x=\cos \alpha$, $y=\sin \alpha$, $z=0$, and $\vec B$ along the curve $x=2\cos^2 \beta$, $y=(1/2)\sin \beta$, $z=\sin 2\beta$.

First, what exactly is being asked here? We seem to have an inner product in the integral, except there are three arguments. I am not sure what to make of this -- the notation is unfamiliar to me. And I suppose $\alpha$ and $\beta$ both independently run from $0$ to $2\pi$?

Second, how does one solve this?

Update: David H. reports that the three-place function is probably the vector triple product. "More likely it represents the vector triple product. This is the integral one must evaluate to compute the magnetic force between two current-carrying wires." This interpretation makes sense, because these problems are directed physics students.

  • 37,797
  • 15
  • 117
  • 251
  • Strange notation... Could it be the scalar triple product: $(x,y,z)=(x \times y) \cdot z$? – Hans Lundmark Jun 21 '15 at 09:51
  • @HansLundmark I was thinking about that. I honestly have no clue. – Potato Jun 21 '15 at 09:52
  • 1
    @HansLundmark More likely it represents the *vector* triple product. This is the integral one must evaluate to compute the magnetic force between two current-carrying wires. – David H Jun 21 '15 at 10:31
  • @DavidH I suspect that is the intended interpretation, given that Arnold was a physicist. – Potato Jun 21 '15 at 10:33
  • 1
    @Potato As a side note, the command /oint for a single integration symbol with a circle through it does work here: $\oint$. – David H Jun 21 '15 at 12:06

3 Answers3


This is Gauss' Linking Number Formula, for two space curves $\vec{A}, \vec{B}: S^1 \to \mathbb{R}^3$

$$ \textrm{link}(A,B) = \oint_A \oint_B \frac{\vec{A}-\vec{B}}{|\vec{A}-\vec{B}|^3} \cdot (d\vec{A} \times d\vec{B})$$

In our case, $\vec{A}(t) = (\cos t, \sin t, 0)$ and $\vec{B}(t) = ( 1+ \cos 2t, \frac{1}{2}\sin t, \sin 2t)$ . How to picture these two curves:

  • $\vec{A}(t)$ represents a unit circle in the $xy$ plane centered at the origin $(0,0,0)$.

  • $\vec{B}(t)$ is harder to visualize but we observe a few things:

    • it projects to a circle centered at $(1,0)$ on the $xz$ plane
    • the $y$-coordinate $|B_2(t)| = |\frac{1}{2} \sin t| \leq \frac{1}{2}$.

Since the Gauss linking number is a topological invariant, we can deform the circle $\vec{A}$ to a the straight line $\{(1,t,0): t \in \mathbb{R}\} $ (or alternatively deform $\vec{B}$ to the double-circle $\vec{B}(t) = ( 1+ \cos 2t, \frac{1}{2}\sin t, \sin 2t)$) and then it is easy to check the linking number is 2 and the integral is $\color{#F76760}{\mathbf{8\pi}}$

If we were to compute the integral directly, it would seem rather strenuous to use the triple product formula $a \cdot (b \times c)$ directly and wade through all the integrals. Instead I would introduce the family of circles:

$$ \vec{A}(s,t) = (s\cos t - s + 1, s\sin t, 0)\text{ with } s\to \infty$$

or instead $\vec{B}(s,t) = ( 1+ \cos 2t, \frac{s}{2}\sin t, \sin 2t)$ with $s \to 0$.

CODE Here is the Python script which I used to check the Gauss Linking number formula:

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

N = 100
ds, dt = 1.0/N, 1.0/N

tot = 0

for s in 2*np.pi*np.arange(0,1,dt):

    for t in s + 2*np.pi*np.arange(0,1,ds):

        A  = np.array([np.cos(s), np.sin(s), 0*s])
        B  = np.array([1 + np.cos(2*t), 0.5*np.sin(t),   np.sin(2*t)])

        dA = np.array([ -1*np.sin(s),       np.cos(s), 0*s])*ds*2*np.pi
        dB = np.array([ -2*np.sin(2*t), 0.5*np.cos(t), 2*np.cos(2*t)])*dt*2*np.pi

        X  = np.cross(dA,dB)
        Y  = (A -B)/np.sum((A -B)**2)**1.5

        tot += np.sum(X*Y)


Getting an answer of -8.0000000011873595 $ = \frac{1}{\pi}\int \dots$

  • 23,583
  • 4
  • 35
  • 88
  • e.g. [Gauss Linking Number Revisited](http://www.maths.ed.ac.uk/~aar/papers/ricca.pdf) (Ricca + Nipoti) *Journal of Knot Theory and Its Ramifications* – cactus314 Jun 24 '15 at 00:06
  • I have to step away, but I can do a numerical calculation... just to see! – cactus314 Jun 24 '15 at 00:07
  • Look at my answer - I already did the numerical calculation. You were off by a sign. – Stephen Montgomery-Smith Jun 24 '15 at 00:14
  • Thanks! I will award the bounty as soon as possible (as the site is making me wait another 8 hours). – Potato Jun 24 '15 at 01:33
  • Just to confirm -- there's no way to simply write the integrals out and do them by hand (in some elementary way, etc). We really must invoke the linking number formula here? I seems (as the answer below indicates) we end up with intractable integrals this way. – Potato Jun 24 '15 at 01:36
  • 1
    @Potato I wouldn't dream of doing the integrals by hand... unless you truly enjoy long and tedious integrals :-) – cactus314 Jun 24 '15 at 01:38
  • @johnmangual What do you mean by introducing that family of circles, then? – Potato Jun 24 '15 at 02:50
  • 1
    @Potato since the Gauss integral does not change under deformations, we can deform $A$ into a straight line or (even easier) flatten $B$ into a circle, where we going around twice. Then the integral might be doable by hand. This is line when we integrate complex functions using Cauchy Residue Formula. – cactus314 Jun 24 '15 at 03:00

Here I am interpreting it as the scalar triple product.

We have vector functions $\vec A, \vec B:[0,2\pi] \to \mathbb R^3$, given by $$ \vec A(\alpha) = (\cos\alpha,\sin\alpha,0) \\ \vec B(\beta) = (2\cos^2\beta,\tfrac12 \sin\beta,\sin(2\beta)) .$$ I believe you are being asked to calculate $$ \int_{\alpha=0}^{2\pi} \int_{\beta=0}^{2\pi} \left[\left(\frac {\partial \vec A}{\partial \alpha}(\alpha) \times \frac {\partial \vec B}{\partial \beta}(\beta) \right) \cdot (\vec A(\alpha) - \vec B(\beta)) \right] \frac1{|\vec A(\alpha) - \vec B(\beta)|^3} \, d\beta \, d\alpha .$$ I used the NIntegrate function in Mathematica, and it reported an answer remarkably close to $-8\pi$. There is small chance this is a coincidence!

Mathematica code

It looks like this is the "winding number" of one curve around the other.

So suppose you have two closed curves $C_1$ and $C_2$, each of which are boundaries of surfaces $S_1$ and $S_2$. Let's suppose that the curve $C_2$ never intersects $S_1$. Then I assert that $$ \oint_{\vec A \in C_1} \oint_{\vec B \in C_2} \frac{((\vec A-\vec B) \times d\vec B) \cdot d\vec A}{|\vec A-\vec B|^3} = 0 .$$ To see this, interchange the two integrals, and apply Stoke's Theorem on the integral with respect to $\vec A$, to get $$ \oint_{\vec B \in C_2} \int_{\vec X\in S_1} \text{curl}_{\vec X} \left(\frac{(\vec X-\vec B)\times d\vec B}{|\vec X-\vec B|^3} \right) \cdot \vec\nu(\vec X) \, dA(X) ,$$ where $\vec\nu(\vec X)$ is unit normal to the surface $S_1$ at $\vec X$, and $dA$ is the surface measure on $S_1$. Using standard vector calculus identities (and I might have some sign errors here), one obtains that $$ \text{curl}_{\vec X} \left(\frac{(\vec X-\vec B)\times d\vec B}{|\vec X-\vec B|^3} \right) = - \text{div}_{\vec X} \left(\frac{\vec X-\vec B}{|\vec X-\vec B|^3} \right) d\vec B + d\vec B \cdot \nabla_{\vec X}\left(\frac{\vec X-\vec B}{|\vec X-\vec B|^3} \right) .$$ The first term on the right hand computes to $0$. So after exchanging the integrals again, we are left with $$ \int_{\vec X \in S_1} \left[ \oint_{\vec B \in C_2} d\vec B \cdot \nabla_{\vec X}\left(\frac{\vec X-\vec B}{|\vec X-\vec B|^3} \right)\right] \cdot \vec\nu(\vec X) \, dA(\vec X).$$ The inner integral becomes $$ - \oint_{\vec B \in C_2} d\vec B \cdot \nabla_{\vec B}\left(\frac{\vec X-\vec B}{|\vec X-\vec B|^3} \right) ,$$ and we see that each component is a path integral of the gradient of a scalar, and hence also $0$.

I assert that in general the answer is invariant under smooth homotopies of the curves. Suppose you have three closed curves $C_1$, $\tilde C_1$ and $C_2$ such that $C_1$ can be deformed to $\tilde C_1$ without crossing any point of $C_2$. Let $S_1$ be the surface traced by the deformation of $C_1$ to $\tilde C_1$. Then using similar computations, you should get $$ \oint_{\vec A \in C_1} \oint_{\vec B \in C_2} \frac{((\vec A-\vec B) \times d\vec B) \cdot d\vec A}{|\vec A-\vec B|^3} = \oint_{\vec A \in \tilde C_1} \oint_{\vec B \in C_2} \frac{((\vec A-\vec B) \times d\vec B) \cdot d\vec A}{|\vec A-\vec B|^3} .$$

Now reduce your integral to some more simple integral by, for example, making one of the curves a straight line, and the other go twice around in a perfect circle perpendicular to the straight line, and centered along a point in the line.

Stephen Montgomery-Smith
  • 25,361
  • 2
  • 29
  • 60
  • I also tried interpreting it as the vector product $(\vec a,\vec b,\vec c) = ((\vec a\times \vec b)\times \vec c)$, and NIntegrate suggests the answer is $\vec 0$. I bet a modification of the above answer will also work. – Stephen Montgomery-Smith Jun 23 '15 at 23:55
  • I also tried $(\vec a, \vec b, \vec c) = (\vec a \times(\vec b\times\vec c))$, and I still seem to be getting $\vec 0$. – Stephen Montgomery-Smith Jun 24 '15 at 00:03
  • Thanks for your informative answer. Just to confirm -- there's no way to simply write this integrals out and do them by hand (in some elementary way, etc). We really must invoke the linking number formula or numerical methods here? – Potato Jun 24 '15 at 01:35
  • 1
    I don't know for sure. But the symbolic **Integrate** command in *Mathematica* seemed unable to do the computation. – Stephen Montgomery-Smith Jun 24 '15 at 01:43

Here is 'physical' derivation for Gauss's linking number formula. In contrast with David H's remark above, I will talk in terms of magnetic circulation rather than the magnetic force between two current-carrying wires.

Suppose I have two closed curves, with paths $C_1,C_2$ respectively. We can generate a magnetic field by running a uniform current $I$ through $C_1$, which by the Biot-Savart law is $$\mathbf{B}_{1}(\mathbf{r})=\frac{\mu_0 I}{4\pi}\oint_{C_1}\frac{d\mathbf{l}_1\times (\mathbf{r}-\mathbf{r}_1)}{|\mathbf{r}-\mathbf{r}_1|^3}.$$ The resulting circulation of this magnetic field relative to $C_2$ is $$\oint_{C_2}\mathbf{B}_1(\mathbf{r})\cdot d\mathbf{l}=\frac{\mu_0 I}{4\pi}\oint_{C_2}\oint_{C_1}\frac{\mathbf{r}_2-\mathbf{r}_1}{|\mathbf{r}_2-\mathbf{r}_1|^3}\cdot (d\mathbf{l}_2\times d\mathbf{l}_1)$$ where the cyclic invariance of the scalar triple product has been used to rearrange the integrand.

But Ampere's law informs us that such a circulation integral equal $\mu_0 I_{enc}$ where $I_{enc}$ is the current enclosed by $C_2$; since the current is uniform , this amounts to $I_{enc}=N_{12} I$ where $N_{12}$ is the linking number of $C_1$ relative to $C_2$. Solving for this linking number then finally gives Gauss's formula: $$\boxed{N_{12}=\frac{1}{4\pi}\oint_{C_2}\oint_{C_1}\frac{\mathbf{r}_2-\mathbf{r}_1}{|\mathbf{r}_2-\mathbf{r}_1|^3}\cdot (d\mathbf{l}_2\times d\mathbf{l}_1)}$$ Consequently your integral indeed amounts to finding the linking number, a task which the other answers have elaborated in sufficient detail.

  • 14,756
  • 3
  • 32
  • 84