Ramanujan's master theorem

In mathematics, Ramanujan's master theorem, named after Srinivasa Ramanujan, is a technique that provides an analytic expression for the Mellin transform of an analytic function.

The result is stated as follows:

If a complex-valued function $ f(x) $ has an expansion of the form $$f(x)=\sum_{k=0}^\infty \frac{\,\varphi(k)\,}{k!}(-x)^k  $$

then the Mellin transform of $f(x)$ is given by

$$ \int_0^\infty x^{s-1} f(x) \, dx = \Gamma(s)\,\varphi(-s) $$

where $\Gamma(s)$ is the gamma function.

It was widely used by Ramanujan to calculate definite integrals and infinite series.

Higher-dimensional versions of this theorem also appear in quantum physics through Feynman diagrams.

A similar result was also obtained by Glaisher.

Alternative formalism
An alternative formulation of Ramanujan's master theorem is as follows:

$$ \int_0^\infty  x^{s-1}\left(\,\lambda(0) - x\,\lambda(1) + x^2\,\lambda(2) -\,\cdots\,\right) dx = \frac{\pi}{\,\sin(\pi s)\,}\,\lambda(-s) $$

which gets converted to the above form after substituting $\lambda(n) \equiv \frac{\varphi(n)}{\,\Gamma(1+n)\,} $ and using the functional equation for the gamma function.

The integral above is convergent for $ 0 < \operatorname{\mathcal{Re}}(s) < 1 $ subject to growth conditions on $ \varphi $.

Proof
A proof subject to "natural" assumptions (though not the weakest necessary conditions) to Ramanujan's master theorem was provided by G. H. Hardy(chapter XI) employing the residue theorem and the well-known Mellin inversion theorem.

Application to Bernoulli polynomials
The generating function of the Bernoulli polynomials $B_k(x)$ is given by:

$$ \frac{z\,e^{x\,z}}{\,e^z - 1\,}=\sum_{k=0}^\infty B_k(x)\,\frac{z^k}{k!} $$

These polynomials are given in terms of the Hurwitz zeta function:

$$ \zeta(s,a) = \sum_{n=0}^\infty \frac{1}{\,(n+a)^s\,} $$

by $\zeta(1-n,a) = -\frac{B_n(a)}{n}$ for $~ n \geq 1 $. Using the Ramanujan master theorem and the generating function of Bernoulli polynomials one has the following integral representation:

$$ \int_0^\infty  x^{s-1}\left(\frac{e^{-ax}}{\,1 - e^{-x}\,}-\frac{1}{x}\right) dx = \Gamma(s)\,\zeta(s,a) \!$$

which is valid for $ 0 < \operatorname{\mathcal{Re}}(s) < 1$.

Application to the gamma function
Weierstrass's definition of the gamma function

$$ \Gamma(x) = \frac{\,e^{-\gamma\,x\,}}{x}\,\prod_{n=1}^\infty \left(\,1 + \frac{x}{n}\,\right)^{-1} e^{x/n} \!$$

is equivalent to expression

$$ \log\Gamma(1+x) = -\gamma\,x + \sum_{k=2}^\infty \frac{\,\zeta(k)\,}{k}\,(-x)^k $$

where $\zeta(k)$ is the Riemann zeta function.

Then applying Ramanujan master theorem we have:

$$ \int_0^\infty x^{s-1} \frac{\,\gamma\,x + \log\Gamma(1+x)\,}{x^2} \mathrm d x =  \frac{\pi}{\sin(\pi s)}\frac{\zeta(2-s)}{2-s} \!$$

valid for $ 0 < \operatorname{\mathcal{Re}}(s) < 1 $.

Special cases of $s = \frac{1}{2} $ and $ s = \frac{3}{4} $  are

$$ \int_0^\infty \frac{\,\gamma x+\log\Gamma(1+x)\,}{x^{5/2}} \, \mathrm d x = \frac{2\pi}{3}\,\zeta\left( \frac{3}{2} \right) $$

$$ \int_0^\infty \frac{\,\gamma\,x+\log\Gamma(1+x)\,}{x^{9/4}} \, \mathrm d x = \sqrt{2} \frac{4\pi}{5} \zeta\left(\frac 5 4\right) $$

Application to Bessel functions
The Bessel function of the first kind has the power series $$ J_\nu(z)=\sum_{k=0}^\infty \frac{(-1)^k}{\Gamma(k+\nu+1)k!}\bigg(\frac{z}{2}\bigg)^{2k+\nu} $$

By Ramanujan's master theorem, together with some identities for the gamma function and rearranging, we can evaluate the integral

