In matlab, I implemented the sum of series (x^k) / (2*k) when k is from 1 to 6, as following:
syms x;
syms k real;
symsum(x^k/(2*k), k, 1, 6)
The above sum has only one symbolic variable (x). Now I want to implement the following sum in Matlab (alpha and n are constant). As you can see, depending on the value of n, we will have different number of symbolic variables. For example, if n=2 then we have 2 symbolic variables x1 and x2. If n=4 then we have 4 symbolic variables x1,x2,x3 and x4. How can I implement this in Matlab?