I need to understand how to establish two identities. The first is

$$ \int_{C} z^{-1-q}(1-z)^{-1-\lambda } dz=\frac{2 \pi \Gamma (q+\lambda +1)}{\Gamma (\lambda +1) \Gamma (q+1)}, q\geq 0, \lambda >0$$ where C is a contour $z=1/2+ i t, t \in (-\infty,\infty) $

Mathematica believes this

With[{z = l + I t}, 
 Integrate [  
  z^(-q - 1) (1 - z)^(-λ - 1), {t, -Infinity, Infinity}, 
  Assumptions -> {q > 0, λ > 0, 0 < l < 1}]]

When q=0 (RHS is just 2 \pi), this comes from the pole at 0, by using a half circle contour which surrounds it, and blowing it to $\infty$. With q>0, my first idea was to use a rectangle excluding the branch point at 0, but this cannot work since the integrand explodes there

The second identity is a contour integral representation of the HypergeometricU function with powers integrand (unlike the ones given at http://functions.wolfram.com/HypergeometricFunctions/HypergeometricU/07/02/ )

$$ \int_{C} e^{-x z} z^{-1-q}(1-z)^{-\lambda } dz= \frac{2 \pi\ \ e^{-x} x^{q+\lambda} \ U(q+1 , q+\lambda+1,x)}{\Gamma(\lambda ) }, q\geq 0, \lambda >0, x>0$$

Mathematica's NIntegrate confirms this

cnS = {q -> 5/Pi, \[Lambda] -> 4 Pi, l -> 1/3};
int[x_] := Exp[ -x  z] z^(-q - 1) (1 - z)^(-\[Lambda]) /. cnS;
RBr[x_] := 
  Chop[NIntegrate [
    int[x] /. z -> I t + l /. cnS, {t, -Infinity, Infinity}], 10^(-9)];
R[z_] := 2 Pi  Exp[- z] z^
    n HypergeometricU[q + 1, q + \[Lambda] + 1, z]/Gamma[\[Lambda]];
Print["R Bromwich=", RBr[1], " R exact= ", Chop[R[1] //. cnS // N]]

but the hard question for me is how to prove this by providing the right integration contour.

I also had some intreaguing problems when $\lambda$ is not an integer, but they disappeared on my minimal example above:) I am still wondering though whether NIntegrate could give a wrong answer in cases when a parameter switches from integer to noninteger.

  • 1
    $\begingroup$ What is the Mathematica question here? Whether the second identity holds only for integer values would probably be best disproved by a counter example, i.e. by finding a non-integer value for which it holds. I do not really understand what you are asking in the first part. $\endgroup$
    – MarcoB
    Commented May 4, 2020 at 20:20
  • 3
    $\begingroup$ I believe Mathematica is correct with respect to $U(a,b,z)$. Check out the DLMF site, specifically Eq. 13.4.14. $\endgroup$
    – yarchik
    Commented May 4, 2020 at 20:28
  • $\begingroup$ @MarcoB I would like to know how to prove the first identity. By proof I mean specifying a branch cut, presumably (-\infty, 0 ) union with (1,\infty) and a contour integraI whose limit provides the result, which I do not see yet. This pair changes from example to example, and I could not find a similar example yet. Once that pair given, the integration and limit are routine exrcises. I am reading simultaneously contour integration examples, but it never hurts to ask. I hope the pair would help proving the second identity, where the exponential was added $\endgroup$
    – florin
    Commented May 5, 2020 at 4:51
  • $\begingroup$ @marcoB how do I learn to transform latex code so it's displayed as at mathematica.stackexchange.com/posts/221110/revisions $\endgroup$
    – florin
    Commented May 5, 2020 at 9:03
  • 2
    $\begingroup$ @florin The $\LaTeX$ was fine; only, you had it indented by four spaces, so the system Interpreted it as code and displayed it unformatted. I only removed the indenting spaces so the system understood it was LaTeX and formatted it appropriately. $\endgroup$
    – MarcoB
    Commented May 5, 2020 at 13:54

2 Answers 2


Version 12.1 solves the first integral without difficulty.

With[{z = 1/2 + I t}, Integrate[z^(-q - 1) (1 - z)^(-λ - 1), {t, -Infinity, Infinity}, 
    Assumptions -> {q >= 0, λ > 0}]]

(* (2 π Gamma[1 + q + λ])/(Gamma[1 + q] Gamma[1 + λ]) *)

I shall give the second integral some thought tomorrow.


Actually, I do believe that this question is of pure mathematics character and does not belong here. Nonetheless, I provide a short answer. A lot of information on special functions can be found in the so called Bateman Manuscript Project. There are download links at the bottom of the page. Specifically, you need the volume I, Sec. 6.5 enter image description here

As I mentioned in the comment above, another comprehensive source on special functions is the DLMF project. The advantage is that they follow modern notations. The disadvantage is that they do not present all derivations.

  • 2
    $\begingroup$ "The disadvantage is that (DLMF) do(es) not present all derivations." - They often link to references, which can be accessed by clicking on the circled "i" in the beginning of each section and next to each listed formula. $\endgroup$ Commented May 6, 2020 at 8:42
  • $\begingroup$ @J.M. Yes, that is a good point $\endgroup$
    – yarchik
    Commented May 6, 2020 at 8:46
  • 1
    $\begingroup$ One should also probably note at this juncture that there is are connection formulae between the Tricomi confluent hypergeometric function $U$ in the OP, and the more conventional Kummer function ${}_1 F_1$, e.g. this one, and Mathematica might return the ${}_1 F_1$ result which won't work for integer parameters, but will work if $U$ is used instead. $\endgroup$ Commented May 6, 2020 at 8:51
  • $\begingroup$ @yarchik thanks for the reference, I will go dig there! I need however this identity when a <0 (a=-q in my notation), and I would be more comfortable with a proof using contour integrals, since the sign of a seems crucial, and it seems the proof should exploit that. So, I could use more help :) It's great you answered, I also asked this on the mathematics forum, but there I have no answer yet $\endgroup$
    – florin
    Commented May 6, 2020 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.