Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5412 > unrolled thread
| Started by | Kirill Müller <kirillmueller@gmail.com> |
|---|---|
| First post | 2011-10-06 08:20 +0000 |
| Last post | 2011-10-07 08:48 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
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
| From | Kirill Müller <kirillmueller@gmail.com> |
|---|---|
| Date | 2011-10-06 08:20 +0000 |
| Subject | How to simplify a finite sum plus the next element? |
| Message-ID | <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
[toc] | [next] | [standalone]
| From | "Dr. Wolfgang Hintze" <weh@snafu.de> |
|---|---|
| Date | 2011-10-07 08:48 +0000 |
| Message-ID | <j6mecj$786$1@smc.vnet.net> |
| In reply to | #5412 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web