> Is there a part function that can map a function on to the
> selected part? For example: given (z+2)/(z+1)^2
> u:expand(part(d1,2))
> substpart(u,d1,2)
'piece' is set to the selected part in all the part functions, and the
first arg of substpart is evaluated *after* the piece has been set, so
this works:
substpart(expand(piece),d1,2)
Piece is documented under substinpart and piece, but not in substpart.
In fact, there are examples for substpart under substinpart, so it looks
as though the doc was messed up when it was reorganized at some point.
-s
Example:
(C1) ex:x^3-a-1;
3
(D1) x - a - 1
(C2) substpart(factor(piece),ex,[1,3]);
2
(D2) (x - 1) (x + x + 1) - a