Ran into a problem with algsubs running a Maple 18 document in Maple 2017. algsubs was preforming differently i.e not working as expected. Took a while to find the cause of the problem. Eventually I had to force expansion of the equation in algsubs. This seems to have corrected the problem. Obviously there is some change in algsubs, expand, simplify or the general handling of equations.
The core of the issue has been copy/pasted here. The basic here was to substitute out higher powers of variables with expansions for them. I have had to keep resubstituting them to grind them out so to speak. That is what the outer loop "for k to 4 do" does. Is there a better approach to this?
Sorry the equations are long.