A very general question, I apologize, but as you read this, hopefully you get what I'm asking.

Recently, Bernoulli Numbers have caught my eye, for I am studying infinite series' and it is a part of the tangent function expanded as a Taylor Series. Looking at Bernoulli Numbers on Wolfram (http://mathworld.wolfram.com/BernoulliNumber.html) it defines Bernoulli Numbers using Contour Integrals (which unfortunately I do not know how to write in here. If anyone could tell me how, that would be great.)

The Wikipedia article on Contour Integrals confuses me due to its wording. Whenever I look up a tutorial video for Contour Integrals, it directs me to Line Integrals, and nowhere in these videos do I see the integral symbol with a circle in the center of it. I don't know what a Line Integral has to do with a Contour Integral. Are they the same thing?

Also, how would I evaluate a contour integral? One of the videos that actually DOES mention that symbol, it mentions something known as the Residue Theorem which also confuses me.

Specifically, in the Bernoulli Number definition, how could I evaluate it by plugging in a value of $n$? Could you provide an example for when $n=0$ (in which $B_0 = 1$, as Wolfram says)

  • 3
    $\begingroup$ A line integral is a multivariable integral which, instead of over an area or volume, etc., you take over a curve. A contour integral is essentially the same thing, but applied specifically to the complex plane $\endgroup$
    – Brent
    Commented Aug 11, 2015 at 4:54
  • $\begingroup$ Use \int to write $\int$ and \oint to write $\oint$ in $\LaTeX$. $\endgroup$
    – anon
    Commented Aug 11, 2015 at 5:14
  • $\begingroup$ @whacka : $\ldots\,{}$and also in MathJax. ${}\qquad{}$ $\endgroup$ Commented Aug 11, 2015 at 5:34
  • $\begingroup$ You can learn quite a lot about Bernoulli numbers without knowing anything about contour integrals or the residue theorem, and there are also some things that you won't learn without contour integrals or the residue theorem. I've seen the term "line integral" in the context of vector calculus and "contour integral" in the context of complex variables, and there's some overlap between the topics. But the idea is the same either way: $\displaystyle \int_C f(z)\,dz$ is an integral along a curve $C$. $\ldots\ldots\qquad{}$ $\endgroup$ Commented Aug 11, 2015 at 5:42
  • $\begingroup$ $\ldots\ldots\,{}$Picture $z$ moving along that curve and $dz$ being an infinitely small change in $z$ as it moves along the curve. The multiplication $f(z)\,dz$ is multiplication of complex numbers, and that's the one thing that's different from what is explicitly said in vector calculus. If $C$ returns to its starting point and $f$ is differentiable everywhere in the region surrounded by $C$, then the integral is $0$. But if there is an isolated point in that region where $f$ cannot be extended to a differentiable function, then${}\,\ldots\ldots\qquad{}$ $\endgroup$ Commented Aug 11, 2015 at 5:45

2 Answers 2


Contour integrals are integrals of complex-valued functions over a contour's worth of complex numbers in the complex plane $\Bbb C$, whereas line integrals are integrals of either scalar functions or vector-valued functions over a curve in $n$-dimensional space $\Bbb R^n$.

If you want to understand contour integrals, knowing about complex numbers is a must, so make sure you are familiar with them. There is a very important and special difference between $\Bbb R$ and $\Bbb C$ that occurs very soon when learning complex analysis.

With real functions $\Bbb R\to\Bbb R$, having a derivative

$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h} $$

means it's called differentiable. The class of continuous functions is $C^0$, and the strictly smaller subclass of differentiable functions is $C^1$. A stronger property still is being twice-differentiable, which means being in $C^2$. Indeed for every natural number $n$, the class $C^{n+1}$ is strictly contained inside $C^n$. The intersection $C^\infty$ is the class of smooth functions, those which are infinitely-differentiable. A strictly stronger property than $C^\infty$ is real-analytic, which means admits a locally convergent power series representation. These are $C^\omega$ functions.

