# Wolfram Language™

## Compute Definite Integrals Using G Reduction

Expressing functions in terms of MeijerG allows the computation of their product over the positive reals.

Create a rule to express the integral of a product of functions in terms of MeijerG functions.

In:= ```IntegrateMeijerG[f_ g_, {z_, 0, Infinity}] /; FreeQ[{f, g}, MeijerG] := IntegrateMeijerG[ MeijerGReduce[f, z] MeijerGReduce[g, z], {z, 0, Infinity}]```

This integral can be expressed exactly in terms of a single MeijerG expression.

In:= ```IntegrateMeijerG[\[Alpha]_ Inactive[MeijerG][{a_, b_}, {c_, d_}, \[Omega]_. z_] Inactive[MeijerG][{e_, f_}, {g_, h_}, \[Eta]_. z_], {z_, 0, Infinity}] /; FreeQ[{\[Alpha], \[Omega], \[Eta]}, z] := \[Alpha] MeijerG[{Join[-c, e], Join[f, d]}, {Join[-a, g], Join[h, -b]}, \[Eta]/\[Omega]]```

Apply the scheme to evaluate .

In:= ```Plot[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, 10}, Filling -> Axis, PlotRange -> All]```
Out= In:= `IntegrateMeijerG[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}]`
Out= Obtain the same result using Integrate.

In:= `Integrate[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}]`
Out= Although the answer looks quite different, it is equivalent.

In:= ```IntegrateMeijerG[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}]; Integrate[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}]; FullSimplify[% == %%]```
Out= 