$$ \frac{2^{\nu-2s}\pi}{\sin{(\pi(s-\nu))}} \int_0^\infty z^{s-1-\nu/2}J_\nu(\sqrt{z})\,dz = \Gamma(s)\Gamma(s-\nu)$$

valid for $0 < 2\operatorname{\mathcal{Re}}(s) < \operatorname{\mathcal{Re}}(\nu)+\tfrac{3}{2} $.

Equivalently, if the spherical Bessel function $j_\nu(z) $ is preferred, the formula becomes

$$ \frac{2^{\nu-2s}\sqrt{\pi}(1-2s+2\nu)}{\cos{(\pi(s-\nu))}} \int_0^\infty z^{s-1-\nu/2}j_\nu(\sqrt{z})\,dz = \Gamma(s)\Gamma\bigg(\frac{1}{2}+s-\nu\bigg)$$

valid for $ 0 < 2\operatorname{\mathcal{Re}}(s) < \operatorname{\mathcal{Re}}(\nu)+2 $.

The solution is remarkable in that it is able to interpolate across the major identities for the gamma function. In particular, the choice of $J_0(\sqrt z) $ gives the square of the gamma function, $j_0(\sqrt{z})$  gives the duplication formula, $z^{-1/2}J_{1}(\sqrt z)$  gives the reflection formula, and fixing to the evaluable $s=\frac{1}{2}$  or $s=1$  gives the gamma function by itself, up to reflection and scaling.

Bracket integration method
The bracket integration method (method of brackets) applies Ramanujan's master theorem to a broad range of integrals. The bracket integration method generates the integrand's series expansion, creates a bracket series, identifies the series coefficient and formula parameters and computes the integral.

Integration formulas
This section identifies the integration formulas for integrand's with and without consecutive integer exponents and for single and double integrals. The integration formula for double integrals may be generalized to any multiple integral. In all cases, there is a parameter value $n^{\ast}$ or array of parameter values $N^{\ast}$  that solves one or more linear equations derived from the exponent terms of the integrand's series expansion.

Consecutive integer exponents, 1 variable
This is the function series expansion, integral and integration formula for an integral whose integrand's series expansion contains consecutive integer exponents. $$ \begin{align} &f(y)=\sum_{n=0}^\infty \frac{(-1)^{n}}{n!} \ \varphi(n) \ y^{n} \\ &\int_0^\infty y^{c-1} f(y) \, dy \\ &= \int_0^\infty \sum_{n=0}^\infty \frac{(-1)^{n}}{n!} \ \varphi(n) \ y^{n+c-1} dy \\ &=\Gamma(-n^{\ast})\,\varphi(n^{\ast}). \end{align}$$ The parameter $$n^{\ast}$$ is a solution to this linear equation. $$ n^{\ast}+c=0, \ n^{\ast}= -c$$

General exponents, 1 variable
Applying the substitution $y=x^{a}$ generates the function series expansion, integral and integration formula for an integral whose integrand's series expansion may not contain consecutive integer exponents. $$ \begin{align} &f(x)=\sum_{n=0}^\infty \frac{(-1)^{n}}{n!} \ \varphi(n) \ x^{an} \\ &\int_0^\infty x^{c-1} f(x) \, dx \\ &=\int_0^\infty \sum_{n=0}^\infty \frac{(-1)^{n}}{n!} \ \varphi(n) \ x^{an+c-1} dx \\ &=a^{-1} \ \Gamma(-n^{\ast})\,\varphi(n^{\ast}). \\ \end{align}$$ The parameter $n^{\ast}$ is a solution to this linear equation. $$ a \ n^{\ast}+c=0, \ n^{\ast}=-a^{-1} c $$

Consecutive integer exponents, double integral
This is the function series expansion, integral and integration formula for a double integral whose integrand's series expansion contains consecutive integer exponents. $$ \begin{align} &f(y_{1},y_{2})=\sum_{n=0}^\infty \frac{(-1)^{n_{1}}}{n_{1}!} \frac{(-1)^{n_{2}}}{n_{2}!}  \ \varphi(n_{1},n_{2}) \ y_{1}^{n_{1}}  \ y_{2}^{n_{2}} \\ &\int_0^\infty y^{c_{1}-1}_{1} y^{c_{2}-1}_{2} \ f(y_{1},y_{2}) \ dy_{1} \ dy_{2} \\ &=\int_0^\infty \int_0^\infty \sum^\infty_{n_{1}=0} \sum^\infty_{n_{2}=0} \frac{(-1)^{n_{1}}}{n_{1}!} \frac{(-1)^{n_{2}}}{n_{2}!} \ \varphi(n_{1},n_{2}) \ y_{1}^{n_{1}+c_{1}-1}  \ y_{2}^{n_{2}+c_{2}-1} \ dy_{1} \ dy_{2} \\ &=\Gamma(-n^{\ast}_{1}) \ \Gamma(-n^{\ast}_{2}) \ \varphi(n^{\ast}_{1},n^{\ast}_{2}). \\ \end{align}$$ The parameters $n^{\ast}_{1}$ and $n^{\ast}_{2}$  are solutions to these linear equations. $$ n^{\ast}_{1}+c_{1}=0, \ n^{\ast}_{2}+c_{2}=0, \ n^{\ast}_{1}=-c_{1}, \ n^{\ast}_{2}=-c_{2}$$

