Juan Jose Garcia-Ripoll wrote:
>
> I am not interested in algorithms per se, but in real use of the program.
> There exist special functions which are defined in terms of integrals (for
> instance erf), and which can be manipulated (differentiated, taylor series,
> numerical evaluation...) as if they were "elementary". In the real world,
> these are needed. My question, rephrased in order to avoid detours is, how
> difficult is it to incorporate new integrals into Axiom's inners, let it be
> knowledge base, decision table or whatever?
>
> BTW, it does not seem true that Axiom is based solely on a decision process.
> >From the manual it mentions explicitly the use of tables of integrals and it
> already provides functions such as erf() and the like, so definitely some
> work has been done that goes beyond elementary functions.
>
Adding new special function to FriCAS is relatively easy: of order
of 10 lines of code + coding formula for derivatives (some
derivatives have big formulas). After that FriCAS can perform
"rational simplifications", compute derivatives, some Taylor
series (not nice) and some (easy) limits. To get better Taylor
series one have to add separate routine -- there are helper
routines to handle solutions of differential equations, so
typically this is not much work. Numerical evaluation needs
separate routine -- ATM several freshly added special functions
lack numerical evaluation. Most limits are done via expansion
into series, so can be done only having derivatives. But
"interesting" cases are based on asymptotic behaviour and
that needs to be coded on case by case basis. More precisely,
limits like erf at infinity are problematic because erf is not
analytic at infinity, so they need to be rewritten as limit
of different expression, such that singular part is elementary
and nonelementary part is analytic at infinity. Should be
not hard in principle but waits for for new limit routine
based on Gruntz algorithm (Gruntz algorithm is better than
our current algoritm at handling limits in essential
singularities).
The above is about adding new special functions representing
integrals. To actually get them as integration results needs
extensions to integrator.
Extending Risch algoritm is serious work. I can say more about
what is done in FriCAS (compared to Axiom) and about possible
future developements, but you are probably more interested in
easier ways.
Rich integrator actually decomposes functions into two pieces: one
that is can handle and other one which does not have elementary
integral. The second piece is sent to pattern-matching integrator.
Currently pattern-matching integrator has about 9 patterns.
Adding more in not hard, but currently tedious: existing code
uses 10-30 lines per pattern. I believe that the coding effort
can be substantially reduced using existing machinery of
rewrite rules, but only trying we can find out if this belif
is correct.
Another possiblity is adding Risch-Norman integrator. When
integrand is elementary than Risch-Norman is less capable
than Risch, but Risch-Norman can handle some non-elementary
integrands which are hard for extended Risch. Simple
version of Risch-Norman should be easy to do -- we already
have most of the code in existing integrator, and the
extra code probably will be of order of 50 lines. OTOH
to get reasonable speed on big integrals may require significantly
more work.
For a class definite integrals Mathematica and Maple use reduction
to MeijerG function. Simple version should be doable with limited
effort but production version is likely to take 1000-3000 lines
of code.
If main interest is to actually compute integrals (as opposed
to working on integrator), then probably adding patterns is
easy enough. But it also depends on which integrals one
wants: some integrals are easy for algorthms and hard for
patterns, some are hard for algorthms and easy for patterns.
And if integrals vary a lot then one may need a lot of patterns.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.