Question: Correct but strange answer from rsolve

When I use rsolve() to obtain the direct formula for calculating the mean `u` from its recursive definition:

u(n + 1) = u(n) + (x[n + 1] - u(n))/(n + 1)

u(1) = x[1]

and plug it into rsolve() then I receive the output:

rsolve({ u(n + 1) = u(n) + (x[n + 1] - u(n))/(n + 1), u(1) = x[1]}, u(n))

which is correct, but I would like to see it further simplified to:

sum(x[n1], n1 = 1 .. n)/n

Further calls to simplify() don't achieve this. Is there a way to do this, or did I hit some kind of limitation of rsolve() and is this as good as can be expected?

Thanks!

Please Wait...