On 01/25/2012 12:40 PM, Barton Willis wrote:
> Maybe this is a sum noun / verb thing?
>
> My favorite way to do such transformations is to substitute a lambda form
> for the function (notice the nounify('sum)).
>
> (%i156) change_sum_limits(e,lo,hi) := subst(nounify('sum) =
> lambda([q,k,a,b], sum(q,k,lo,hi)),e)$
>
> (%i157) change_sum_limits(42 + sum(f(k),k,a,b),i-1,i+1);
> (%o157) f(i+1)+f(i)+f(i-1)+42
>
> --Barton
yes, this is the solution I recently came upon myself. Actually I named
the function I was using, but a lambda form would make sense too.