Can some one please explain why the first version of this program gets the error: Set::write: Tag Times in mst Null is Protected. >> Twice, but the second version works fine?
f[x_] = x^2;
s = x /. Solve[x^2 == x, x]
For[i = 1, i <= Length[s], i++,
lst = NestList[f, s[[i]] - 0.05, 10];
Print[lst]
mst = NestList[f, s[[i]] + 0.05, 10];
Print[mst]
]
f[x_] = x^2;
s = x /. Solve[x^2 == x, x]
For[i = 1, i <= Length[s], i++,
lst = NestList[f, s[[i]] - 0.05, 10];
mst = NestList[f, s[[i]] + 0.05, 10];
Print[lst]
Print[mst]
]