This example is from Ulrich Schwardmann: Computeralgebra-Systeme, Addison-Wesley, 1995, p127f. It tries to compute a partial fraction of a fraction with unknown constants. The result is not the expected partial fraction decomposition, and does not seem to have any other senseful interpretation (it is q/x). Following is a verification of the partial fraction that macsyma computes. axiom q:=(x+a)/(x*(x**3+(b+c)*x**2+b*c*x))
Type: Fraction(Polynomial(Integer))
axiom partialFraction(q,
axiom (c-a)/((c^3-b*c**2)*(x+c))-(b-a)/((b**2*c-b**3)*(x+b))+((b-a)*c-a*b)/(b**2*c**2*x)+a/(b*c*x**2) - q
Type: Fraction(Polynomial(Integer))
workaround --kratt6, Tue, 08 Aug 2006 08:42:30 -0500 reply it seems that it is better to use partialFraction$PartialFraction . I did it as follows:
axiom SUP FRAC POLY INT has EUCDOM
Type: Boolean
axiom den := univariate((x*(x**3+(b+c)*x**2+b*c*x)),
Type: SparseUnivariatePolynomial?(Fraction(Polynomial(Integer)))
axiom num := univariate(x+a,
Type: SparseUnivariatePolynomial?(Fraction(Polynomial(Integer)))
axiom partialFraction(num,
Does this suggest that the bug is in There are two operations partialFraction: (R, FRR) -> % ++ partialFraction(numer,denom) is the main function for ++ constructing partial fractions. The second argument is the ++ denominator and should be factored. from the exposed domain partialFraction: (FPR, Symbol) -> Any ++ partialFraction(rf, var) returns the partial fraction decomposition ++ of the rational function rf with respect to the variable var. from the unexposed package This shows that overloading should be done very carefully. I think we should rename the operations in Martin Martin Maybe it's enough to expose PartialFractionPackage? --Christian Sievers, Tue, 15 Aug 2006 10:48:13 -0500 reply (Sorry for not first testing a simpler example...)
I came to the same result this weekend. It seems to me from first tests that it would suffice to just also expose PartialFractionPackage?. However I don't know axiom good enough to see if there are any unwanted side effects. axiom )expose PFRPAC
axiom partialFraction(1,
Type: PartialFraction?(Integer)
Category: Axiom Mathematics => Axiom User Interface
Status: open => fix proposed
there are in fact two (different) fixes proposed... Should be reconsidered Category: Axiom User Interface => Axiom Library |