Re: How to simplify a finite sum plus the next element?

*To*: mathgroup at smc.vnet.net*Subject*: [mg121936] Re: How to simplify a finite sum plus the next element?*From*: "Dr. Wolfgang Hintze" <weh at snafu.de>*Date*: Fri, 7 Oct 2011 04:44:09 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <j6joce$m02$1@smc.vnet.net>

No solution, but it is sometimes a good idea to use FullForm in order to see the internal structure of an expression. In our case FullForm[Sum[x[i], {i, 1, n}] + x[n + 1]] Plus[Sum[x[i], List[i, 1, n]], x[Plus[1, n]]] You can play a little with the internal structure like this: s = Sum[x[i], {i, 1, n}] + x[n + 1]; ls = List @@ s {Sum[x[i], {i, 1, n}], x[1 + n]} ls[[1,1]] x[i] ls[[1,2]] {i, 1, n} Sum @@ Append[{ls[[1,1]]}, ls[[1,2]] /. n -> n + 1] Sum[x[i], {i, 1, 1 + n}] Wolfgang "Kirill Müller" <kirillmueller at gmail.com> schrieb im Newsbeitrag news:j6joce$m02$1 at smc.vnet.net... > Hello, > > with Mathematica 8, the following formula does not get simplified as > expected: > > FullSimplify[Sum[x[i], {i, 1, n}] + x[n + 1]] > > I expect Sum[x[i], {i, 1, n+1}] as output. Instead, the following is > output: > > \!\( > \*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]\(x[i]\)\) + > x[1 + n] > > I have already tried various assumptions for FullSimplify -- no luck. > What am I doing wrong here? > > > Cheers > > Kirill >