I'm trying to define some delayed values and let mathematica do the simplification for me during the course of computation. Here is a minimal work example:
x[i_] := y[i];
Mx = Table[x[i] + 2, {i, 1, 10}];
My = Table[y[i], {i, 1, 10}];
difference = Mx - My
The output is simply {2, 2, 2, 2, 2, 2, 2, 2, 2, 2}
. What I'm eager to know is if there is a way that I can define the delayed value only for x[i] with 2<=i<=10 (i.e. a selected subset of the indices), so that the final result would be something like {x[1]-y[i]+2, 2, 2, 2, 2, 2, 2, 2, 2, 2}
. That is, every entry of the result is reduced by taking the delayed values but the first one. Thanks!!