General exponents, double integral
This section describes the integration formula for a double integral whose integrand's series expansion may not contain consecutive integer exponents. Matrices contain the parameters needed to express the exponents in a series expansion of the integrand, and the determinant of invertible matrix $ A$ is $\det|A|$. $$ A= \begin{vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{vmatrix}, \ C= \begin{vmatrix} c_{1} \\ c_{2} \end{vmatrix}, \  \ N^{\ast}= \begin{vmatrix} n^{\ast}_{1} \\ n^{\ast}_{2} \end{vmatrix}$$ Applying the substitution $$ y_{1}=x^{a_{11}}_{1} x^{a_{21}}_{2}, \quad y_{2}=x^{a_{12}}_{1} x^{a_{22}}_{2}$$ generates the function series expansion, integral and integration formula for a double integral whose integrand's series expansion may not contain consecutive integer exponents. The integral and integration formula are $$ \begin{align} &\int_0^\infty \int_0^\infty \sum^\infty_{n_{1}=0} \sum^\infty_{n_{2}=0} \frac{(-1)^{n_{1}}}{n_{1}!} \frac{(-1)^{n_{2}}}{n_{2}!} \ \varphi(n_{1},n_{2}) \ x_{1}^{n_{1}a_{11}+n_{2}a_{12}+c_{1}-1}  \ x_{2}^{n_{1}a_{21}+n_{2}a_{22}+c_{2}-1} \ dx_{1} \ dx_{2} \\ &=\det|A|^{-1} \ \Gamma(-n^{\ast}_{1}) \ \Gamma(-n^{\ast}_{2}) \ \varphi(n^{\ast}_{1},n^{\ast}_{2}). \end{align} $$ The parameter matrix $N^{\ast}$  is a solution to this linear equation. $$ AN^{\ast}+C=0, \ N^{\ast}=-A^{-1} C $$.

Positive complexity index
In some cases, there may be more sums then variables. For example, if the integrand is a product of 3 functions of a common single variable, and each function is converted to a series expansion sum, the integrand is now a product of 3 sums, each sum corresponding to a distinct series expansion.
 * The number of brackets is the number of linear equations associated with an integral. This term reflects the common practice of bracketing each linear equation.
 * The complexity index is the number of integrand sums minus the number of brackets (linear equations). Each series expansion of the integrand contributes one sum.
 * The summation indices (variables) are the indices that index terms in a series expansion.  In the example, there are 3 summation indices $n_{1}, n_{2}$  and $n_{3}$  because the integrand is a product of 3 series expansions.
 * The free summation indices (variables) are the summation indices that remain after completing all integrations. Integration reduces the number of sums in the integrand by replacing the series expansions (sums) with an integration formula.  Therefore, there are fewer summation indices after integration. The number of chosen free summation indices equals the complexity index.

