Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5465

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

From "Dr. Wolfgang Hintze" <weh@snafu.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to simplify a finite sum plus the next element?
Date 2011-10-07 08:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j6mecj$786$1@smc.vnet.net> (permalink)
References <j6joce$m02$1@smc.vnet.net>

Show all headers | View raw


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@gmail.com> schrieb im Newsbeitrag 
news:j6joce$m02$1@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
> 

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to simplify a finite sum plus the next element? Kirill Müller <kirillmueller@gmail.com> - 2011-10-06 08:20 +0000
  Re: How to simplify a finite sum plus the next element? "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-10-07 08:48 +0000

csiph-web