kill(all);

van=facebook.com/LearningCalculus$

f(x,n):=(x-1)*sum(x^(n-i),i,1,n);

for n: 3 thru 4 do
(
    print("Answer: n=", n, ", ",
    "  F(x,", n,"):=", 
    'integrate(f(x,n),x), " = ",
    integrate(f(x,n),x) )
)$

F(x,n):=(x^n-n*x)/n;

integrate(f(x,a),n);