Use Meijer-G function to represent elementary functions
Version 11 now has the function MeijerGReduce[]
, which returns equivalent MeijerG[]
expressions in an inactive state. Applied to the OP's examples:
MeijerGReduce[{x^2, Sqrt[x], Sin[4 x], x Log[x]}, x]
{x^2, Sqrt[x],
Sqrt[π] Inactive[MeijerG][{{}, {}}, {{1/2}, {0}}, 2 x, 1/2],
x (Inactive[MeijerG][{{1, 1}, {}}, {{1}, {0}}, x] -
Inactive[MeijerG][{{1, 1}, {}}, {{1}, {0}}, x, -1])}
where we see that only the last two functions were touched. The first two fail precisely because their Mellin transforms are not in a form suitable for the conversion:
MellinTransform[{x^2, Sqrt[x]}, x, s]
{DiracDelta[2 + s], 2 DiracDelta[1 + 2 s]}
Contrast this with
MellinTransform[Sin[4 x], x, s]
4^-s Gamma[s] Sin[(π s)/2]
In its current form, it does not seem to fit the style of the defining Mellin-Barnes integral for Meijer $G$, but using the reflection formula and the duplication formula for the gamma function, we have the identity
4^-s Gamma[s] Sin[(π s)/2] ==
Sqrt[π]/2 Gamma[1/2 + s/2]/Gamma[1 - s/2] 2^-s // FullSimplify
True
which can now be compared with the $G$ expression returned by MeijerGReduce[]
: Sqrt[π] MeijerG[{{}, {}}, {{1/2}, {0}}, 2 x, 1/2]
.
There is an undocumented(!) function that essentially performs a Mellin transform through lookup. In your case, however, only one of your four examples actually has a sensible Mellin transform (and thus, a Meijer $G$ representation):
Integrate[Log[x], {x, 0, 1}]; (* force autoloading of the internal function *)
Integrate`ImproperDump`Mellin[Sin[4 x], x]
(* Sqrt[Pi] Integrate`ImproperDump`MeijerGfunction[{}, {}, {1/2}, {0}, 4 x^2] *)
Check:
Simplify[% /. Integrate`ImproperDump`MeijerGfunction[a_, b_, c_, d_, z_] :>
MeijerG[{a, b}, {c, d}, z], x > 0]
(* Sin[4 x] *)
Try a more elaborate example:
Integrate`ImproperDump`Mellin[Hypergeometric2F1[1/2, -1/3, 1, x], x]
(* Integrate`ImproperDump`MeijerGfunction[{4/3, 1/2}, {}, {0}, {0}, -x]/(Sqrt[Pi] Gamma[-1/3]) *)
As it is a lookup-based function, it might return unevaluated on functions that nevertheless have a $G$ function representation:
Integrate`ImproperDump`Mellin[Log[1 + x]/x, x]
(* Integrate`ImproperDump`Mellin[Log[1 + x]/x, x] *)
MeijerG[{{0, 0}, {}}, {{0}, {-1}}, x]
(* Log[1 + x]/x *)
A partial answer using the reference that you provided:
Limit[b^-1 MeijerG[{{0}, {}}, {{0}, {}}, x^(-5/2)/b], b -> 0]
(* x^(5/2) *)
Assuming[{x >= 0},
Sqrt[π] MeijerG[{{}, {}}, {{1/2}, {0}}, 4 x^2] // Simplify]
(* Sin[4 x] *)