The csgn(p) that you got is a result of simplify. It could be avoided (for example, by assume= nonnegative as shown by Ronan), but here's another way. The procedure FractionalExponentAdjuster, below, takes 3 arguments
- P: a pseudo-polynomial, or a set, list, or other structure containing pseudo-polynomials, to be modified;
- x: the main variable of the pseudo-polynomials;
- X: the replacement for x in the returned true polynomials.
It returns two things:
- A modified structure of the same type as P except that the exponents of x have been integerized and x has been replaced with X;
- A procedure that reverts polynomials in X to pseudo-polynomials in x.
FractionalExponentAdjuster:= proc(P, x::name, X::name)
local d:= ilcm((denom@op)~(2, indets(P, identical(x)^rational)));
subs(x= X^d, subsindets(P, identical(x)^rational, p-> X^(d*op(2,p)))),
P-> subs(X= x^(1/d), subsindets(P, identical(X)^posint, p-> x^(op(2,p)/d)))
#Applying this to your example:
(new,res):= FractionalExponentAdjuster([NSR, deltaa], q, Q);
qu:= quo(new, Q, 'r');
#Test. Should get 0 if it's correct:
expand(qr*deltaa + qr - NSR);