[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] bug? in integrate and question about rf
From: |
Martin Rubey |
Subject: |
[Axiom-developer] bug? in integrate and question about rf |
Date: |
Sat, 11 Sep 2004 14:31:29 +0000 |
Isn't this a bug?
integrate(x^n,x)
n log(x)
x %e
(1) ------------
n + 1
I think that axiom should conditionalize here on n being zero or not. (Though
I'm not aware whether this is possible currently)
Second thing: I tried to "fix" (experimentally)
(1/x)::UP(x, FRAC POLY INT) not giving an error.
I intended to change the coercion in UP(x, R) from R to % (which is not
instantiated currently) to test whether x occurs as a variable in r, and, if
so, spit out an error. (footnote1)
In fact, taylor does something similar:
if Coef has Algebra Fraction Integer then
coerce(r:RN) == r :: Coef :: %
integrate x == integrate(0,stream x)$STT
integrate(x:%,v:Variable(var)) == integrate x
if Coef has integrate: (Coef,Symbol) -> Coef and _
Coef has variables: Coef -> List Symbol then
integrate(x:%,s:Symbol) ==
(s = variable(x)) => integrate x
not entry?(s,variables center x) => map(integrate(#1,s),x)
error "integrate: center is a function of variable of integration"
However, there is a tiny inaccuracy here, since
FRAC POLY INT does not have variables: Coef -> List Symbol.
Hence:
integrate((1/y)::UTS(FRAC POLY INT, x, 0),z)
does not work, although it should.
For fractions, the function variables is in the packages POLYCATQ and RF, who
need to know over which domain the ring of fractions is build. As we know, the
compiler is not able to find out which domain this is. For example, suppose F
is a Field, although it is possible to define
Test(F:Field, R: IntegralDomain): Exports == Implementation where
Exports ==> with
if F has QFCAT R then
variables : F -> List Symbol
but you cannot use this function, if you are given only the Field, but not the
Integraldoman.
An obvious solution is to move the function variables into QFCAT. Does anybody
know whether there is a (profound) reason not to do so?
Martin
(footnote1) This is not quite correct, but nearly. The right thing would be to
make the coercion only possible, if r is free of x. I don't know whether this
would be possible.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] bug? in integrate and question about rf,
Martin Rubey <=