# Non-Newtonian calculus

I would like to define a new operator, say:

$\text{stard}[f[x]] = \lim_{h\rightarrow 0}\left(\frac{f[x+h]}{f[x]}\right)^{\frac{1}{h}}$

I think it must be done with an upvalue, but how do I do it?

• Just curious: Is there an Anglo-Saxon-Bias here? Why are we talking about "Non-Newtonian-Calculus" when talking about say multiplicative calculus as opposed to additive? I had thought that calculus was invented by Leibniz and Newton independently from each other?
– gwr
Commented Sep 20, 2016 at 9:28
• @gwr Leibniz is harder to pronounce and create possessives from. Both "Leibnizian" and "Leibniz's" sound pretty awful. "Non-Leibnizian" is even worse. My guess is this is the main reason for Newtonian being preferred for these purposes. So in essence the bias comes from the language being used (English) rather than any preference for Anglo-Saxon scientists.
– DRF
Commented Sep 20, 2016 at 11:17
• @DRF So it might have been called "Non-Leibniz-Newtonian calculus" if an indication of possion was needed at all (no need to use possive forms twice in that case in English, is there?). To me "Non-Newtonian-Calculus" simply seems to be an unfortunate choice of a name, since it suggests that there is something like purely "Newtonian Calculus" as opposed to "Classical Calculus".
– gwr
Commented Sep 20, 2016 at 11:35
• Just filed an official complaint at Michael Grossman and Robert Katz asking them to reconsider that unfortunate choice of name. :)
– gwr
Commented Sep 20, 2016 at 12:12
• @gwr : Wait. Wait. Wait. Why does Leibniz get priority in your version of that name? Why not "Non-FermatAndTheOtherTwoGuys-ian calculus"? Commented Sep 20, 2016 at 13:23

The usual way is to specify both the expression and the relevant variables.

Clear[stard]

stard[expr_, x_] := Module[{h, result},
result = Limit[((expr /. x -> (x + h))/expr)^(1/h), h -> 0];

stard[x^2, x]

(* Exp[2/x] *)


This is what builtin functions do too, e.g. Integrate[expr, x] or FourierTransform[expr, t, ω].

Update: Here's a version which can do multiple steps in one evaluation. The most complex part of this is the error checking. The order of definitions is crucial.

Clear[stard]

stard[expr_, {x_, 0}] := expr
stard[expr_, {x_, 1}] := stard[expr, x]

stard[expr_, {x_, n_Integer?Positive}] :=
Module[{part},
part = stard[expr, {x, n - 1}];
stard[part, x] /; Head[part] =!= stard
]

stard[expr_, Except[_List, x_]] :=
Module[{h, result},
result = Limit[((expr /. x -> (x + h))/expr)^(1/h), h -> 0];
]


Example:

stard[Sin[x], {x, 3}]
(* E^(2 Cot[x] Csc[x]^2) *)

• I have corrected my question and it works nicely with your help. I dont understand exactly the difference between Derivative and D Commented Sep 20, 2016 at 8:33
• And how to define a D* of any integer order as standard second order derivatives ? Commented Sep 20, 2016 at 8:42
• Derivative[n][f][x] is the full form of D[f[x],{x,n}], so, in general, you can use any of them. Commented Sep 20, 2016 at 8:50
• @DavidPravos That's not quite correct. D[f[x], x] evaluates to Derivative[1][f][x]. The latter isn't the FullForm of the former. What I meant was that D operates on an expression, e.g. D[x^2,x]. There's no need to define a function first. Derivative operates on a function, and doesn't require specifying a variable. Commented Sep 20, 2016 at 9:10
• @cyrille.piatecki Updated. Also see comment above. Commented Sep 20, 2016 at 9:19

This is a product derivative. Using the solution from here,

ProductD[f_, x_] := ProductD[f, {x, 1}];
ProductD[f_, {x_, k_Integer?NonNegative}] := Exp[D[Log[f], {x, k}]]

ProductD[Sin[x], {x, 3}]
(* E^(2 Cot[x] Csc[x]^2) *)

• Of Course, this work but all the non standard derivatives haven't always a so simple formula. Commented Sep 20, 2016 at 13:21