2

I'm currently looking at the mpmath documentation for Meijerg. It says

mpmath.meijerg(a_s, b_s, z, r=1, **kwargs) Evaluates the Meijer G-function, defined as enter image description here for an appropriate choice of the contour L (see references).

  • There are p elements a_j. The argument a_s should be a pair of lists, the first containing the n elements a_1, ..., a_n and the second containing the p-n elements a_{n+1}, ... a_p.
  • There are q elements b_j. The argument b_s should be a pair of lists, the first containing the m elements b_1, ..., b_m and the second containing the q-m elements b_{m+1}, ... b_q.

The second example given there has four arguments for the series a, b:

1, 1
1, 0

For example, for the first row, to me it isnt clear whether this is a pair of sets that each contain one number, [[1],[1]] or one set with two elements and an empty set [[1, 1], []}

Confusingly, without mentioning it, they do a mixture. They call the function in the second example as

meijerg([[1,1],[]], [[1],[0]], z)

which means that the first two numbers belong into the first set, but the second two numbers belong to one set each. Can someone explain to me why? What is the logic behind this?

Anand S Kumar
  • 88,551
  • 18
  • 188
  • 176
FooBar
  • 15,724
  • 19
  • 82
  • 171

1 Answers1

3

The parameters of the Meijer G function are four sets of numbers:

A1 = [a_1, a_2, ..., a_n]
A2 = [a_{n+1}, a_{n+2}, ..., a_p]
B1 = [b_1, b_2, ..., b_m]
B2 = [b_{m+1}, b_{m+2}, ..., b_q]

In the mathematical notation, one writes a_1, ..., a_p together on the same row. The integer n tells you how many of these parameters belong to A1 and how many belong to A2.

Likewise, in the mathematical notation, one writes b_1, ..., b_q on the same row, and the integer m tells you how many of these parameters belong to B1 and how many belong to B2.

In the computer algebra input notation, one writes A1, A2, B1, B2 as separate lists. With this notation, the Meijer G function is called as follows:

meijerg([A1, A2], [B1, B2], z)

The integers m, n, p, q are not passed explicitly as input to the function, since they just duplicate known information:

len(A1) = n
len(A1) + len(A2) = p
len(B1) = q
len(B1) + len(B2) = q

So, if we look at the input

meijerg([[1,1],[]], [[1],[0]], z)

it means

A1 = [a_1, a_2] = [1, 1]
A2 = []
B1 = [b_1] = [1]
B2 = [b_2] = [0]

n = 2
p = 2
m = 1
q = 2

So in short, the input to the Meijer G function is just two pairs of lists of numbers: [A1, A2], [B1, B2]. Any of the lists A1, A2, B1, B2 can be empty.

The notation for the Meijer G function with the (m, n, p, q) subscripts and superscripts is indeed very confusing, but unfortunately well established in the literature, so there's little hope to change it.

Fredrik Johansson
  • 25,490
  • 3
  • 25
  • 17