Proof that sum of all positive integers is -1/12

조회 수: 22 (최근 30일)
Jayesh Kamboj
Jayesh Kamboj 2020년 3월 25일
댓글: Paul 2024년 3월 12일
Hi there,
I'm trying to use MATLAB to prove that the sum of all positive integers to infinity is -1/12 (sry but I don't know how to write in LaTeX). I've tried using a for loop as well as integrating, but the values I've attained from those methods just get larger and larger. I tried using Inf in my for loop but that led to the for loop iterating forever.
Here's what I have so far:
a = [];
for i = 1:10000
if i ~= 10000
a = [a, (i*(i+1))/2];
else
a = [a, (i*10000 + 1)/2];
end
end
%disp(a)
plot(1:10000, a);
syms x
X = sum(a)
Y = -1*4*(10^-26)*x^5 - 1.6*(10^-22)*x^4 + 5*(10^-19)*x^3 + 0.5*x^2 + 0.5*x - 3*10^-11; %This I got from using Basic Fitting tool on MATLAB
Z = int(Y,1,1000) %Integration
How can I prove the proof using simple methods?
Thanks
  댓글 수: 3
Jayesh Kamboj
Jayesh Kamboj 2020년 3월 25일
Intuition tells us that it should be infinity, but if you look at Ramanujan Sum (https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF) then it says that the sum should be equal to -1/12.

댓글을 달려면 로그인하십시오.

채택된 답변

James Tursa
James Tursa 2020년 3월 25일
편집: James Tursa 2020년 3월 27일
This has nothing to do with MATLAB and numerical sums. You can pretty much get any answer you want by manipulating divergent series on paper, and manipulating divergent series doesn't prove anything ... and certainly is not going to match any numerical summing method you might do with MATLAB.
From the website:
c = 1 + 2 + 3 + 4 + 5 + 6 + ... is a divergent series (inf)
4c = 4 + 8 + 12 + ... is another divergent series (inf)
(c-4c) = 1 - 2 + 3 - 4 + 5 - 6 + ... is yet another divergent series (inf-inf on lhs)
The very first step is actually a violation of mathematical equality ... stating that the sum of a divergent series is equal to something. However, we can play the game for the first two steps. But for that last series, stating it is equal to c-4c is complete BS from a mathematical standpoint. You cannot manipulate divergent series this way and maintain equality in a mathematical sense. Similar manipulation can be done to get completely different results. And then "assigning" it a value of 1/(1+1)^2 by plugging in a value outside the domain of a convergent series for 1/(1+x)^2 because it looks similar is another bogus mathematical step.
This whole exercise is fun to play with, but does not have anything to do with mathematical equality.
EDIT
Here is my solution for that series sum.
Start with c and 2c and subtract them:
c = 1 + 2 + 3 + 4 + 5 + 6 + 7 + ...
-( 2c = 2 + 4 + 6 + ...)
c-2c = 1 + 3 + 5 + 7 + ...
So we get the result:
-c = 1 + 3 + 5 + 7 + ...
Multiply -c by 4 and rewrite it to get:
-4c = 4 + 12 + 20 + 28 + ...
-4c = 2 + 2 + 6 + 6 + 10 + 10 + 14 + 14 + ...
Now take that result and subtract our –c result:
-4c = 2 + 2 + 6 + 6 + 10 + 10 + 14 + 14 + ...
-( -c = 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + ...)
-4c+c = 1 – 1 + 1 – 1 + 1 - 1 + 1 - 1 + ...
So clearly
-3c = 1 – 1 + 1 – 1 + 1 - 1 + 1 - 1 + ...
But we also have this series expansion
1/(1-x) = 1 + x + x^2 + x^3 + x^4 + ...
Plugging in x = -1 we get:
1/(1-(-1)) = 1 – 1 + 1 – 1 + 1 – 1 + ...
Combining the two results gives us the obvious answer:
-3c = 1/(1 – (-1))
-3c = 1/2
c = -1/6
So, I have proven that the -1/12 answer is clearly off by a factor of 1/2, right?
No, not really. Again, this is a fun exercise in manipulating divergent series, but I haven't followed the strict rules of mathematical equality.
  댓글 수: 6
David Goodmanson
David Goodmanson 2024년 3월 12일
Hi Paul, it was interesting. At this point I hope that no one is contending that sym-vpa is anything other than wrong, when it sums 1/n or 1/sqrt(n) and comes up with a finite result.
Paul
Paul 2024년 3월 12일
I think your insights would be helpful over in that linked thread.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by