pf(x/(x^2-1),mainvar(x/(x^2-1))) doesn't work, though similar
df(x/(x^2-1),mainvar(x/(x^2-1))) works.
(motivation behind this is that we use Reduce as CAS in GeoGebra and we want our users to be able to simply write expression in one variable and get partial fractions with respect to this variable)
Workaround:
sub(t=mainvar(x/(x^2-1)),pf(sub(mainvar(x/(x^2-1))=t,x/(x^2-1)),t));
The workaround is good enough, but if someone feels like improving this on Reduce side, it might help.
Rainer Schöpf
2012-07-24
Here is what I see in the latest version:
Reduce (Free PSL version), 24-Jul-2012 ...
1: pf(x/(x^2-1),mainvar(x/(x^2-1))) ;
1 1
{-----------,-----------}
2*(x + 1) 2*(x - 1)
Zbynek Konecny
2012-07-24
Hi, it seems to be dependent on previous input.
In trunk, I evaluated this (row 1) and got correct answer, in row 2 i pressed up arrow and enter, I would expect the same result, but {x/(x^2-1)} appears.
Rainer Schöpf
2012-07-24
Ah, I see now: it works the first time only because the pf operator isn't flagged noval before being autoloaded.
The real problem is that it doesn't properly simplify its second argument.
Correction checked in.
Rainer
Rainer Schöpf
2012-07-24
Rainer Schöpf
2012-09-13