On Tue, 23 Jun 2009 11:29:53 -0300 Golam Mortuza Hossain <gmhoss...@gmail.com> wrote:
> > On Mon, Jun 22, 2009 at 10:28 AM, Burcin Erocal<bur...@erocal.org> > wrote: > >> I am wondering whether there is any policy/framework > >> for hooking-up a specialized integration code as a part > >> of integration algorithm in new symbolic? > > > > There isn't any, yet. That should change this week though. :) > > > > I plan to move the integrate() and sum() (after #3587) constructs > > to be symbolic functions (i.e., subclasses of SFunction from > > sage.symbolic.function), as opposed to regular python functions in > > sage.calculus.calculus. This will allow us to have real symbolic > > integrals and sums in Sage and define custom methods for evaluation, > > which can/should be more involved than just wrapping those of > > maxima or sympy. > > +1, I agree, this is badly needed. We should ask maxima/sympy to > compute an integral when algorithm within Sage fails. That way > one can implement the integration algorithm within Sage which are > not yet implemented in maxima/sympy. > > Currently, I am using a hackish approach while implementing > integration algorithm involving generalized functions (Dirac delta, > Heaviside theta and Unit step) as follows > > ----------- > from sage.functions.generalized import integrate_generalized_functions > try: > return integrate_generalized_functions(expression, v, a, b) > except NotImplementedError: > return maxima_integral(expression, v, a, b) > ----------- Eventually, we'll probably keep a list of functions that the eval method of integral will call in order. This would also allow users to hook up their custom integration functions easily. > As you suggested, I agree that I should split the integration code > from the function definition file. > > Where do you propose to put the integration algorithm files? > Something like > > sage/symbolic/integration/algorithm_x.py sage/symbolic/integration/generalized_functions.py in this case? Cheers, Burcin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---