Dear All, Alexey's proposition of an additional method for regularised derivative seems to be reasonable and shall not be difficult to implement. Actually we can have all of them: left_diff, right_diff and mean_diff. For many functions these will be the same as diff anyway. Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Transformations http://goo.gl/EaG2Vu Software: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter: https://github.com/vvkisil/MoebInv-notebooks
On Thu, 18 Jun 2020 00:27:33 +0400, Alexey Sheplyakov <asheplyakov@yandex.ru> said:
ASh> Vladimir, ASh> 17.06.2020, 22:58, "Vladimir V. Kisil" <v.kisil@leeds.ac.uk>: >> I think the statement 'no way to "patch" math' is too >> strong: there are many examples of such patches. Say, the >> singular integral of f(x)/(x-t) over the real line is >> divergent, but is meaningful (and useful) for "the Cauchy's >> principal value". Cesàro summation, Abel summation, and many >> others summations are examples of patches for divergent series. ASh> Not really. They are *different* mathematical entities. >> (Not even speaking about examples like: 1+2+3+4+5+... = -1/12 >> .) >> >> Similarly it is quite legitimate (and useful in some >> circumstances) in some cases to regularise a piece-wise >> differential function by assigning the derivative to be the >> mean of the left and the right derivatives. ASh> There's nothing wrong with that. As long as the user (not ASh> GiNaC) is in control which definition is being used. So if the ASh> user asks for a plain derivative, and it does not exist, GiNaC ASh> should prominently report that (throw an exception) instead of ASh> trying to choose a different definition of the derivative to ASh> "fix" the problem. It's OK to define an extra method ASh> (`regularised_diff', whatever). But "smart" adjustments of ASh> plain `diff' are not OK. ASh> Such "smartness" is the major reasons why I dislike "real" ASh> computer algebra systems. >> The possible argument is that sometimes this regularisation may >> be misleading (I do no have a sound example in my head for this >> but can admit it potential existence). ASh> In high energy physics (the original domain of GiNaC) ASh> expressions (Green functions, scattering amplitudes) are often ASh> divergent. I guess nothing will get wrong due to "improved" ASh> abs.diff(). Until someone decides to "improve" tgamma(x) at x = ASh> 0 in a similar manner. ASh> That said, these days (high energy) physics is a hobby for me. ASh> I rarely compute Feynman diagrams, and I've got no deadlines. ASh> So I don't care that much. If GiNaC will become too "flexible ASh> and smart" I can switch to a different library (or even roll ASh> another one from the scratch). ASh> Best regards, Alexey ASh> _______________________________________________ GiNaC-devel ASh> mailing list GiNaC-devel@ginac.de ASh> https://www.ginac.de/mailman/listinfo/ginac-devel