With complex-valued functions $f:\Bbb C\to\Bbb C$, the derivative $f'(z)$ is defined by the same limit as before but with $h\to0$ occurring within $\Bbb C$ (so in particular it may approach $0$ in the complex plane from any direction). If $f'(z)$ exists we say $f$ is complex-differentiable. The special fact here is that if $f$ is once complex-differentiable, then it is infinitely differentiable, and moreover it is also complex-analytic (now "locally" means in a neighborhood of a point in the complex plane, instead of a neighborhood in the real line). Since this is so special, we have a special word for being complex-differentiable/analytic, which is holomorphic.

In real variable calculus, we have a substitution rule telling us that

$$\int_{u=u(a)}^{u=u(b)}f(u)\,{\rm d}u=\int_a^b f(u(t))u'(t)\,{\rm d}t.$$

This is true even if $u:[a,b]\to[u(a),u(b)]$ is not injective and in some parts "back-tracks." This hints at path-independence (and also hints at orientation of intervals, since even if $a<b$ we could have $u(b)<u(a)$ if $u$ reverses orientation).

Analogously, given a differentiable path $\gamma:[0,1]\to\Bbb C$, the path integral $\int_\gamma f(z)\,{\rm d}z$ is defined to be

$$\int_\gamma f(z)\,{\rm d}z=\int_0^1f(\gamma(t))\gamma'(t)\,{\rm d}t.$$

Note that $\gamma$ is complex-valued. If instead we make $\gamma$ piecewise differentiable, then we would have to break this definition up into pieces as appropriate.

One proves this quantity is independent of how one uses $\gamma$ to parametrize a curve $\gamma([0,1])$ if $f$ is holomorphic. Moreover, if $D$ is some simply-connected domain on which $f$ is holomorphic, then $\int_\gamma f(z)\,{\rm d}z$ is the same for all paths $\gamma$ between two given points that remains entirely within $D$. In particular, if $\gamma$ is a loop from a point back to itself, we use the notation $\oint_\gamma f(z)\,{\rm d}z$, and it is $0$.

If $D$ is not simply connected (if it has loops that cannot be contracted to a point within $D$, like an annular region or any simply-connected domain with points deleted from it) then this is not true, for instance $\frac{1}{z}$ is not defined at $0$ and $\oint_\gamma \frac{1}{z}\,{\rm d}z=2\pi i$ if $\gamma$ is a loop that goes once around $0$ in the counterclockwise direction. This stems from the fact that $\log z$ goes from $0$ to $2\pi i$ as we go around the unit circle from $1$ to itself counterclockwise.

To evaluate contour integrals $\oint_\gamma f(z)\,{\rm d}z$, one uses "residue calculus," which is a part of the branch of mathematics called complex analysis (some sources call it complex variables too). In order to learn more, you'll want to get a text, or take a class, or google around for scattered notes and videos on complex analysis (it's certainly possible to learn for free online).


Contour integrals are a subject that comes up in complex analysis, and any introductory textbook will help you out on that. For what it's worth, the contour integral definition of Bernoulli numbers is exactly equivalent to:

$$B_n=\lim_{x\rightarrow 0}\frac{d^n}{dx^n}\frac{x}{e^x-1}.$$

The "Residue Theorem" will also give this result and honestly. In fact it's easy to see this formula because this is how Bernoulli numbers are defined:

$$\frac{x}{e^x-1}=\sum_{k \geq 0} B_k \frac{x^k}{k!}.$$

Then taking $n$ derivatives of the the right side will give you $B_n+(\mbox{stuff})x^1+(\mbox{stuff})x^2+\cdots$, so taking the limit as $x\rightarrow 0$ lets $B_n$ live and everything else disappears.

So if you want to evaluate $B_n$, take enough derivatives and evaluate the limit. You'll also find some recurrence formulas that Bernoulli numbers satisfy in your link.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .