I have defined this function to results some list of functions, however its not returning what I want
d = 3;
xs = Array[Subscript[x, #] &, d];
newF[xs_List] := (Sum[((i)*(#[[i]])^2), {i, 2, d}] - Exp[#[[1]]]) & /@ Partition[xs, d, 1, {1, 1}];
newF[xs]
It results in $\{-e^{x_1}+2 x_2^2+3 x_3^2,-e^{x_2}+ 3 x_1^2+2 x_3^2,-e^{x_3}+2 x_1^2+3 x_2^2\}$
What I want is $\{-e^{x_1}+2 x_2^2+3 x_3^2,-e^{x_2}+x_1^2+3 x_3^2,-e^{x_3}+x_1^2+2 x_2^2\}$
Basically I want is $-e^{x_k}+\sum_{n\neq k}n\cdot x_n^2$
Further I should be able to evaluate it at an array like $(1,1,1)$ or $(1,2,3)$
Table[-Exp[x[k]] + Sum[n x[n]^2 , {n, Delete[Range[d], k]}], {k, d}]. – march Nov 21 '23 at 21:12d). You also hard-coded your formal variable tox, which is somewhat bad style for subtle reasons. Also, usingSubscriptseems attractive, but it's also not really the best style in the long run. So, Domen re-conceived of your function to be one that required as arguments only the scale and the name of the formal variable. Which means (if I'm understanding your question) you don't evaluate at (1,1,1) at all. – lericr Nov 22 '23 at 04:55