I have three lists. As an example,
a = {10, 5, 6, 8, 7};
b = {4, 8, 9, 7, 9};
c = {7, 5, 12, 4, 1};
I want to get:
$$ x(i)=\sum _{i=0}^i\frac{1}{2}\left(a_ib_i+a_{i+1}b_{i+1}\right)\left(c_{i+1}-c_i\right) $$ $i$ goes from $1$ to $4$, i.e. I want to get: $x(1)$,$x(2)$,$x(3)$ and $x(4)$.
So, I used the following code:
x=Sum[1/2*(a[[i]]*b[[i]] + a[[i + 1]]*b[[i + 1]])*(c[[i + 1]] -
c[[i]]), {i, 1, 4}]
For[i = 0, i < 4, x, Print[x]]
But, I didn't get expected output. Could anyone please tell me how to do this?