Hi all, let me give some comments. On Jul 19, 6:08 pm, Golam Mortuza Hossain <gmhoss...@gmail.com> wrote: > Hi, > > I have spent considerable amount of time in last one month > working with new symbolics. Overall, I am impressed with > it.
One of the best selling point of Pynac has always been its speed, so we should anyway keep in mind this. > > However, my experience with new derivative makes me > wonder whether the pynac "fderivative" construct is really > worth the efforts! > > While implementing functional derivative and integration > algorithm for generalized function using new symbolics, I > have been brought to near a dead end because of new > derivative. > I think this is absolutely a STRATEGIC TOPIC. Having functional derivatives and (most of all) integration in Sage should be top priority, but this of course depends on my needs :P > It.... > > (1) Breaks substitution: > > Arguments of derivative can't be substituted > > http://trac.sagemath.org/sage_trac/ticket/6480 > > (2) Nightmare for writing integration algorithm: > > If h = f(g(x)).diff(x) then integrate(h, x) is trivial. However, in > new symbolics to do so, one needs compute > > integrate( D[0](f)(g(x, y))*D[0](g)(x, y), x) > > Let me claim: Integrating an expression involving new symbolic derivative > is at best EQUAL and often MORE computationally EXPENSIVE than its "diff" > counterpart. > Well, at the very end I wouldn't comply about this if the integration engine were fully working. What I can't understand is why can't we at least obtain integration of a function defined by a derivative. Is this functionality not present in Ginac? My (limited) understanding is that integration is not provided by Ginac, so we should be really careful in acquiring its derivative: I think that derivatives and integrals should at least work out together pretty well by definition, otherwise there's no chance to have a working integration engine. What I am trying to say is that I am not cutting out Pynac's fderivative since there's not a "fintegral" counterpart, but I want to say that I clearly understand why your efforts have not been successful: probably little can be accomplished without working on pynac code itself. Moreover, it is not said that fderivative has a good design. > (4) Causes Maxima interface to break: > > http://trac.sagemath.org/sage_trac/ticket/6376 > Although I think this is VERY important NOW, this shouldn't be an issue, since Pynac wants to replace Maxima. I think that forgetting retrocompatibility can sometimes be useful to have deep improvements. > (4) Gives mathematically non-sensical results: > > http://trac.sagemath.org/sage_trac/ticket/6465 > This is certainly more serious, but I think that in this case the problem is that integration comes from maxima, while maybe derivatives from Pynac, and they simply don't work well together, yet. > (5) Looses information irrecoverably: > > From "D[0](f)(x-a)" its not possible to decide whether original > variable of differentiation was "x" as in f(x-a).diff(x) or "a" > as in -f(x-a).diff(a). This again affects integration algorithm. > Is this caused by the representation or by how the information is stored? In case its just representation, it should be trivial to fix. In case the information is not stored... Well, I don't think this is possible, it does not make sense that the definition of a derivative doesn't include the variable of derivation. > (6) Compact? > > It is true that this format is sometime compact but consider > the counter example: > ------ > sage: f( g(x) + h(x) ).diff(x) > (D[0](g)(x) + D[0](h)(x))*D[0](f)(g(x) + h(x)) > ------ > > In old symbolics it takes less space to print > ----- > sage: f( g(x) + h(x) ).diff(x) > diff(f(h(x) + g(x)), x, 1) > ----- > Compactness is not necessarily the first issue to address, I think (but this is questionable) that the output should be first of all very readable. More than that, I think that staying with something recognized as a standard in the scientific community (rather than in the information technology world) has been one of the design choices of SAGE I mostly agree with. So in this case I would consider comparing with the output of Maple or MMA, but I would also stick with the canonical mathematical representation (like partial derivatives or whatever else) at least for the Latex output. > (7) Printing issues: > > We are still debating on this in separate thread. > > My question now is it really worth solving all of the > above issue to keep working with fderivative of pynac? > > Or should we just restore old "diff" by simply sub-classing it > from SFunction like what is being done for "integration" > and others? > > Cheers, > Golam At the very end, my personal opinion is that the community should plan the work on derivatives AND integrals at the same time, otherwise it does not make sense to stick with some derivatives we are not going to support in the long term (integrals are going to take a lot of time probably). My 2 cents best regards Maurizio --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---