File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Meaningless Drivel and the fly likes The sum of all positive numbers is.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "The sum of all positive numbers is...." Watch "The sum of all positive numbers is...." New topic
Author

The sum of all positive numbers is....

Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2052
    
  22

-1/12.

Apparently ramanujan proved it but couldn't believe the proof himself. He wrote to Hardy telling him that if he shows him the proof, Hardy would show him to the lunatic asylum.

The simplified proof is as follows ( at least how I understand it)

Let's say we have as sum S1 defined so


S1 = 1 - 1 + 1 - 1 + 1.......

You could say
S1 = 1 - ( 1 - 1 + 1 - 1....)
So,
S1= 1 - S1
S1=1/2, which is kind of screwy to beging with.. But it's mathematically sound.. This is what happens when you start screwing around with infinite divergent series

Now let's take a different series

S2=1-2+3-4+5......

So let's say we add S2 to itself but we screw around with how the addition a bit

S2+S2=1-2+3-4+5....
+1-2+3-4.....

2.S2=1-1+1-1+1....
Why the RHS is same as S1

So,
2.S2=1/2

So S2=1/4

Now.. Let's take the sum of all positive number

S=1+2+3+4+5....

S-S2=1+2+3+4+5.....
-1+2-3+4-5.....
S-1/4= 4+8+12+16.....

S-1/4=4.(1+2+3+4+5......)
the RHS is 4.S

So,
S-1/4=4.S

So S=-1/12

Sum of all positive integers is a negative fraction. Is your mind blown or what?
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3378
    
    9
There are two problems though. 1/2 is only the Cesàro sum of the series. The real sum does not exist, exactly because the series is divergent. The second problem is that you may not simply rearrange terms when you add divergent series.

You only arrive at 2*S2 = 1-1+1-1+1 ... because you're lining up both series, and slightly offsetting one of them. This is valid for convergent series, but not for divergent. Using this method, I can also show that 1-1+1-1+1 ... sums to 6.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18129
    
    8

For the complete summary about why that sum looks valid but isn't quite kosher, see Bad Math from the Bad Astronomer.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

This all started recently with this Numberphile video:



And Phil Plain the Bad Astronomer wrote about it, and later posted a follow-up: Follow-up: The Infinite Series and the Mind-Blowing Result

And Scientific American also wrote about it: Does 1+2+3… Really Equal -1/12?

Conclusion: Calling -1/12 the "sum" of the series 1 + 2 + 3 + ... depends on what you mean by the word "sum".


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3436
    
  47

After reading a refutation of a refutation of an explanation of the original video, I decided not to weigh in with my opinion, except:

Jesper de Jong wrote:Conclusion: Calling -1/12 the "sum" of the series 1 + 2 + 3 + ... depends on what you mean by the word "sum".

Precisely!
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1268

I am maths blind :P


No Kaustubh No Fun, Know Kaustubh Know Fun..
 
permaculture playing cards
 
subject: The sum of all positive numbers is....
 
Similar Threads
How many objects are created ?
How many String Object are created in the following code ??
K&B pg 359: No of string objects?
typecasting problem
List of contiguous numbers