I try to calculate an inverse Mellin transform for $s^n \Gamma(s)$:
$$x\frac{\mathrm{d}}{\mathrm{d}x}\left(x\frac{\mathrm{d}}{\mathrm{d}x}\left(e^{-x}\right)\right)$$ for $n=2$
for $n$ as $$\left(x\text{}\frac{\partial }{\partial x}\right)^ne^{-x}$$
I try NestList
and Do
but it does not work; it is simple but I don't know how to do it.
$\begingroup$
$\endgroup$
3
3 Answers
$\begingroup$
$\endgroup$
3
One way is:
f[n_] := If[n == 0, E^-x, (-1)^n*Nest[x D[#, x] &, x D[Exp[-x], x], n - 1] // Simplify]
(*for n >= 0 and n is integer *)
f[2]
(*E^-x (-1 + x) x*)
Grid[{Table[f[n], {n, 0, 5}], Table[InverseMellinTransform[s^n Gamma[s], s, x], {n, 0, 5}]}, Frame -> All]
-
$\begingroup$ hi @Mariusz Iwaniuk I LIKE YOUR METHOD IT IS MORE SIMPLE IT IS P0SSIBLE TO GET THE FORMULA INCLUSIVE WHEN F(0) WHEN N=0 GIVE AND ERROR THAT THE VALUES OBVIOSLY IS THE FUNCTION ITSELF, AND IT IS POSSIBLE TO GET THE TERM WHE N=0 THANKS $\endgroup$– capeaCommented Feb 5, 2021 at 11:19
-
$\begingroup$ @capea. I edited the answer. $\endgroup$ Commented Feb 6, 2021 at 11:01
-
$\begingroup$
$\endgroup$
You are basically differentiating with respect to Log[x]
, which is possible using the ResourceFunction
"ChainD":
ResourceFunction["ChainD"][Exp[-x],{Log[x],2}]
-E^-x x + E^-x x^2
$\begingroup$
$\endgroup$
$Version
(* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *)
Clear["Global`*"]
There are multiple ways of implementing the differential operator
dOp1[f_, n_Integer?NonNegative, sym : _Symbol : x] :=
Nest[Simplify[sym*D[#, sym]] &, f, n]
dOp2[f_, n_Integer?NonNegative, sym : _Symbol : x] :=
Sum[StirlingS2[n, k]*sym^k*D[f, {sym, k}], {k, 0, n}]
dOp3[f_, n_Integer?NonNegative, sym : _Symbol : x] :=
D[f /. sym :> E^sym, {sym, n}] /. sym :> Log[sym]
Comparing the implementations
And@@Table[dOp1[f[x], n] == dOp2[f[x], n] == dOp3[f[x], n], {n, 0, 15}] //
Simplify
(* True *)
For the special case of f[x] == E^-x
And@@With[{f = E^-x},
Table[dOp1[f, n] == dOp2[f, n] == dOp3[f, n] ==
(-1)^n*InverseMellinTransform[s^n Gamma[s], s, x], {n, 0, 15}] //
Simplify]
(* True *)
InverseMellinTransform[]
already? $\endgroup$