hep-ph0511200/mb.tex
1: \documentclass{elsart}
2: 
3: \usepackage{epsfig}
4: 
5: \begin{document}
6:   
7:   \begin{frontmatter}
8: 
9:     \begin{flushleft}
10:       \footnotesize{\tt WUE-ITP-2005-014 }
11:     \end{flushleft}
12:   
13:     \vspace{4cm}
14: 
15:     \title {Automatized analytic continuation of Mellin-Barnes
16:     integrals}
17: 
18:     \author[MC]{M. Czakon}
19: 
20:     \corauth[MC]{\tt e-mail: mczakon@physik.uni-wuerzburg.de}
21: 
22:     \address{Institut f\"ur Theoretische Physik und Astrophysik,
23:     Universit\"at W\"urzburg, \\ Am Hubland, D-97074 W\"urzburg,
24:     Germany}
25: 
26:     \address{Department of Field Theory and Particle Physics,
27:       Institute of Physics, \\ University of Silesia, Uniwersytecka 4,
28:       PL-40007 Katowice, Poland}
29:   
30:     \begin{abstract}
31: 
32:       I describe a package written in {\tt MATHEMATICA} that
33:       automatizes typical operations performed during evaluation of
34:       Feynman graphs with Mellin-Barnes (MB) techniques. The main
35:       procedure allows to analytically continue a MB integral in a
36:       given parameter without any intervention from the user and thus
37:       to resolve the singularity structure in this parameter. The
38:       package can also perform numerical integrations at specified
39:       kinematic points, as long as the integrands have satisfactory
40:       convergence properties. I demonstrate that, at least in the case
41:       of massive graphs in the physical region, the convergence may
42:       turn out to be poor, making na\"ive numerical integration of MB
43:       integrals unusable. I present possible solutions to this
44:       problem, but argue that full automatization in such cases may
45:       not be achievable.
46:   
47:     \end{abstract}
48: 
49:   \end{frontmatter}
50: 
51:   \newpage
52: 
53:   \section*{PROGRAM SUMMARY}
54: 
55:    {\it Title of program:} {\tt MB}
56: 
57:    {\it Version:} {\tt 1.1}
58: 
59:    {\it Catalogue identifier:}
60: 
61:    {\it Program obtainable from:} {\tt
62:    http://theorie.physik.uni-wuerzburg.de/\~{}mczakon}
63: 
64:    {\it Computers:} All
65: 
66:    {\it Operating systems:} All
67: 
68:    {\it Programming language used:} {\tt MATHEMATICA}, {\tt Fortran
69:    77} for numerical evaluation
70: 
71:    {\it Memory required to execute with typical data:} Sufficient for
72:    a typical installation of {\tt MATHEMATICA}.
73: 
74:    {\it No. of bytes in distributed program, including test data:}
75:    337900
76: 
77:    {\it Distribution format:} {\tt ASCII}
78: 
79:    {\it Libraries used:} {\tt CUBA} \cite{cuba} for numerical
80:    evaluation of multidimensional integrals and {\tt CERNlib}
81:    \cite{cernlib} for the implementation of $\Gamma$ and $\psi$
82:    functions in {\tt Fortran}.
83: 
84:    {\it Keywords:} Mellin-Barnes integrals, analytic continuation,
85:    numerical evaluation, Feynman integrals.
86: 
87:    {\it Nature of physical problem:} Analytic continuation of
88:    Mellin-Barnes integrals in a parameter and subsequent numerical
89:    evaluation . This is necessary for evaluation of Feynman integrals
90:    from Mellin-Barnes representations.
91: 
92:    {\it Method of solution:} Recursive accumulation of residue terms
93:    occurring when singularities cross integration contours. Numerical
94:    integration of multidimensional integrals with the help of the {\tt
95:    CUBA} library.
96: 
97:    {\it Restrictions on the complexity of the problem:} Limited by the
98:    size of the available storage space.
99: 
100:    {\it Typical running time:} Depending on the problem. Usually
101:    seconds for moderate dimensionality integrals.
102: 
103:   \newpage
104: 
105:   \section{Introduction}
106: 
107:   The synergy between experiment and theory in the area of elementary
108:   particle physics is constantly driving perturbative calculations to
109:   higher and higher orders. This is particularly true close to the
110:   beginning of the Large Hadron Collider's operation. Therefore,
111:   recent years have seen the emergence of several powerful methods of
112:   evaluation of subsequent terms of the perturbative expansion. As far
113:   as multiloop Feynman integrals are concerned, the method of
114:   differential equations Ref.~\cite{Kotikov:1991pm,Remiddi:1997ny} and
115:   Mellin-Barnes  integral representations
116:   Ref.~\cite{Smirnov:1999gc,Tausk:1999vh} have proved to be the most
117:   successful. Some complicated problems turned out to even require a
118:   mixed approach, as advocated, for example, in the case of Bhabha
119:   scattering in Ref.~\cite{proceedings}. In parallel to analytical
120:   approaches, new numeric techniques have been devised, among which
121:   the sector decomposition method Ref.~\cite{Binoth:2000ps} occupies a
122:   prominent place. Very recently in Ref.~\cite{Anastasiou:2005cb}, the
123:   role of Mellin-Barnes integral representations as sources of numeric
124:   approximations in the physical region has also been stressed.
125: 
126:   In the present work, I will concentrate on Mellin-Barnes integral
127:   representations. There are two advantages of this approach. First,
128:   it allows for systematic extraction of singularities. Second, the
129:   dimensionality of the representation is not directly connected to
130:   the number of lines in the graph and therefore, one often arrives at
131:   integrals of low dimensionality even for complicated graphs. The
132:   calculation of a Feynman integral proceeds in this method in three
133:   steps. At first, one derives a representation, then performs the
134:   analytic continuation in $\epsilon$, where $d=4-2\epsilon$ is the
135:   dimension of spacetime, and finally evaluates the resulting
136:   integrals. The first step above can be performed in several
137:   different ways, aiming at the simplest possible representation. The
138:   various possibilities are described in Ref.~\cite{Smirnov:2004ym}. A
139:   general algorithm is here only interesting in the case of subsequent
140:   numeric integration, see Ref.~\cite{Anastasiou:2005cb}. The third
141:   step cannot be generalized apart from numerical integration, even
142:   though some classes of problems can be solved algorithmically, {\it
143:   e.g.} by reduction to nested sums, see Ref.~\cite{Moch:2001zr}. It
144:   is only in the second step, the analytic continuation, that one can
145:   provide an algorithmic solution that would be satisfactory for both
146:   analytic and numeric evaluation. This solution is provided by the
147:   {\tt MATHEMATICA} package {\tt MB} introduced in the present work.
148: 
149:   Numeric evaluation of MB integrals has already been mentioned more
150:   than once above. Whether just for testing or for the actual
151:   calculation, automatization of this step is of value by itself. The
152:   package MB can perform the necessary integration by means of
153:   FORTRAN, the CUBA library \cite{cuba} of integration routines, and
154:   the CERN library implementation of gamma and psi functions
155:   \cite{cernlib}. Since the integrals are infinite range and
156:   multidimensional, their feasibility depends strongly on their
157:   convergence. In all tested examples, where invariants are in the
158:   Euclidean range, the behaviour is exponential and therefore poses no
159:   problems. In \cite{Anastasiou:2005cb}, physical kinematics have also
160:   been considered, but the presented examples were restricted to
161:   massless graphs exclusively. Here, I notice that massive graphs have
162:   worse properties. In fact, I give examples of integrals, which are
163:   not even absolutely integrable, and the integral is similar to the
164:   Fourier transform of the inverse square root. Such cases can still
165:   be treated, but some initial analysis is necessary and it is
166:   difficult to see how it could be automatized. Moreover, the
167:   techniques will rapidly become inefficient for higher dimensional
168:   integrals.
169: 
170:   The paper is organized as follows. In the next section, I define the
171:   main concepts and present the algorithm for analytic
172:   continuation. Subsequently, I describe the package starting with the
173:   user interface, low level routines, examples, numerical integration
174:   routines and some additional tools. Finally, I briefly summarize and
175:   conclude the paper.
176: 
177:   \section{Analytic continuation of Mellin-Barnes integrals}
178: 
179:   At the core of the Mellin-Barnes method lies the following
180:   representation
181: 
182:   \begin{equation}
183:     \frac{1}{(A+B)^\nu} = \frac{1}{\Gamma(\nu)}\frac{1}{2\pi
184:     i}\int_{-i \infty}^{i \infty} dz \frac{A^z}{B^{\nu+z}}
185:     \Gamma(-z)\Gamma(\nu+z),
186:     \label{mb}
187:   \end{equation}
188: 
189:   where the contour is chosen in such a way, that the poles of the
190:   $\Gamma$ function with $+z$ are separated from the poles of the
191:   $\Gamma$ function with $-z$.
192: 
193:   This representation can be used in Feynman integral computations in
194:   several ways. The easiest is to turn massive propagators into
195:   massless and integrate the massless integral, if a formula for
196:   general powers of propagators exists. In more complicated cases, one
197:   can use some parametric representation of the Feynman integral,
198:   which is usually an integral of a product of polynomials raised to
199:   some powers, and split the polynomials into pieces that are then
200:   integrable by some generalization of the Euler formula
201: 
202:   \begin{equation}
203:     \int_0^1 dx \; x^{\alpha-1}(1-x)^{\beta-1} =
204:     \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}.
205:   \end{equation}
206: 
207:   An extensive discussion of the methods with examples can be found in
208:   Ref.~\cite{Smirnov:2004ym}. Irrespective of the method, however, the
209:   expression for any Feynman integral assumes the form
210: 
211:   \begin{eqnarray}
212:     \!\!\!\!\!\!\!\!\!\!\!\!  \frac{1}{(2\pi i)^n}\int_{-i \infty}^{i
213:     \infty} \dots \int_{-i \infty}^{i \infty} \Pi_i dz_i \;
214:     f(z_1,\dots,z_n,s_1,\dots,s_p,a_1,\dots,a_q,\epsilon)  \frac{\Pi_j
215:     \Gamma(A_j+V_j+c_j \epsilon)}{\Pi_k \Gamma(B_k+W_k+d_k \epsilon)},
216:     \nonumber\\ \label{definition}
217:   \end{eqnarray}
218:   where $s_i$ are some kinematic parameters and masses; $a_i$ are the
219:   powers of the propagators; $A_i$, $B_i$ are linear combinations of
220:   the $a_i$; $V_i$, $W_i$ are linear combinations of $z_i$; and $c_i$,
221:   $d_i$ are some numbers. The function $f$ is analytic, in practice a
222:   product of powers of the $s_i$, with exponents being linear
223:   combinations of the remaining parameters.
224: 
225:   Because of the assumptions inherent in Eq.~(\ref{mb}), the above
226:   equation is well defined and corresponds to the original Feynman
227:   integral, if the real parts of all of the $\Gamma$ functions have
228:   positive arguments. If these conditions cannot be satisfied with
229:   $\epsilon = 0$, then the integral may develop divergences and
230:   analytic continuation to $0$ is necessary to make an expansion in
231:   $\epsilon$.
232: 
233:   The purpose of the presented package is to perform the analytic
234:   continuation of Eq.~(\ref{definition}) in $\epsilon$ to some chosen
235:   value $\epsilon_0$. The algorithm requires to generalize
236:   Eq.~(\ref{definition}) to allow for $\psi$ functions in the
237:   fraction, with $\psi(z)  = d \log \Gamma(z) /d z$ and $\psi^{(n)}(z)
238:   = d^{n} \psi(z)/dz^{n}$, with the same structure of arguments as
239:   those of the  $\Gamma$ functions.
240: 
241:   \subsection{The algorithm}
242: 
243:   \label{algorithm}
244: 
245:   There are two known ways to perform the analytic continuation. The
246:   first, introduced in Ref.~\cite{Smirnov:1999gc} consists in
247:   deforming the integration contours and then shifting them past the
248:   poles of the $\Gamma$ functions, which results in residue
249:   integrals. It is not clear how to make this method algorithmic,
250:   although some attempts in the specific case of massless on-shell
251:   double boxes have been undertaken in \cite{Smirnov:1999wz}.
252: 
253:   The second method, introduced in Ref.~\cite{Tausk:1999vh} assumes
254:   fixed contours parallel to the imaginary axis, and the analytic
255:   continuation consists in accounting for pole crossings past the
256:   contours. As described in Ref.~\cite{Tausk:1999vh}, this method is
257:   an algorithm. I make one modification with respect to the original,
258:   namely I assume that the contours are such that no two contours can
259:   be crossed simultaneously. This assumption can always be satisfied
260:   by infinitesimal shifts of one of the concerned contours.
261: 
262:   It should be clear from the above considerations, that the imaginary
263:   parts of the involved variables do not play any role. It is
264:   therefore assumed that $z_i$, $a_i$ and $\epsilon$ are real.  With
265:   ${\bf z} = (z_1, \dots, z_n)$, ${\bf a} = (a_1, \dots, a_q)$, and
266:   $(I,\epsilon_I)$ some MB integral with fixed contours and the value
267:   of $\epsilon$ fixed at $\epsilon_I$, the algorithm can be formalized
268:   as in Fig.~\ref{algo}.
269: 
270:   \begin{figure}
271:     \begin{center}
272:       \fbox{\epsfig{file=algorithm.ps}}
273:     \end{center}
274:     \caption{\label{algo} \it Analytic continuation algorithm.}
275:   \end{figure}
276: 
277:   The algorithm has been written for $\Gamma$ functions, but one
278:   should add $\psi$ functions, wherever $\Gamma$ functions occur.
279:   Upon termination, the set $C$ contains all the integrals following
280:   from the analytic continuation. It should be clear that it is the
281:   ``if'' clause that does not allow for crossings of two different
282:   contours at a time.
283: 
284:   A comment about the choice of the contours is in order. Even though
285:   all the choices are equivalent, one would like to have the smallest
286:   possible number of contributions. An improvement implemented in the
287:   package is to first gather all the residue points, and then try to
288:   add additional constraints on the contours such that these residues
289:   would not occur. If some subset of these constraints can be
290:   satisfied, then the number of residues will be reduced. This is not
291:   an algorithm that leads to an absolute minimum of the number of
292:   residues, it gives, however, at least some reduction of the number
293:   of contributions.
294: 
295:   Finally, one should notice that the technique of
296:   Ref.~\cite{Tausk:1999vh} has been similarly formalized in
297:   Ref.~\cite{Anastasiou:2005cb}.
298: 
299:   \section{The package}
300: 
301:   \subsection{User interface}
302: 
303:   The main routine performing the analytic continuation is
304: 
305:   \fbox{\tt MBcontinue[integrand, limit, \{fixedVarRules,
306:   intVarRules\}, options]}
307: 
308:   where the input arguments are
309: 
310:   \begin{itemize}
311: 
312:     \item {\tt integrand:} any object accepted by {\tt
313:     MATHEMATICA}. Notice that the singularities are determined by
314:     analyzing $\Gamma$ and $\psi$ functions only.
315: 
316:     \item {\tt limit:} a rule, {\tt x -> x0}, which specifies at the
317:     same time the variable, {\tt x}, in which the analytic
318:     continuation is performed and the point, {\tt x0}, which the user
319:     wants to reach.
320: 
321:     \item {\tt fixedVarRules:} a list of rules giving the values of
322:     the real parts of the variables, which are not integrated over. In
323:     particular, it must contain the starting value of the variable, in
324:     which the analytic continuation is performed.
325: 
326:     \item {\tt intVarRules:} a list of rules giving the real parts of
327:     the integration variables.
328: 
329:     \item {\tt options:}
330: 
331:       \begin{itemize}
332: 
333: 	\item {\tt Level:} an integer specifying the level at which
334: 	the recursive analytic continuation will be stopped. By
335: 	default, it is set to infinity.
336: 
337: 	\item {\tt Skeleton:} a boolean value. If {\tt True}, the
338: 	residues will be identified, but not calculated. This is
339: 	achieved by replacing all $\Gamma$ and $\psi$ functions by a
340: 	dummy function {\tt MBgam}. The purpose of this option is to
341: 	quickly determine the total number of integrals. By default
342: 	this option is set to {\tt False}.
343: 
344: 	\item {\tt Residues:} a boolean value. If {\tt True}, the
345: 	output will also contain the list of Residue points besides
346: 	the actual values of the residues. This is mainly for internal
347: 	use and is set by default to {\tt False}.
348: 
349: 	\item {\tt Verbose:} a boolean value. If {\tt True}, the level
350: 	is printed as well as the position on the list of the
351: 	currently continued integral and the residue points together
352: 	with the signs of the residues. This option is switched on by
353: 	default.
354: 
355:       \end{itemize}
356: 
357:   \end{itemize}
358: 
359:   The output is a nested list obtained by replacing, at every level,
360:   the integral to be continued by its residues and the original
361:   integral at the limit. The elements are
362: 
363:   {\tt MBint[integrand, \{fixedVarRules, intVarRules\}]}
364:     
365:   objects, where the integrand can be expanded around the limit, which
366:   is placed on the {\tt fixedVarRules} list. If the user specified a
367:   finite level, then there might also occur
368:   
369:   {\tt MBitc[integrand, limit, \{fixedVarRules, intVarRules\},
370:       Options]}
371:   
372:   objects, where ``itc'' stands for ``integral to continue''. These
373:   are not yet regular at the limit and require further recursive
374:   analytic continuation. Furthermore, if the user set the {\tt
375:   Residues} option to {\tt True}, there will also be a list of
376: 
377:   {\tt MBres[sign, var, val]},
378: 
379:   objects, which signal that there was a residue taken in the
380:   variable, {\tt var}, at the value, {\tt val}, with {\tt sign}.
381: 
382:   Restricted input checking has been implemented, and as long as the
383:   input is syntactically correct, the only error that may occur is
384:   (see Section~\ref{algorithm} for further details)
385: 
386:   {\tt contour starts and/or ends on a pole of Gamma[z]}
387: 
388:   In this case the procedure stops and gives an inequality for an
389:   integration variable that is sufficient to remove the problem.
390: 
391:   The integration contours are found with
392: 
393:   \fbox{\tt MBoptimizedRules[integrand, limit, constraints, fixedVars,
394:   options]}
395: 
396:   For a description of the {\tt integrand} and {\tt limit} see {\tt
397:   MBcontinue}. The remaining input parameters are as follows
398: 
399:   \begin{itemize}
400: 
401:     \item {\tt constraints:} a list of additional constraints
402:     (inequalities) specified by the user. This should usually be left
403:     empty, but might be used for experimentation in order to search
404:     for contours that might possibly give less residues.
405: 
406:     \item {\tt fixedVars:} a list of variables, which should be
407:     considered fixed during analytic continuation. The integration
408:     variables are determined automatically from the arguments of the
409:     $\Gamma$ and $\psi$ functions.
410: 
411:     \item {\tt options:}
412: 
413:       \begin{itemize}
414: 
415: 	\item {\tt Level:} specifies the level up to which
416: 	optimization of the contours will be performed. This option
417: 	should only be used for very large calculations. Since
418: 	in this case, the contours  are only partially tested, the
419: 	user will have to correct them himself, if poles lying on a
420: 	contour are encountered. In practice, independent, small
421: 	shifts should be sufficient for this purpose.
422: 
423:       \end{itemize}
424: 
425:   \end{itemize}
426: 
427:   The output matches precisely the form needed in the input of {\tt
428:   MBcontinue}, {\it i.e.}
429: 
430:   {\tt \{fixedVarRules, intVarRules\}}
431: 
432:   Notice that this procedure not only reduces the number of residues,
433:   but also generates such contours that, during analytic continuation,
434:   no contours will start or end on a pole.
435: 
436:   During the determination of the real parts, warning messages are
437:   generated. These can be ignored apart from the case when there is a
438:   single message
439: 
440:   {\tt no rules could be found to regulate this integral}
441: 
442:   and the output is an empty list. In this case, the integral cannot
443:   be regulated and the user has to provide another one, {\it e.g.} by
444:   introducing a further regulator parameter, for example a propagator
445:   power, and performing two subsequent analytic continuations.
446: 
447:   Once the integrals are determined, they can be either {\bf merged},
448:   {\it i.e.} those that have the same contour will be added by
449:   linearity; {\bf preselected}, {\it i.e.} those that would vanish in
450:   a given order of expansion in some parameter are rejected; or {\bf
451:   expanded}. These tasks are achieved with the following utilities.
452: 
453:   \fbox{\tt MBmerge[integrals]}
454: 
455:   Merges {\tt MBint} objects on the {\tt integrals} list by linearity,
456:   if they have the same contours. Vanishing integrals are rejected.
457: 
458:   \fbox{\tt MBpreselect[integrals, \{x, x0, n\}]}
459: 
460:   Rejects those {\tt MBint} objects on the {\tt integrals} list that
461:   would vanish after expansion in the variable {\tt x}, around the
462:   point {\tt x0}, up to order {\tt n}.
463: 
464:   \fbox{\tt MBexpand[integrals, norm, \{x, x0, n\}]}
465:   
466:   Expands {\tt MBint} objects on the {\tt integrals} list around the
467:   point {\tt x0}, in the variable {\tt x}, up to order {\tt n}. A
468:   normalization factor, {\tt norm}, is included in every integrand.
469: 
470:   \subsection{Low level routines}
471: 
472:   The routines described in the previous section form the
473:   interface. It might happen that the user would like to use the low
474:   level routines, which actually perform the calculation.
475: 
476:   \fbox{\tt MBresidues[integrand, limit, \{fixedVarRules,
477:   intVarRules\}, options]}
478: 
479:   Performs a single step in the recursive analytic continuation
480:   algorithm, {\it i.e.} it finds all the residues for a given
481:   integral, but does not proceed with the analytic continuation of the
482:   resulting integrals. All the arguments and options are the same as
483:   in {\tt MBcontinue}, apart from {\tt Level}, which is in this case
484:   meaningless.
485: 
486:   \fbox{\tt MBrules[integrand, constraints, fixedVars]}
487: 
488:   Finds the real parts of all the fixed and integration variables,
489:   such that the real parts of the arguments of all the $\Gamma$ and
490:   $\psi$ functions be positive. The difference to {\tt
491:   MBoptimizedRules} is that no attempt is made to optimize the number
492:   of residues or even check whether the contours will not lead to
493:   problems with {\tt MBcontinue}. To perform these tests, {\tt
494:   MBoptimizedRules} needs the limit of the continuation, which is left
495:   unspecified here. This routine is of particular interest, because
496:   one may use it to write another contour optimization algorithm.
497: 
498:   \fbox{\tt MBrules[integrand, limit, constraints, fixedVars]}
499: 
500:   Same as {\tt MBrules}, but check the contours, so that a complete
501:   analytic continuation with {\tt MBcontinue} can be performed.
502: 
503:   \subsection{Examples}
504: 
505:   \begin{figure}
506:     \begin{center}
507:       \epsfig{file=b0.eps, width=6cm}
508:     \end{center}
509:     \caption{\label{b0} \it The $B_0(s,ms,ms)$ function, with $s=p^2$
510:       and $ms=m^2$.}
511:   \end{figure}
512:   
513:   As a first example, I consider the $B_0$ function with two equal
514:   masses, Fig.~\ref{b0}. After introduction of two MB integrations
515:   (the integral can be further simplified by the use of the first
516:   Barnes lemma, see Section~\ref{tools}) and normalization of the
517:   integration measure with $1/(i \pi^{d/2})$, the expression reads
518: 
519:   {\small
520:     \begin{verbatim}
521: In[1]:= int = b0[s, 1+z1, 1+z2]*ms^z1*ms^z2*
522:         Gamma[-z1]*Gamma[1+z1]*Gamma[-z2]*Gamma[1+z2] /. z1 -> z1-z2
523: 
524: Out[1]:= (m1s^z1*(-s)^(-ep - z1)*Gamma[ep + z1]*Gamma[1 - ep - z2]*
525:          Gamma[-z2]*Gamma[-z1 + z2]*Gamma[1 - ep - z1 + z2])/ Gamma[2
526:          - 2*ep - z1]
527:     \end{verbatim}
528:   }
529: 
530:   The user must now determine the contours, or more precisely, the
531:   real parts of the contours.
532: 
533:   {\small
534:     \begin{verbatim}
535: In[2]:= rules = MBoptimizedRules[int, ep -> 0, {}, {ep}]
536: 
537: MBrules::norules: no rules could be found to regulate this integral
538: 
539: MBrules::norules: no rules could be found to regulate this integral
540: 
541: Out[2]:= {{ep -> 7/8}, {z1 -> -3/4, z2 -> -1/2}}
542:     \end{verbatim}
543:   }
544: 
545:   As explained above, the two warning messages have been generated
546:   during the determination of the contours, and since some real parts
547:   have been found, they are harmless.
548: 
549:   The user can now perform the analytic continuation
550: 
551:   {\small
552:     \begin{verbatim}
553: In[3]:= cont = MBcontinue[int, ep -> 0, rules]
554: 
555: Level 1
556: 
557: Taking +residue in z1 = -ep
558: 
559: Level 2
560: 
561: Integral {1}
562: 
563: Taking +residue in z2 = -ep
564: 
565: Level 3
566: 
567: Integral {1, 1}
568: 
569: 3 integral(s) found
570: 
571: Out[3]:= {{{MBint[(Gamma[1 - ep]*Gamma[ep])/ (m1s^ep*Gamma[2 - ep]),
572:               {{ep -> 0}, {}}]},  MBint[(Gamma[1 - ep -
573:               z2]*Gamma[-z2]*Gamma[1 + z2]* Gamma[ep +
574:               z2])/(m1s^ep*Gamma[2 - ep]),  {{ep -> 0}, {z2 ->
575:               -1/2}}]},  MBint[(m1s^z1*(-s)^(-ep - z1)*Gamma[ep + z1]*
576:               Gamma[1 - ep - z2]*Gamma[-z2]*Gamma[-z1 + z2]* Gamma[1 -
577:               ep - z1 + z2])/Gamma[2 - 2*ep - z1],  {{ep -> 0}, {z1 ->
578:               -3/4, z2 -> -1/2}}]}
579:     \end{verbatim}
580:   }
581: 
582:   At this stage, the user can, for example, expand the integrals to
583:   determine the divergence
584: 
585:   {\small
586:     \begin{verbatim}
587: In[4]:= div = MBexpand[cont, Exp[ep EulerGamma], {ep, 0, -1}]
588: 
589: Out[4]:= {{{MBint[ep^(-1), {{ep -> 0}, {}}]}}}
590:     \end{verbatim}
591:   }
592: 
593:   This is the well known value for the $B_0$ function. The integral
594:   header, {\tt MBint}, is kept, because in general, even the
595:   divergences may be given by nontrivial MB integrals.
596:   
597:   \begin{figure}
598:     \begin{center}
599:       \epsfig{file=B1.eps, width=5cm}
600:     \end{center}
601:     \caption{\label{B1} \it First planar QED box master integral,
602:       B1. The wavy lines are massless, whereas the continuous are massive
603:       and on-shell.}
604:   \end{figure}
605:   
606:   \begin{figure}
607:     \begin{center}
608:       \epsfig{file=B2.eps, width=5cm}
609:     \end{center}
610:     \caption{\label{B2} \it Second planar QED box master integral,
611:       B2. The notation is the same as in Fig.~\ref{B1}.}
612:   \end{figure}
613:   
614:   Together with the {\tt MB.m} package, two example notebooks are
615:   provided. The first one, {\tt MBexamples1.nb}, contains massive box
616:   integrals, in particular, the first and the second planar 7-line QED
617:   box master integrals, Fig.~\ref{B1} and Fig.~\ref{B2}
618:   respectively. It is found that in the first case, only 5 integrals
619:   contribute to the finite part, which is less than has been
620:   determined in Ref.~\cite{Smirnov:2001cm} by another method of
621:   analytic continuation. After merging, both integrals have just 4
622:   contributions. I have checked by numerical integration that the
623:   results agree with Ref.~\cite{Smirnov:2001cm} and
624:   Ref.~\cite{Heinrich:2004iq}.
625: 
626:   \begin{figure}
627:     \begin{center}
628:       \epsfig{file=B5l3md2.eps, width=4cm}
629:     \end{center}
630:     \caption{\label{B5l3md2} \it The B5l3md2 integral. The notation is
631:       the same as in Fig.~\ref{B1}.}
632:   \end{figure}
633:   \begin{figure}
634:     \begin{center}
635:       \epsfig{file=reg.eps, width=4cm}
636:     \end{center}
637:     \caption{\label{reg} \it A regularized version of the B5l3md2
638:       integral.  A finite result can be derived from the general
639:       representation for B2, when $a_6\rightarrow 0$.}
640:   \end{figure}
641:   
642:   An interesting example is the {\tt B5l3md2} integral,
643:   Fig.~\ref{B5l3md2}, from Ref.~\cite{Czakon:2004tg}. If one uses the
644:   general representation from Ref.~\cite{Heinrich:2004iq}, and simply
645:   sets the powers of the propagators to appropriate values, then the
646:   integral seems to vanish, due to a $\Gamma$ function in the
647:   denominator, $1/\Gamma(0) = 0$. To overcome this problem, one keeps
648:   one of the powers as a parameter, as in Fig.~\ref{reg} and does
649:   first an analytic continuation in this parameter. In this way, one
650:   obtains the following MB representation
651: 
652:   \begin{eqnarray*}
653:     &&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\frac{1}{(2 \pi i)^4}
654:     \frac{1}{\Gamma(-2\epsilon)} \int_{-i \infty}^{i \infty} \int_{-i
655:       \infty}^{i \infty} \int_{-i \infty}^{i \infty} \int_{-i \infty}^{i
656:       \infty}\;\; dz_1\; dz_2\; dz_5\; dz_6\; (-s)^{-2 - 2 \epsilon - z_5 -
657:       z_6} \left(\frac{t}{s}\right)^{z_1} \\ &\times&\frac{ \Gamma(-z_1)
658:       \Gamma(1 + z_1) \Gamma(-1 - 2 \epsilon - z_2)  \Gamma(1 + z_2)
659:       \Gamma(-3 - 4 \epsilon - 2 z_1 - z_2 - 2 z_5)}{ \Gamma(-1 - 2 \epsilon
660:       - z_2 - 2 z_5)  \Gamma(-3 \epsilon - z_5)\Gamma(-3 - 4 \epsilon - 2
661:       z_1 - z_2 - 2 z_5 - 2 z_6)} \\ &\times&\Gamma(-1 - \epsilon - z_5)
662:     \Gamma(-\epsilon - z_2 - z_5) \Gamma(-z_5)  \Gamma(2 + \epsilon + z_1
663:     + z_2 + z_5) \\ &\times&\Gamma(-1 - 2 \epsilon - z_1 - z_5 - z_6)
664:     \Gamma(-2 - 2 \epsilon - z_1 - z_2 - z_5 - z_6) \Gamma(-z_6) \\
665:     &\times&\Gamma(2 + 2 \epsilon + z_1 + z_5 + z_6).
666:   \end{eqnarray*}
667:   
668:   The presence of the $1/\Gamma(-2\epsilon)$ factor means that as long
669:   as we are only interested in the finite part, the integral is just
670:   threefold. This is, of course, confirmed by explicit continuation as
671:   can be checked in {\tt MBexamples1.nb}, where three contributions
672:   are obtained. This result has been numerically checked against the
673:   one obtained by the sector decomposition method.
674: 
675:   \begin{figure}
676:     \begin{center}
677:       \epsfig{file=NP.eps, width=4cm}
678:     \end{center}
679:     \caption{\label{NP} \it Massless on-shell non-planar double box
680:       integral, NP.}
681:   \end{figure}
682:   \begin{figure}
683:     \begin{center}
684:       \epsfig{file=T.eps, width=5cm}
685:     \end{center}
686:     \caption{\label{T} \it Massless on-shell triple box integral, T.}
687:   \end{figure}
688:   
689:   The second notebook, {\tt MBexamples2.nb}, contains two massless
690:   on-shell box integrals, the two-loop non-planar {\tt NP},
691:   Fig.~\ref{NP}, and the three-loop planar {\tt T}, Fig.~\ref{T}. In
692:   the first case, I evaluate the first three poles of the expansion
693:   and obtain at the symmetric point, $s=-1, t=-1, u=-1$
694: 
695:   \begin{equation}
696:     \mbox{NP} = \Gamma(3+2\epsilon) \left(
697:     \frac{7}{4\epsilon^4}-\frac{3}{\epsilon^3}-\frac{1}{\epsilon^2}\left(
698:     \frac{7}{2} +\frac{47 \pi^2}{24} \right) + \dots\right),
699:   \end{equation}
700: 
701:   in perfect agreement with Ref.~\cite{Tausk:1999vh}. Similarly, I
702:   recover the value of the first three poles of the triple-box
703:   integral Ref.~\cite{Smirnov:2003vi}
704: 
705:   \begin{equation}
706:     \mbox{T} = -\frac{e^{-3\epsilon \gamma_E} }{s^3(-t)^{1+3\epsilon}}
707:     \left(\frac{16}{9\epsilon^6} - \frac{5\log(s/t)}{3 \epsilon^5} -
708:     \frac{3\pi^2}{2\epsilon^4}+\dots\right).
709:   \end{equation}
710: 
711:   In both cases the lowest order pole was given by one-dimensional
712:   integrals that could be made with the first Barnes lemma, see
713:   Section~\ref{tools}.
714: 
715:   \subsection{Numerical integration}
716: 
717:   There are two factors determining the rate of convergence of MB
718:   integrals Eq.~(\ref{definition}): the behaviour of the product of
719:   gamma functions for large imaginary arguments and the behaviour of
720:   the analytic $f$ function.
721: 
722:   In the limit of large imaginary argument, the $\Gamma$ function
723:   exhibits an oscillatory behaviour, an exponential damping factor and
724:   a power law. Indeed, for $a,b \in {\rm I\mkern-3mu R}$ and $b \gg 0$ 
725: 
726:   \begin{eqnarray}
727:     \Gamma(a+i b) &\simeq& \sqrt{2\pi} \; e^{i \frac{\pi}{4} (2a-1)} \; e^{i
728:     b\; (\log{b} - 1)} \; e^{-\frac{b \pi}{2}} \; b^{a-1/2}, \\ &&
729:     \nonumber \\
730:     \Gamma(a-i b) &\simeq& \sqrt{2\pi} \; e^{-i \frac{\pi}{4} (2a-1)} \;
731:     e^{-i b\; (\log{b} - 1)} \; e^{-\frac{b \pi}{2}} \; b^{a-1/2}.
732:   \end{eqnarray}
733: 
734:   If we combine different gamma functions the exponential factor might
735:   in principle disappear, but fortunately in all cases studied it
736:   did not.
737: 
738:   On the other hand, as explained in Ref.~\cite{Smirnov:2004ym}, the
739:   $f$ function is usually a product of terms of the form
740:   
741:   \begin{equation}
742:     \label{kinematic}
743:     (-s)^{-z},
744:   \end{equation}
745:   where $s$ is some kinematic invariant ({\it e.g.} a Mandelstam
746:   variable) and $z$ is one of the integration variables. As long, as
747:   we are in the Euclidean regime, {\it i.e.} $s < 0$,
748:   Eq.~(\ref{kinematic}) contributes another oscillatory factor and
749:   cannot influence the convergence of the integral. For positive
750:   values, however, we will have
751: 
752:   \begin{equation}
753:     (-s)^{-z} = e^{-z \log(-s)} = e^{-z (\log(s) - i \pi)}
754:     = e^{i a \pi} \; s^z \; e^{b \pi},
755:   \end{equation}
756:   where $z = a-i b$. It is clear, that the exponential factor can
757:   compensate the damping from the product of gamma functions.
758: 
759:   An interesting example, which illustrates the problem is provided by
760:   the leading pole term of the first planar 7-line QED box integral,
761:   Fig.~\ref{B1}, which is given by
762: 
763:   \begin{eqnarray}
764:     -\frac{e^{-2 \epsilon \gamma_E}}{2
765:     s^2 (-t)^{1+2\epsilon}} \frac{1}{\epsilon^2} \frac{1}{(2\pi
766:     i)^2}&&\!\!\!\!\!\!\! \int_{-i \infty}^{i \infty}\int_{-i
767:     \infty}^{i \infty} dz_1\; dz_2\; 
768:     (-s)^{-z_1-z_2} \nonumber \\
769:     &\times& \frac{\Gamma^3(-z_1) 
770:     \Gamma(1+z_1)\Gamma^3(-z_2)\Gamma(1+z_2)}{\Gamma(-2z_1)\Gamma(-2z_2)},
771:   \end{eqnarray}
772:   where $\Re\; z_1 = \Re\; z_2 = -1/2$. This is just a product
773:   of two one-dimensional integrals, which can be done by closing
774:   contours and resumming the residues, with the result
775: 
776:   \begin{equation}
777:     \label{int1}
778:     \frac{1}{2\pi i}\int_{-i \infty}^{i \infty} dz_1\;(-s)^{-z_1}
779:     \frac{\Gamma^3(-z_1) 
780:     \Gamma(1+z_1)}{\Gamma(-2z_1)} =
781:     -\frac{4}{\sqrt{\frac{4}{s}-1}}\arcsin \sqrt\frac{s}{4}, 
782:   \end{equation}
783:   below threshold, {\it i.e.} for $0 \le s \le 4$. For $z_1 = -1/2-i
784:   b$, $b \gg 0$, the integrand behaves as
785: 
786:   \begin{equation}
787:     -\frac{1+i}{\sqrt{2}}\;\sqrt{\pi s}\;\frac{e^{i \log{(s/4)}\;
788:      b}}{\sqrt{b}}.
789:   \end{equation}
790:   As anticipated, the exponential factor disappeared. Worse even, the
791:   integrand is not absolutely integrable. It is interesting to note,
792:   that the frequency of the oscillation, $\log{(s/4)}$, encodes the
793:   threshold. Further examples seem to confirm that this is a general
794:   property. Fortunately, this integral can be evaluated using standard
795:   techniques for infinite range oscillatory integrands. With the
796:   Pantis' method \cite{kythe}
797: 
798:   \begin{equation}
799:     \int_{-\infty}^{\infty} db\; e^{-i \omega b}f(b) \simeq
800:     \int_{-b_0}^{\infty} db \; e^{-i \omega b}f(b) + \frac{1}{i
801:     \omega}e^{i \omega b_0}f(-b_0),
802:   \end{equation}
803:   setting $s = 2$ and $b_0 = 40$ the value of the integral in
804:   Eq.~(\ref{int1}) is $\simeq -3.17-0.09 i$, to be compared to the exact
805:   result, which is $-\pi$.
806: 
807:   One would be tempted to assume that the slowly convergent
808:   oscillatory behaviour can be factorized in one integration variable
809:   and that the remaining integrations are fast convergent. This
810:   assumption is false, as shown in Fig.~(\ref{behav}), which
811:   represents the integrand in $z_1$ of the original integral after
812:   shifting $z_1 \rightarrow z_1-z_2$ and up to normalization factors
813: 
814:   \begin{equation}
815:     \label{behaveq}
816:     \frac{1}{(2\pi i)^2} (-s)^{-z_1} \int_{-i \infty}^{i \infty} dz_2\;
817:    \frac{\Gamma^3(-z_1+z_2)
818:    \Gamma(1+z_1-z_2)\Gamma^3(-z_2)
819:    \Gamma(1+z_2)}{\Gamma(-2z_1+2z_2)\Gamma(-2z_2)}.
820:   \end{equation}
821: 
822:   Apparently, this does not seem to be integrable at all, and
823:   certainly no numerical method would provide a reasonable estimate,
824:   even if it would be integrable.
825: 
826:   \begin{figure}
827:     \begin{center}
828:       \epsfig{file=behav.eps, width=8cm}
829:     \end{center}
830:     \caption{\label{behav} \it Real part of the integral
831:     Eq.~(\ref{behaveq}) at s = 2.}
832:   \end{figure}
833: 
834:   In conclusion, one encounters massive Feynman integrals, which
835:   require, in the physical regime, multidimensional integration of
836:   slowly convergent oscillatory functions over infinite range. This
837:   problem can be solved, but the efficiency of the methods is very low
838:   and acceptable only for low dimensions. Furthermore, it might be
839:   necessary to shift the integration variables to obtain convergent
840:   representations. The latter task is certainly very difficult to
841:   automatize.
842: 
843:   The above discussion does not change anything to the fact that MB
844:   integrals provide reliable numerics in the Euclidean regime for all
845:   encountered integrals and in the Minkowski regime for the massless
846:   ones. It is of course not excluded that some massive integrals can
847:   also be done reliably without special methods, but this has to be
848:   checked in specific cases.
849: 
850:   The {\tt MB} package provides routines that can perform numerical
851:   integrations of MB representations. In order to work, the libraries
852:   {\tt libcuba.a} from {\tt CUBA} \cite{cuba}, {\tt libkernlib.a} and
853:   {\tt libmathlib.a} from {\tt CERNlib} \cite{cernlib} have to be
854:   installed either in the working directory or in a globally accessible
855:   directory with libraries, and the {\tt Fortran} compiler has to be
856:   called {\tt f77}. In case, the user wanted to change these defaults,
857:   it would be necessary to change the internal code of {\tt MB.m}.
858:  
859:   The main routine for numerical integration is
860: 
861:   \fbox{\tt MBintegrate[integrals, kinematics, options]}
862: 
863:   where the input arguments are
864: 
865:   \begin{itemize}
866: 
867:     \item {\tt integrals:} a list of integrals as provided by {\tt
868:     MBexpand}.
869: 
870:     \item {\tt kinematics:} a list of rules providing numeric values
871:     for all the parameters (usually kinematic invariants) besides the
872:     expansion variable and the integration variables. If the user is
873:     interested in Minkowski kinematics then a small imaginary part
874:     should be added. Even though this is just an approximation, it is
875:     justified by the fact, that the final result has usually much
876:     lower precision than the error introduced by such a procedure.
877: 
878:     \item {\tt options:}
879: 
880:       \begin{itemize}
881: 
882: 	\item {\tt NamePrefix:} by default the Fortran programs
883: 	  generated for integrals in more than one variable are
884: 	  called {\tt MBpart1x0}, etc. where the last number is the power of
885: 	  the expansion variable {\tt x} and {\tt part1} denotes the
886: 	  first integral at this order. With this option one can
887: 	  change the prefix {\tt MB}.
888: 
889: 	\item {\tt PrecisionGoal, AccuracyGoal, MaxPoints,
890: 	MaxRecursion:} numerical integration options as in
891: 	{\tt NIntegrate}. The defaults are respectively $4$, $12$,
892: 	$10^6$, $10^3$, and have been tuned to several problems solved
893: 	with the package.
894: 	  
895: 
896: 	\item {\tt MaxCuhreDim:} dimension threshold, 4 by default,
897: 	  above which Vegas will be used for the evaluation of the
898: 	  integrals instead of Cuhre.
899: 
900: 	\item {\tt Complex:} by default, only the real part of the
901: 	  integrals is evaluated, with this option set to {\tt True},
902: 	  the imaginary part will also be given.
903: 
904: 	\item {\tt FixedContours:} contours will not be shifted if
905: 	this option is set to {\tt True}. For a detailed explanation,
906: 	see {\tt MBshiftContours} below.
907: 
908: 	\item {\tt NoHigherDimensional:} by default, the complete
909: 	  integration is performed within {\tt MBintegrate}, however with
910: 	  this option set to {\tt True}, 1-dimensional integrals are
911: 	  evaluated and the Fortran programs are prepared, but not
912: 	  run. This may be used to run them in parallel for example.
913: 
914: 	\item {\tt Debug:} with this option set to {\tt True}, the Fortran
915: 	  programs are kept after evaluation and the value of every
916: 	  integral is given within {\tt MBval[value,  error,
917: 	  probability, part]} objects, where {\tt value}, {\tt error} and {\tt
918: 	  probability} are given by {\tt CUBA}, and {\tt part} is the
919: 	  number of the integral. This provides a primitive means of
920: 	  improving the calculation by tuning only specific
921: 	  integrals, since the integration parameters can be easily
922: 	  changed in the Fortran programs.
923: 
924: 	\item {\tt Verbose:} by default the progress of the
925: 	integration is printed to the screen. This can be switched off
926: 	by setting this option to {\tt False}.
927: 
928:       \end{itemize}
929: 
930:   \end{itemize}
931: 
932:   Instead of providing a detailed description of the output, I
933:   illustrate {\tt MBintegrate} on the example of the ``tennis court
934:   integral'', Fig.~(\ref{tennis}), introduced and calculated
935:   analytically in \cite{Bern:2005iz}. Since, it has never been
936:   confirmed independently, this example supports the correctness
937:   of the analytical result.
938: 
939:   \begin{figure}
940:     \begin{center}
941:       \epsfig{file=tennis.eps, width=5cm}
942:     \end{center}
943:     \caption{\label{tennis} \it Tennis court integral, $I_4^{(3)b}$,
944:     containing a factor of $(p+r)^2$.}
945:   \end{figure}
946: 
947:   Similarly as in \cite{Bern:2005iz}, a factor of
948:   $-(-s)^{-1-3\epsilon}t^{-2}$ has been taken out. If {\tt expanded}
949:   is the result provided by {\tt MBexpand}, which contains 65
950:   integrals, then the numerical evaluation proceeds as follows
951: 
952:   {\small
953:     \begin{verbatim}
954: In[3] := MBintegrate[expanded, {s -> -2, t -> -3}]
955: 
956: Shifting contours...
957: 
958: Performing 30 1-dimensional integrations...1...2...3...4...5...6...
959: 7...8...9...10...11...12...13...14...15...16...17...18...19...20...
960: 21...22...23...24...25...26...27...28...29...30
961: 
962: Higher-dimensional integrals
963: 
964: Preparing MBpart1ep0 (dim 6)
965: 
966: Preparing MBpart2ep0 (dim 6)
967: .
968: .
969: .
970: Preparing MBpart58ep-1 (dim 4)
971: .
972: .
973: .
974: Running MBpart1ep0
975: 
976: Running MBpart2ep0
977: .
978: .
979: .
980: {154.50857084232496 + 1.7777777777777777/ep^6 - 
981:   0.8785077342343561/ep^5 - 15.544672574293408/ep^4 - 
982:   20.903348302858618/ep^3 + 20.868443575404378/ep^2 + 
983:   84.4035478542778/ep, 
984:  {1.454748334713152 + 0.0012476956259284788/ep^3 + 
985:    0.01736836792954924/ep^2 + 0.3243732528120632/ep, 0}}
986:     \end{verbatim}
987:   }
988: 
989:   At a first stage, the contours are shifted with {\tt MBshiftContours},
990:   then the 1-dimensional integrals are evaluated in {\tt
991:   MATHEMATICA}. Subsequently, {\tt Fortran} programs for the higher
992:   dimensional integrals are prepared and run. The user can easily see
993:   the names of the programs and the dimensions of the
994:   integrals. Finally, the result is given in the form of a list. The
995:   first element is the result itself, whereas the second element is a
996:   sublist giving the errors on the real and imaginary parts respectively.
997:   It is important to note, that the errors are estimated from the
998:   square root of the sum of the squares of the errors of each of the
999:   higher dimensional integrals. Therefore, in the example above, the
1000:   errors start at $1/\epsilon^3$, because up to this pole, there were
1001:   only 1-dimensional integrals. This also implies that it is assumed
1002:   that the error from the 1-dimensional integrals is negligible. The
1003:   above calculation took about 1 hour on a 2.4 GHz notebook, with a 
1004:   claimed error on the finite part of about 1\% ($1.4$ against $154.5$
1005:   above). If compared to the exact result
1006: 
1007:   \begin{eqnarray}
1008:     \!\!\!\! \frac{1.77778}{\epsilon^6} - \frac{0.878508}{\epsilon^5} - 
1009:     \frac{15.5447}{\epsilon^4} - \frac{20.9033}{\epsilon^3} + 
1010:     \frac{20.8679}{\epsilon^2} + \frac{84.4068}{\epsilon} + 154.379,
1011:     \nonumber \\
1012:   \end{eqnarray}
1013:   the error is rather at the permille level. Further numerical
1014:   evaluation examples can be found in the two notebooks provided with
1015:   the package.
1016: 
1017:   A utility related to numerical integration, which is of interest by
1018:   itself is
1019: 
1020:   \fbox{\tt MBshiftContours[integrals]}
1021: 
1022:   where the only argument is a list of integrals as provided by {\tt
1023:   MBexpand}. The idea here, is that if there is a contour passing
1024:   between two poles of a $\Gamma$ function, then the further it will
1025:   stay from both of them, the less peaked will the integrand
1026:   be. Since the contours have more or less random distances to the
1027:   poles, it is wise to shift them before numerics to improve
1028:   stability. This is achieved by the above utility.
1029: 
1030:   \subsection{Additional tools}
1031: 
1032:   \label{tools}
1033: 
1034:   Apart from performing the analytic continuation of a MB integral,
1035:   one is usually interested in simplifying the integrals as much as
1036:   possible. This is of utmost importance, if one is interested in
1037:   obtaining analytic results. It is often the case, that some of the
1038:   integrations can be performed exactly with the help of Barnes'
1039:   lemmas.
1040: 
1041:   \underline{1st Barnes' lemma}
1042: 
1043:   \begin{eqnarray}
1044:     \int_{-i \infty}^{i \infty} &dz&  \Gamma(a+z) \Gamma(b+z)
1045:     \Gamma(c-z) \Gamma(d-z) =\nonumber \\ &&
1046:     \frac{\Gamma(a+c)\Gamma(a+d)\Gamma(b+c)\Gamma(b+d)}{
1047:     \Gamma(a+b+c+d)}.
1048:   \end{eqnarray}
1049: 
1050:   \underline{2nd Barnes' lemma}
1051: 
1052:   \begin{eqnarray}
1053:     \int_{-i \infty}^{i \infty} &dz& \; \frac{\Gamma(a+z) \Gamma(b+z)
1054:     \Gamma(c+z) \Gamma(d-z) \Gamma(e-z)}{\Gamma(a+b+c+d+e+z)} =
1055:     \nonumber \\ &&
1056:     \frac{\Gamma(a+d)\Gamma(a+e)\Gamma(b+d)\Gamma(b+e)\Gamma(c+d)\Gamma(c+e)}{
1057:     \Gamma(a+b+d+e)\Gamma(a+c+d+e)\Gamma(b+c+d+e)}.
1058:   \end{eqnarray}
1059: 
1060:   Both of them are valid only if the integration contour is such that
1061:   the poles corresponding to $\Gamma$'s with positive $z$ are
1062:   separated from the poles with negative $z$. If this is the case, the
1063:   user can apply the rules defined as
1064: 
1065:   \fbox{\tt barnes1[z]}\hfill and \hfill \fbox{\tt barnes2[z]},
1066: 
1067:   where {\tt z} is the integration variable. An example is the
1068:   simplification of the integral for the $B_0$ function
1069: 
1070:   {\small
1071:     \begin{verbatim}
1072: In[1]:= int = b0[s, 1 + z1, 1 + z2]*ms^z1*ms^z2* Gamma[-z1]*Gamma[1 +
1073:         z1]*Gamma[-z2]*Gamma[1 + z2] /.  z1 -> z1 - z2 /. barnes1[z2]
1074: 
1075: Out[1]:= (ms^z1*(-s)^(-ep - z1)*Gamma[1 - ep - z1]^2*Gamma[-z1]*
1076:          Gamma[ep + z1])/Gamma[2 - 2*ep - 2*z1]
1077:     \end{verbatim}
1078:   }
1079: 
1080:   This is, however, a rare situation. Most of the time, the Barnes'
1081:   lemmas are applicable to integrals after analytic continuation and
1082:   expansion. In this case, the procedure generates integrals with
1083:   contours parallel to the imaginary axis and the contour might not
1084:   separate the poles of the $\Gamma$ functions. In such cases one uses
1085:   various corollaries to the lemmas, see {\it e.g.}
1086:   Ref.~\cite{Smirnov:1999gc}.
1087: 
1088:   \begin{figure}
1089:     \begin{center}
1090:       \epsfig{file=barnes.eps, width=14cm}
1091:     \end{center}
1092:     \caption{\label{barnes} \it Regularization of the integrals in the
1093:       Barnes lemmas by shifting the poles, in such a way that the contour
1094:       separates the poles.}
1095:   \end{figure}
1096:   
1097:   I propose here an automatic procedure based on {\tt MBcontinue}. The
1098:   idea is to shift all of the $a,b, ...$ variables by $\epsilon$, such
1099:   that the contours be separated and then analytically continue with
1100:   $\epsilon$ to $0$, as illustrated in Fig.~\ref{barnes}. In the case
1101:   of the first Barnes lemma, the shift is determined by the condition
1102: 
1103:   \begin{equation}
1104:     \epsilon > \max\left(-\min(a,b)-\Re(z),\;\Re(z)-\min(c,d)\right).
1105:   \end{equation}
1106: 
1107:   This algorithm is implemented in the following two routines:
1108: 
1109:   \fbox{\tt Barnes1[MBint[integrand,\{fixedVarRules,intVarRules\}],z]}
1110:   
1111:   and
1112: 
1113:   \fbox{\tt Barnes2[MBint[integrand,\{fixedVarRules,intVarRules\}],z]}
1114:   
1115:   The arguments are as described in {\tt MBcontinue} and {\tt z} is
1116:   the integration variable that should be eliminated by Barnes'
1117:   lemma. An example usage can be found in {\tt MBexamples2.nb}.
1118: 
1119:   In the case, where the integral contains a $\psi$ function, the user
1120:   has to apply the lemma to the corresponding integrand with a
1121:   $\Gamma$ function and only then derive the result. This might be
1122:   automatized in the future.
1123: 
1124:   Of lesser importance are the remaining tools. To help in the
1125:   construction of efficient MB integrals, there are several known
1126:   exact expressions for the $A_0$, $B_0$ and $C_0$ functions taken
1127:   from the Appendix of Ref.~\cite{Smirnov:2004ym}. Details can be
1128:   found directly in the code of {\tt MB.m}. In case the user would
1129:   like to construct his representation directly from a Feynman
1130:   parameter integral as is done {\it e.g.} in
1131:   Ref.~\cite{Tausk:1999vh}, there is also a routine
1132: 
1133:   \fbox{\tt FUPolynomials[integrand, momenta, invariants]}
1134: 
1135:   that generates the $F$ and $U$ polynomials in the notation of
1136:   Ref.~\cite{Binoth:2000ps}. The input is
1137:   
1138:   \begin{itemize}
1139: 
1140:     \item {\tt integrand:} a product of propagators {\tt DS[k,m,n] =}
1141:     $1/(k^2-m^2)^n$.
1142: 
1143:     \item {\tt momenta:} the loop momenta.
1144: 
1145:     \item {\tt invariants:} a list of rules, {\it e.g.} {\tt p1*p2 ->
1146:     1/2*s-m\^{}2}, which transform products of external momenta into
1147:     some suitable notation, for example the Mandelstam variables.
1148: 
1149:   \end{itemize}
1150: 
1151:   In the output, one obtains a list of four elements. First come the
1152:   $F$ and $U$ polynomials, then the $M$ matrix and $Q$ vector again in
1153:   the notation of Ref.~\cite{Binoth:2000ps}.
1154: 
1155:   \section{Conclusions}
1156: 
1157:   I presented a practical tool for automatic analytic continuation of
1158:   MB integrals. It can be used either as part of a Feynman diagram
1159:   calculation leading to an analytic result in terms of some known
1160:   functions, or as a tool for directly providing numerical
1161:   results. Irrespective of the aim, the most cumbersome part of the MB
1162:   technique has been reduced to a mere use of one {\tt MATHEMATICA}
1163:   function, making high order calculations in perturbation theory
1164:   significantly easier and more accessible to the interested.
1165: 
1166:   \begin{ack}
1167: 
1168:     I would like to thank J. Gluza for testing the package and
1169:     V. A. Smirnov for motivating me to make it public through the
1170:     present work. The development of this package profited very much
1171:     from a long collaboration with J. Gluza and T. Riemann on the NNLO
1172:     corrections to Bhabha scattering in QED.
1173: 
1174:     This work was supported by the Sofja Kovalevskaja Award of the
1175:     Alexander von Humboldt Foundation sponsored by the German Federal
1176:     Ministry of Education and Research, and by the Polish State
1177:     Committee for Scientific Research (KBN) for the research project
1178:     in years 2004-2005.
1179: 
1180:   \end{ack}
1181: 
1182: \begin{thebibliography}{00}
1183: 
1184: \bibitem{cuba} T.~Hahn,
1185: %``CUBA: A library for multidimensional numerical integration,''
1186: Comput.\ Phys.\ Commun.\  {\bf 168} (2005) 78.
1187: %%CITATION = HEP-PH 0404043;%%
1188: 
1189: \bibitem{cernlib} CERN Program Library, obtainable from
1190: http://cernlib.web.cern.ch/cernlib/
1191: 
1192: \bibitem{Kotikov:1991pm} A.~V.~Kotikov,
1193: %``Differential equation method: The Calculation of N point Feynman diagrams,''
1194: Phys.\ Lett.\ B {\bf 267} (1991) 123.
1195: %%CITATION = PHLTA,B267,123;%%
1196: 
1197: \bibitem{Remiddi:1997ny} E.~Remiddi,
1198: %``Differential equations for Feynman graph amplitudes,''
1199: Nuovo Cim.\ A {\bf 110} (1997) 1435.
1200: %[arXiv:hep-th/9711188].
1201: %%CITATION = HEP-TH 9711188;%%
1202: 
1203: \bibitem{Smirnov:1999gc} V.~A.~Smirnov,
1204: %``Analytical result for dimensionally regularized massless on-shell  double
1205: %box,''
1206: Phys.\ Lett.\ B {\bf 460} (1999) 397.
1207: %[arXiv:hep-ph/9905323].
1208: %%CITATION = HEP-PH 9905323;%%
1209: 
1210: \bibitem{Tausk:1999vh} J.~B.~Tausk,
1211: %``Non-planar massless two-loop Feynman diagrams with four on-shell legs,''
1212: Phys.\ Lett.\ B {\bf 469} (1999) 225.
1213: %[arXiv:hep-ph/9909506].
1214: %%CITATION = HEP-PH 9909506;%%
1215: 
1216: \bibitem{proceedings} M.~Czakon, J.~Gluza and T.~Riemann,
1217: %``On the massive two-loop corrections to Bhabha scattering,''
1218: arXiv:hep-ph/0511187.
1219: %%CITATION = HEP-PH 0511187;%%
1220: 
1221: \bibitem{Binoth:2000ps} T.~Binoth and G.~Heinrich,
1222: %``An automatized algorithm to compute infrared divergent multi-loop
1223: %integrals,''
1224: Nucl.\ Phys.\ B {\bf 585} (2000) 741.
1225: %[arXiv:hep-ph/0004013].
1226: %%CITATION = HEP-PH 0004013;%%
1227: 
1228: \bibitem{Anastasiou:2005cb} C.~Anastasiou and A.~Daleo,
1229: %``Numerical evaluation of loop integrals,''
1230: arXiv:hep-ph/0511176.
1231: %%CITATION = HEP-PH 0511176;%%
1232: 
1233: \bibitem{Smirnov:2004ym} V.~A.~Smirnov, ``Evaluating Feynman
1234: integrals'', Springer (Berlin, Germany) 2002.
1235: 
1236: \bibitem{Moch:2001zr} J.~A.~M.~Vermaseren,
1237: %``Harmonic sums, Mellin transforms and integrals,''
1238: Int.\ J.\ Mod.\ Phys.\ A {\bf 14} (1999) 2037,
1239: %%CITATION = HEP-PH 9806280;%%
1240: 
1241: S.~Moch, P.~Uwer and S.~Weinzierl,
1242: %``Nested sums, expansion of transcendental functions and multi-scale
1243: %multi-loop integrals,''
1244: J.\ Math.\ Phys.\  {\bf 43} (2002) 3363;
1245: %[arXiv:hep-ph/0110083].
1246: %%CITATION = HEP-PH 0110083;%%
1247: 
1248: S.~Moch and P.~Uwer,
1249: %``XSummer: Transcendental functions and symbolic summation in Form,''
1250: arXiv:math-ph/0508008.
1251: %%CITATION = MATH-PH 0508008;%%
1252: 
1253: \bibitem{Smirnov:1999wz} V.~A.~Smirnov and O.~L.~Veretin,
1254: %``Analytical results for dimensionally regularized massless on-shell  double
1255: %boxes with arbitrary indices and numerators,''
1256: Nucl.\ Phys.\ B {\bf 566} (2000) 469.
1257: %[arXiv:hep-ph/9907385].
1258: %%CITATION = HEP-PH 9907385;%%
1259: 
1260: \bibitem{Smirnov:2001cm} V.~A.~Smirnov,
1261: %``Analytical result for dimensionally regularized massive on-shell planar
1262: %double box,''
1263: Phys.\ Lett.\ B {\bf 524} (2002) 129.
1264: %[arXiv:hep-ph/0111160].
1265: %%CITATION = HEP-PH 0111160;%%
1266: 
1267: \bibitem{Heinrich:2004iq} G.~Heinrich and V.~A.~Smirnov,
1268: %``Analytical evaluation of dimensionally regularized massive on-shell double
1269: %boxes,''
1270: Phys.\ Lett.\ B {\bf 598} (2004) 55.
1271: %[arXiv:hep-ph/0406053].
1272: %%CITATION = HEP-PH 0406053;%%
1273: 
1274: \bibitem{Czakon:2004tg} M.~Czakon, J.~Gluza and T.~Riemann,
1275: %``A complete set of scalar master integrals for massive 2-loop Bhabha
1276: %scattering: Where we are,''
1277: Nucl.\ Phys.\ Proc.\ Suppl.\  {\bf 135} (2004) 83;
1278: %[arXiv:hep-ph/0406203].
1279: %%CITATION = HEP-PH 0406203;%%
1280: 
1281: M.~Czakon, J.~Gluza and T.~Riemann,
1282: %``Master integrals for massive two-loop Bhabha scattering in QED,''
1283: Phys.\ Rev.\ D {\bf 71} (2005) 073009.
1284: %[arXiv:hep-ph/0412164].
1285: %%CITATION = HEP-PH 0412164;%%
1286: 
1287: \bibitem{Smirnov:2003vi} V.~A.~Smirnov,
1288: %``Analytical result for dimensionally regularized massless on-shell  planar
1289: %triple box,''
1290: Phys.\ Lett.\ B {\bf 567} (2003) 193.
1291: %[arXiv:hep-ph/0305142].
1292: %%CITATION = HEP-PH 0305142;%%
1293: 
1294: \bibitem{kythe}
1295: P.~K.~Kythe, M.~R.~Sch\"aferkotter, ``Computational Methods for
1296: Integration'', Chapman \& Hall/CRC, 2005.
1297: 
1298: \bibitem{Bern:2005iz}
1299: Z.~Bern, L.~J.~Dixon and V.~A.~Smirnov,
1300: %''Iteration of planar amplitudes in maximally supersymmetric Yang-Mills
1301: %theory at three loops and beyond,''
1302: Phys.\ Rev.\ D {\bf 72} (2005) 085001
1303: %[arXiv:hep-th/0505205].
1304: %%CITATION = HEP-TH 0505205;%%
1305: 
1306: \end{thebibliography}
1307: 
1308: \end{document}
1309: