Bill Page wrote:
>
> I would like to tell FriCAS that
>
> integrate(abs(x),x) = x*abs(x)
>
> How can I do t that? Where to start? I can see where the derivative of
> abs is declared in combfunc using the basic operator functionality.
> Wouldn't it be nice if it was possible to do something similar for
> integrals?
You can add any integral you wish to the pattern matching
integrator, that is 'intpm.spad'. Currently patterns are
specified by code, but in principle we could allow
user defined patterns. However, this is of limited use.
Namely, unlike differentiation, there is no simple
way to integrate a product given integrals of factors.
So, in practice, when you add a pattern you add ability
to do a specific integral, but for similar looking integral
you need new pattern.
Concerning 'abs', FriCAS can do some integrals containing 'abs'
like:
(1) -> D(exp(abs(x)), x)
abs(x)
abs(x)%e
(1) --------------
x
Type: Expression(Integer)
(2) -> integrate(%, x)
abs(x)
(2) %e
Type: Union(Expression(Integer),...)
but will fail on any nontivial example (and many trivial ones).
We could easily add ability to do large class of indefinite
integrals containing 'abs' using method from papers:
D. J. Jeffrey, G. Labahn, M. v. Mohrenschildt, A. D. Rich,
Integration of the signum, piecewise and related Functions
http://citeseer.ist.psu.edu/jeffrey97integration.html
D. J. Jeffrey, A. D. Rich, Recursive integration of
piecewise-continuous functions,
http://citeseer.ist.psu.edu/jeffrey97recursive.html
However, I am affraid that this would lead to several
wrong definite integrals. To handle definite integrals
correctly we would probably need stronger continuity test
and extra code to choose antidervative which avoids
branch cuts.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.