Integrals with a positive complexity index
The free summation indices $\bar{n}_{1},\ldots, \bar{n}_{f}$ are elements of set $F$. The matrix of free summation indices is $\bar{N}$ and the coefficients of the free summation indices is matrix $\bar{A}$. $$ \bar{A}= \begin{vmatrix} \bar{a}_{11} & \ldots &\bar{a}_{1f} \\ \vdots & & \vdots \\ \bar{a}_{b1} & \ldots & \bar{a}_{bf} \end{vmatrix}, \  \bar{N}= \begin{vmatrix} \bar{n}_{1} \\ \vdots \\ \bar{n}_{f} \end{vmatrix}$$ The remaining indices are set $B$ containing indices $n_{1},\ldots, n_{b}$. Matrices $A, C$  and $N^{\ast}$  contain matrix elements that multiply or sum with the non-summation indices. The selected free summation indices must leave matrix $A$ non-singular. $$ A= \begin{vmatrix} a_{11} & \ldots &a_{1b} \\ \vdots & & \vdots \\ a_{b1} & \ldots & a_{bb} \end{vmatrix}, \ C= \begin{vmatrix} c_{1} \\ \vdots \\ c_{b} \end{vmatrix}, \ \ N^{\ast}= \begin{vmatrix} n^{\ast}_{1} \\ \vdots \\ n^{\ast}_{b} \end{vmatrix}$$. This is the function's series expansion, integral and integration formula. $$ \begin{align} &f(x_{1}, \ldots, x_{b})\\ &=\sum^\infty_{n \in B} \sum^\infty_{\bar{n} \in F} \frac{(-1)^{n_{1}}}{n_{1}!} \frac{(-1)^{\bar{n}_{1}}}{\bar{n}_{1}!} \ldots \frac{(-1)^{n_{b}}}{n_{b}!} \frac{(-1)^{\bar{n_{f}}}}{\bar{n}_{f}!} \varphi(n_{1}, \ldots, n_{b}, \bar{n}_{1}, \dots, \bar{n}_{f})\prod_{x_{k} \in B} x_{k}^{n_{1}a_{k1}+ \dots + \bar{n}_{1}\bar{a}_{k1}+ \dots + c_{k}-1} \\ &\int^{\infty}_{0} \ldots \int^{\infty}_{0} x^{c_{1}-1} \dots x^{c_{b}-1} f(x_{1}, \ldots, x_{b})  \ dx_{1} \ldots dx_{b} \\ &=\det|A|^{-1} \sum^\infty_{\bar{n} \in F} \frac{(-1)^{\bar{n}_{1}}}{\bar{n}_{1}!} \ldots \frac{(-1)^{\bar{n}_{f}}}{\bar{n}_{f}!} \ \Gamma(-n^{\ast}_{1}) \ldots \Gamma(-n^{\ast}_{b}) \ \varphi(n^{\ast}_{1}, \ldots, n^{\ast}_{b}, \bar{n}_{1}, \dots,  \bar{n}_{f}). \end{align} $$ The parameters $n^{\ast}_{1}, \ldots, n^{\ast}_{b}$ are linear functions of the  parameters $\bar{n}^{\ast}_{1}, \ldots, \bar{n}^{\ast}_{f}$. $$  A \ N^{\ast}+\bar{A} \ \bar{N}+C=0, \ N^{\ast}= -A^{-1}(\bar{A} \ \bar{N}+C)$$.

Bracket series
Bracket series notations are notations that substitute for common power series notations (Table 1). Replacing power series notations with bracket series notations transforms the power series to a bracket series. A bracket series facilitates identifying the formula parameters needed for integration. It is also recommended to replace a sum raised to a power: $$ \frac{1}{(x_{1}+ \ldots +x_{b})^{\alpha}}$$ with this bracket series expression:$$\sum^{\infty}_{m_{1}=0} \ldots \sum^{\infty}_{m_{b}=0} \ \phi_{m_1, \dots,m_b} \ x^{m_{1}}_{1} \dots x^{m_{b}}_{b}\frac{\langle \alpha+m_{1}+ \ldots +m_{b} \rangle}{\Gamma(\alpha)}.$$

Algorithm
This algorithm describes how to apply the integral formulas.


 * Input Integral expression
 * Output Integral value or integral cannot be assigned a value
 * Express the integrand as a power series.
 * Transform the integrand's power series to a bracket series.
 * Obtain the complexity index, formula parameters and series coefficient function.
 * Complexity index is the number of integrand sums minus number of brackets.
 * Parameters $n^{\ast}$ or array $N^{\ast}$  are solutions to linear equations $an^{\ast}+c=0$  (zero complexity index, single integral), $AN^{\ast}+C=0$  (zero complexity index, single integral) or $AN^{\ast}+\bar{A} \bar{N}+C=0$  (positive complexity index).
 * Identify parameter $a$ or (zero complexity index, single integral) or compute $\det |A|$  (all other cases) from the associated linear equations.
 * Identify the series coefficient function $\varphi$ of the bracket series.
 * If the complexity index is negative, return integral cannot be assigned a value.
 * If the complexity index is zero, select the formula from table 2 for zero complexity index, single or multiple integral, compute the integral value with this formula, and return this integral value.
 * If the complexity index is positive, select the formula from table 2 for positive complexity index, and compute the integral value as a series expansion with this formula for all possible choices of the free summation indices. Select the lowest complexity index, convergent series expansion, adding series that converge in the same region.
 * If all series expansions are divergent series or null series (all series terms zero), then return integral cannot be assigned a value.
 * If the series expansion is non-null and non-divergent, return this series expansion as the integral value.

