How do I define the $n$th product derivative of a function in Mathematica?
The first product derivative $f^\ast$ of a function $f$ is $$ f^\ast(x)=\exp\left(\frac{f^\prime(x)}{f(x)}\right) $$ The $n$th product derivative is the result of applying this operator $n$ times.
This is my attempt at a recursive definition:
In[111]:= Clear[prodd]
prodd[f_, n_] := prodd[e^(f'/f), n - 1]; prodd[f_, 0] = f
Out[112]= f
In[113]:= prodd[E^x, 1](* Should print E *)
Out[113]= e^(E^-x Derivative[1][(E^x)])
In[114]:= prodd[E^E^x, 1](* Should print E^E^x *)
Out[114]= e^(E^-E^x Derivative[1][(E^E^x)])
In[114]:= prodd[E^x, 2](* Should print 1 *)
Answer
From Corollary 1 of this preprint by Mike Spivey, there is a simple nonrecursive definition for the product derivative:
ProductD[f_, x_] := ProductD[f, {x, 1}];
ProductD[f_, {x_, k_Integer?NonNegative}] := Exp[D[Log[f], {x, k}]]
Verify a few identities:
ProductD[f[x] g[x], x] == ProductD[f[x], x] ProductD[g[x], x] // Simplify
True
ProductD[x^a, x] == Exp[a/x]
True
ProductD[Exp[Exp[x]], x] == Exp[Exp[x]]
True
ProductD[x^x, x] == E x
True
Here's the corresponding multiplicative calculus analog of Derivative[]:
ProductDerivative[0] = Identity;
ProductDerivative[k_Integer?Positive][f_] :=
Derivative[k][Composition[Log, f]] /. Function[ff_] :> Function[Evaluate[E^ff]]
To use the example given by the OP in the comments:
ProductDerivative[1][Sin][4]
E^Cot[4]
ProductDerivative[1][Sin[#] &][4]
E^Cot[4]
ProductDerivative[1][Function[u, Sin[u]]][4]
E^Cot[4]
Comments
Post a Comment