Message Boards Message Boards

0
|
2877 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Potential Bug In Summation Formula

Posted 9 years ago

I've been trying for a long time to essentially write this formula (which I know is weird - substance only minimally matters here):

Sum[(x - Sum[x,{x,1,9}]/9), {x,1,9}] The divided by nine is for some reason corrupting the formula. I've also tried * 1/9 and switched the order ... nothing works.

The annoying thing is when I use the "build a function" offering from Wolfram Alpha (input fields prompt me for the equation, lower and upper limits), I enter: x - Sum[x, {x,1,9}] * 1/9 and set the lower limit to 1 and upper limit to 9 ... and it works (but I need to do a bit more than just evaluate it - I know there are some ways I can cheat this and get the same result, but I'm going for the exact image).

POSTED BY: Daniel Folsom
3 Replies
In[4]:= Sum[(x - Sum[x, {x, 1, 9}]/9), {x, 1, 9}]

Out[4]= 0

sometimes nonprinting characters can mess up an input. that may be your problem

POSTED BY: Frank Kampas

So I can understand, what is wrong?

Do you believe that Mathematica gives the wrong result when evaluating:

Sum[(x - Sum[x, {x, 1, 9}]/9), {x, 1, 9}]

If so, what result do you expect from it? This will help clarify what you expect.

As a general rule, you should not nest Sums inside each other when they have the same independant variable. You should change the independant variable so that it reads:

Sum[(x - Sum[i, {i, 1, 9}]/9), {x, 1, 9}]

If this isn't the forumula you are looking for, then please write out (maybe with TeX or something) what summation you want to put into Mathematica. Mathematica is evaluating your code correctly.

POSTED BY: Sean Clarke
Posted 9 years ago

When I type that into Wolfram, it returns an error. "Wolfram|Alpha doesn't understand your query". If I remove the /9, it returns the result successfully. I'm eventually trying to show that this equation is not the same as another equation (and using the visual produced).

BUT If I type the first equation (including the /9) into the auto-generator for sums (function to sum, lower limit, upper limit), the correct result is returned. The problem is I can't compare this to another equation, only view it.

Thanks for the quick reply!

Update: Sum[(x -Sum[x/9,{x,1,9}])^2, {x,1,9}] ended up working for me, but if anyone knows why I couldn't put the 1/9 outside the sum I'd love to know! Thanks

POSTED BY: Daniel Folsom
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract