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[1]:=
![Click for copyable input](assets.en/compute-definite-integrals-using-g-reduction/In_145.png)
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[2]:=
![Click for copyable input](assets.en/compute-definite-integrals-using-g-reduction/In_146.png)
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[3]:=
![Click for copyable input](assets.en/compute-definite-integrals-using-g-reduction/In_147.png)
Plot[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, 10}, Filling -> Axis,
PlotRange -> All]
Out[3]=
![](assets.en/compute-definite-integrals-using-g-reduction/O_81.png)
In[4]:=
![Click for copyable input](assets.en/compute-definite-integrals-using-g-reduction/In_148.png)
IntegrateMeijerG[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}]
Out[4]=
![](assets.en/compute-definite-integrals-using-g-reduction/O_82.png)
Obtain the same result using Integrate.
In[5]:=
![Click for copyable input](assets.en/compute-definite-integrals-using-g-reduction/In_149.png)
Integrate[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}]
Out[5]=
![](assets.en/compute-definite-integrals-using-g-reduction/O_83.png)
Although the answer looks quite different, it is equivalent.
In[6]:=
![Click for copyable input](assets.en/compute-definite-integrals-using-g-reduction/In_150.png)
IntegrateMeijerG[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}];
Integrate[(1 + z)^(-3/2) EllipticK[-2 z], {z, 0, Infinity}];
FullSimplify[% == %%]
Out[6]=
![](assets.en/compute-definite-integrals-using-g-reduction/O_84.png)