Here is an simple replacement:
Log[x[k]] /. Log[a_] -> a*xbar
I get the answer in my mind:
xbar x[k]
Similarly, I use another replacement:
Sum[x[k],{k,1,n}]/.Sum[a_,{k,1,n}]->a*xbar
Should the answer be x[k]*xbar ? However, the replacement is disappointing:
I remain puzzled after much pondering. It seems the function Product at it also is deceptive.
What is the particularity of Sum/Product in replacement? Why is that?


Sum[x[k] xbar,{k,1,n}]? – Ulrich Neumann Feb 17 '22 at 14:39