Francois Maltey wrote:

You can use Fraction Polynomial Integer as their common domain.
axiom
a:=x + 1/(y+1)
Type: Fraction Polynomial Integer
axiom
b:=y + 1/(x+1)
Type: Fraction Polynomial Integer

Axiom also has a package called PartialFractionPackage (PFRPAC), but you should package call it.
axiom
c:=partialFraction(a,y)$PFRPAC(INT)
axiom
d:=partialFraction(b,x)$PFRPAC(INT)
The reason for the package call is that Axiom Interpreter will find the wrong partialFraction from the domain PartialFraction (PFR) otherwise, giving a seemingly wrong answer:
axiom
partialFraction(a,y)
Type: PartialFraction
? Fraction Polynomial Integer
This is NOT a bug, but rather a wrong use. The routine partialFraction from PFR expects two arguments: the first is the numerator, and the second the factored denominator! Unfortunately, the function requires the numerator domain to be a EuclideanDomain, and POLY INT does not have this property. So we are forced to use FRAC POLY INT, but there, partial fraction decomposition does not make much sense:
axiom
partialFraction(numerator a, factor denominator a)
Type: PartialFraction
? Fraction Polynomial Integer
Partial fraction can only be done with respect to a single variable at a time, with all other variables considered in a coefficient domain. So in this sense, it is not possible to retain the two expresssions c, d in partial fraction form within the same domain. That is one reason why the target domain where c and d live is ANY.
An alternative way could be (but this coercion is really not a true partial fraction decomposition):
axiom
e:= a:: PFR UP(x, FRAC UP(y, FRAC INT))
axiom
f:= b:: PFR UP(y, FRAC UP(x, FRAC INT))

At present the codomain of partialFraction is ANY, which does not have ORDSET. Even the actual domain PFR UP(y, FRAC POLY INT) of c does not have ORDSET. So it is not possible to form EXPR over these two domains to apply trigonometric functions. Since FRAC POLY INT has ORDSET, it should be possible to modify PFR R to give it ORDSET if R has ORDSET, since mathematically speaking, PFR R is the same as FRAC R. However, even after modifying pfr.spad to make it into ORDSET if R has ORDSET, the interpreter would not allow computations in EXPR PFR R when R is UP(y, FRAC POLY INT). My guess is it would be quite difficult to add trigonometric functions to PFR R in general.

You can try something like this:
axiom
)clear all
All user variables and function definitions have been cleared.
fraction:=FRAC POLY INT
Type: Domain
axiom
dom:=UP(y,fraction)
Type: Domain
axiom
bdom:=PFR dom
Type: Domain
axiom
a:=x + 1/(y+1)
Type: Fraction Polynomial Integer
axiom
b:=partialFraction(a,y)$PFRPAC(INT)
axiom
c:=b::bdom
axiom
cw:=(wholePart c)::EXPR INT
Type: Expression Integer
axiom
m:=numberOfFractionalTerms(c)
axiom
crList:= [nthFractionalTerm(c,i) for i in 1..m]
axiom
cc:=reduce(+,crList)
axiom
ccx:=cc::(FRAC dom)::(EXPR INT)
Type: Expression Integer
axiom
sin(cw)*cos(ccx)+sin(ccx)*cos(cw)
Type: Expression Integer
I would like to add that attempting to create a sin function with source bdom was not successful. The call ends up with an error message:
>> Error detected within library code:
reducing over an empty list needs the 3 argument form
axiom
sin(f:bdom):EXPR INT ==
fw:=(wholePart f)::EXPR INT
n:=numberOfFractionalTerms(f)
frList:= [nthFractionalTerm(f,i) for i in 1..n]
ff:=reduce(+,frList)
ffx:=ff::(FRAC dom)::(EXPR INT)
sin(fw)*cos(ffx)+sin(ffx)*cos(fw)
Function declaration sin : PartialFraction UnivariatePolynomial(y,
Fraction Polynomial Integer) -> Expression Integer has been added
to workspace.
Type: Void
axiom
sin(c)
axiom
Compiling function sin with type PartialFraction
UnivariatePolynomial(y,Fraction Polynomial Integer) -> Expression
Integer
>> Error detected within library code:
reducing over an empty list needs the 3 argument form
William