oldk1331 wrote:
>
> I write a primitive version patch implementing my ideas,
> it works when "g x == sqrt x" in the test, and gives far more
> compact result when "g x == sqrt x + x^(1/3)".
>
> I wonder if some part of this patch should be independent
> functions:
> 1. test if a kernel is a constant/algebraic number, algNumIfCan?
Test for constant is easy: 'D(c, x) = 0'. Once you know
that something is a constant normal way of testing
kernels for algebraic etc. work. Note: it is reasonable
to assume that any constant is build up from constant
expressions. One can build constants like 'sin(x)^2 + cos(x)^2'
but 'normalize' make some effort to eliminate them.
> 2. "deep" univariate, eg. "deepunivariate(x,first kernels sqrt x)"
> should return "?^2".
Hmm, what your 'deepunivariate' should do when kernel is
'sqrt(x^3 - x)'? If you want to rewrite expression
containig roots in terms of single kernel look at
INTG0 -- it is not always possible, when it is possible
may require hard computation (currently not done) but
INTG0 has a few useful tricks.
OTOH transformations done by INTG0 may introduce
artifacts and one of task done in 'irexpand.spad' is
the eliminate (or minimize) artifacts due to earlier
steps. So you need to look at impact on all integrals.
> Also, what's the best way to create a non-conflicting random
> new kernel?
kernel(new()$Symbol)
OTOH integration code instead of introducing new kernel
usually works with SparseUnivariatePolynomial or with
corresponding rational functions. To work with algebraic
functions this can be iterated.
--
Waldek Hebisch
--
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.