bugAxiom Computer Algebra System - Bugs: bug #5785, partialFraction((2*x^3)::UP(x,...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #5785: partialFraction((2*x^3)::UP(x, FRAC INT), (1-x^2)) is not correctly expanded

Submitted by:  David MentrĂ© <dmentre>
Submitted on:  Tue 07 Oct 2003 05:51:42 PM UTC  
 
Category:  interpreter Severity:  2 - Minor
Item Group:  code bug Status:  transferred
Privacy:  Public Assigned to:  None
Originator Name:  Dylan Thurston Open/Closed:  Open
Release:  Tue, 7 Oct 2003 12:56:51 -0400 Reproducibility:  Every Time
Fixed Release: 
Error message: 
Example of code trigerring the bug: 

>(8) -> partialFraction((2*x^3)::UP(x, FRAC INT), (1-x^2))
>
> 2x
> (8) - 2x - ------
> 2
> x - 1
> Type: PartialFraction UnivariatePolynomial(x,Fraction Intege=
>r)
>(9) -> partialFraction((2*x^3), (1-x^2)::UP(x, FRAC INT))
>
> 1 1
> (9) - 2x - ----- - -----
> x - 1 x + 1
> Type: PartialFraction UnivariatePolynomial(x,Fraction Intege=
>r)
>------
>
>Why didn't input (8) above actually do the partial fraction expansion?

Internal cause: 

Tue 07 Oct 2003 05:51:42 PM UTC, original submission:

Dylan Thurston wrote:

>Furthermore, I think there's a bug here:
>
>------
>(8) -> partialFraction((2*x^3), (1-x^2))
> There are 1 exposed and 1 unexposed library operations named=20
> partialFraction having 2 argument(s) but none was determined to=20
> be applicable. [snippage]
>(8) -> partialFraction((2*x^3)::UP(x, FRAC INT), (1-x^2))
>
> 2x
> (8) - 2x - ------
> 2
> x - 1
> Type: PartialFraction UnivariatePolynomial(x,Fraction Intege=
>r)
>(9) -> partialFraction((2*x^3), (1-x^2)::UP(x, FRAC INT))
>
> 1 1
> (9) - 2x - ----- - -----
> x - 1 x + 1
> Type: PartialFraction UnivariatePolynomial(x,Fraction Intege=
>r)
>------
>
>Why didn't input (8) above actually do the partial fraction expansion?


Dylan,

(1) -> )d op partialFraction

There is one exposed function called partialFraction :
[1] (D1,Factored D1) -> PartialFraction D1 from PartialFraction D1
if D1 has EUCDOM

There are 2 unexposed functions called partialFraction :
[1] (Fraction Polynomial D4,Symbol) -> Any from
PartialFractionPackage D4
if D4 has Join(EuclideanDomain,CharacteristicZero)
[2] (Polynomial D5,Factored Polynomial D5,Symbol) -> Any
from PartialFractionPackage D5
if D5 has Join(EuclideanDomain,CharacteristicZero)

First, I make a couple variables to hold the expressions.
This lets me figure out what the interpreter type is by default:

(1) -> a:=2*x^3

3
(1) 2x
Type: Polynomial Integer
(2) -> b:=1-x^2

2
(2) - x + 1
Type: Polynomial Integer

The signature listed above requires that the first argument type
must be a EuclideanDomain (EUCDOM):

(3) -> Polynomial(Integer) has EUCDOM

(3) false
Type: Boolean
POLY(INT) is not a EUCDOM.
However, the type you provided is a EUCDOM.

(4) -> UP(x,FRAC INT) has EUCDOM

(4) true

Type: Boolean
So we can make variables that are the correct type:

(5) -> aa:UP(x,FRAC INT):=2*x^3

3
(5) 2x
Type: UnivariatePolynomial(x,Fraction Integer)
(6) -> bb:UP(x,FRAC INT):=1-x^2

2
(6) - x + 1
Type: UnivariatePolynomial(x,Fraction Integer)

And the call succeeds:

(7) -> partialFraction(aa,bb)

1 1
(7) - 2x - ----- - -----
x - 1 x + 1
Type: PartialFraction UnivariatePolynomial(x,Fraction Integer)

So partialFraction can create the correct call signature. I suspect the
interpreter created some intermediate type that it couldn't coerce to
the required target type. I agree that it should have been able to
give the factored output but did not.

David Mentré <dmentre>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-03 billpage1 ReproducibilityNone => Every Time
2006-01-03 billpage1 StatusNone => transferred

Back to the top


Powered by Savane 3.3