Zero complexity index
The bracket method will integrate this integral. $$ \int_0^\infty x^{3/2} \ e^{-x^3/2} \ dx  $$   Express the integrand as a power series.$$ \int_0^\infty \sum_{n=0}^\infty 2^{-n} \ \frac{(-1)^n}{n!} \ x^{(3 \cdot n+5/2)-1} \ dx $$  Transform the power series to a bracket series. $$ \sum_{n=0}^\infty 2^{-n} \ \phi(n) \cdot \left \langle 3 \ n+ \frac{5}{2} \right \rangle $$ Obtain the complexity index, formula parameters and series coefficient function.
 * Complexity index is zero.
 * $ 3 \ n^{\ast}+ 5/2=0$
 * $ n^{\ast}= -5/6, \ a=3$
 * $\varphi(n)=2^{-n}$.

Use table 2 to compute the integral.  $$ \int_0^\infty x^{3/2} \cdot e^{-x^3/2} \ dx  $$ $$ =a^{-1} \ \Gamma(-n^{\ast}) \ \varphi(n^{\ast})$$ $$ = \frac{\Gamma \left(\frac{5}{6} \right) \ 2^{5/6}}{3}$$

Positive complexity index
The bracket method will integrate this integral. $$ \int^{\infty}_{0} \frac{1}{(1+x^{3}+x^{5})^{1/2}} \ dx $$ 1. Express the integrand as a power series. Use the sum raised to a power formula. $$ \int^{\infty}_{0} \sum_{n_1,n_2,n_3} \ \frac{1}{\sqrt{\Gamma(1/2)}} \phi_{123} 1^{n_{1}} x^{5n_{2}+ 3n_{3}} \langle n_{1}+n_{2}+n_{3}+1/2 \rangle \ dx $$ 2. Transform the power series to a bracket series. $$ \int^{\infty}_{0} \sum_{n_1,n_n,n_3} \frac{1}{\sqrt{\Gamma(1/2)}} \phi_{123} \langle 5 \ n_{2}+ 3 \ n_{3}+1 \rangle \langle n_{1}+n_{2}+n_{3}+1/2 \rangle  $$ 3. Obtain the complexity index, formula parameters and series coefficient function.
 * Complexity index is 1 as 3 sums and 2 brackets.
 * Select $n_{3}$ as the free index, $\bar{n}_{3}$ .  The linear equations, solutions, determinant and series coefficient are

$$ 5n^{\ast}_{2}+ 3 \bar{n}_{3}+1=0, \  n^{\ast}_{1}+n^{\ast}_{2}+\bar{n}_{3}+1/2=0$$ $$ \begin{vmatrix} 1 & 1 \\ 0 & 5 \end{vmatrix} \begin{vmatrix} n^{\ast}_{1} \\ n^{\ast}_{2} \end{vmatrix} + \begin{vmatrix} 1 \\ 3 \end{vmatrix} \begin{vmatrix} \bar{n}_{3}\end{vmatrix}+ \begin{vmatrix} 1/2 \\ 1 \end{vmatrix} =0$$ $$ AN^{\ast} + \bar{A} \bar{N} + C =0$$ $$ \det |A|=5 $$ $$ n^{\ast}_{1}= -\frac{2}{5} \bar{n}_{3}-\frac{3}{10}, \ n^{\ast}_{2}= -\frac{3}{5} \bar{n}_{3}-\frac{1}{5}.$$ $$ \varphi(n^{\ast}_{1},n^{\ast}_{2}, \bar{n}_{3})= \frac{1}{\sqrt{\Gamma(1/2)}}=\frac{1}{\sqrt{\pi}} $$ 4. Use table 2 to compute the integral $$ \begin{align} &\int^{\infty}_{0} \frac{1}{(1+x^{3}+x^{5})^{1/2}} \ dx \\ &=\sum^{\infty}_{\bar{n}_{3}=0} \frac{(-1)^{\bar{n}_{3}}}{\bar{n}_{3}!} \det |A|^{-1}\Gamma(-n^{\ast}_{1}) \Gamma(-n^{\ast}_{2}) \varphi(n^{\ast}_{1},n^{\ast}_{2},\bar{n}_{3}) \\ &=\sum^{\infty}_{\bar{n}_{3}=0}\frac{(-1)^{\bar{n}_{3}}}{\bar{n}_{3}!} \frac{\Gamma(\frac{2}{5} \bar{n}_{3}+\frac{3}{10})\Gamma(\frac{3}{5} \bar{n}_{3}+\frac{1}{5})}{5 \sqrt{\pi}} \end{align} $$