Question: Multivariable functions

Hello,

I am having trouble in defining multivariable functions. For instance, when I define the follow code:

assume(n>0)

 f:=(x_1,x_2,...,x_n) -> sum(x[i],i=1..n)

I get the error: Error, invalid operator parameter name.

How can I define this type of function when the number of variables is conditional on "n" ?

Thanks everybody!!

 

 

Please Wait...