Problem with expand in lagrange interpolation



It looks like lagrange routine, for what it is worth, is doing the
calculation in a very bad way, not keeping track of common subexpressions.
Expand should not be necessary if it is done right.
RJF