On Jun 23, 7:29 am, Golam Mortuza Hossain <gmhoss...@gmail.com> wrote:
>
> +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.
Just a warning. If the algorithm within Sage gets an answer, but it
is in wrong, or in a much inferior form than you would get in Maxima,
then Sage will have some unnecessary deficiencies. Probably more than
any other feature in Maxima, its integration code accesses the
underlying algorithms for simplification, changes in representation,
rational function manipulation such as partial fractions, factoring,
algebraic function simplification, limits, knowledge of special
functions, calculations with assumptions, pattern matching, the Risch-
based programs, (which depend on construction of differential fields),
etc.
Consequently, it would be a challenge to do as effective an
"integration" program without subroutines similar in power to those in
Maxima (or superior).
Note also that Maxima's integration program continues to be improved,
so that programming Sage symbolics to replace Maxima integration
places you in the same situation as Lewis Carroll's Red Queen who
points out..
" Now, here, you see, it takes all the running you can do, to keep in
the same place. If you want to get somewhere else, you must run at
least twice as fast as that!"
You can do quite a few easy integrals (including ones that "look"
complicated) with simple methods. Norvig's Paradigms of AI Programming
has a chapter on the topic. You shouldn't let the success of simple
methods fool you into thinking your demo program just needs a few
finishing touches. Look at the sizes of the ambitious integration
programs in 3M's and Axiom -- it would be unreasonable to think that
they are all large because all the programmers were incompetent.
........
>
> 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)
Oddly enough, work on Maxima in the last 12 months has covered the
same ground, with impulses and piecewise defined functions.
RJF
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---