View Full Version : Cute math problem
pgwenthold
23rd August 2005, 12:43 PM
NOTE: This is NOT from a homework assignment
Evaluate the product
PI(n=2 to infinity) of (n^3 - 1)/(n^3 + 1)
I know the answer, and I have figured out why. Can you figure it out?
Alkatran
23rd August 2005, 02:43 PM
I've never worked with products like this before. But I brute forced it with code and know what it appears to be converging to.
chulbert
23rd August 2005, 02:44 PM
What does PI mean?
pgwenthold
23rd August 2005, 02:49 PM
Originally posted by Alkatran
I've never worked with products like this before. But I brute forced it with code and know what it appears to be converging to.
That's how I started, so I knew the answer. But now can you come up with the solution as to why?
I got that one, eventually, too.
I like the problem because the answer is a fairly unusual but still rational number. Not what you would necessarily pick in a multiple choice exam.
chulbert: PI means "the product of the series"
Kind of like how a capital sigma is a series summation
LostAngeles
23rd August 2005, 05:37 PM
Well, considering we only did summations when I last left off in Calculus...
I do note that the sequence ((]n[/i]<sup>3</sup>-1)/(n<sup>3</sup>+1)) converges to 1 and that the product will be less than 1 also. It has to be a rational number because of how it's setup.
And that's what I can tell you by looking at it. I'd rather go home and crack my book to double check my methods before I do it.
Alkatran
23rd August 2005, 05:38 PM
I can't seem to solve it. I did manage the much simpler (x-1)/(x+1) ...
CurtC
23rd August 2005, 10:02 PM
Originally posted by LostAngeles
It has to be a rational number because of how it's setup.
I don't see this. Each term of the series is rational, but the limit of the product as the number of terms increases without bound? If that's your argument, and I'm not sure if I understand your statement, you could use that to prove that pi (the number) is rational because it's the sum of an infinite series of rational numbers (4 - 4/3 + 4/5 - 4/7 + 4/9...).
Dilb
23rd August 2005, 11:08 PM
Seems like a fairly easy problem, assuming you know how infinite series can be manipulated.
Warning: Solution
PI(n=2 to infinity) of (n^3 - 1)/(n^3 + 1)
=PI(n=2 to infinity) of (n-1)(n^2 +n +1) / (n+1)(n^2 -n +1)
= (n-1)(n)(n+1)(n+2)... / (n+1)(n+2)... * (n^2 +n +1)(n^2 +3n +3)... / (n^2 - n +1)(n^2 +n +1)(n^2 +3n +3) .... |n=2
= (n-1)(n) / (n^2 -n +1) |n=2
= 2/3
3rd line might be a bit hard to read.
mumblethrax
23rd August 2005, 11:16 PM
Edit: Dilb beat me to it.
Jorghnassen
23rd August 2005, 11:35 PM
Yeah, I hate those factoring tricks.
/only likes tricks that involve traces of matrices
Alkatran
24th August 2005, 07:11 AM
That solution is nearly impossible to read. Too bad this forum doesn't use latex.
pgwenthold
24th August 2005, 07:30 AM
Originally posted by Dilb
Seems like a fairly easy problem, assuming you know how infinite series can be manipulated.
That's one thing, the other is that you have to remember how to factor cubes - i.e. high school algebra.
It ends up being pretty easy at that point, mainly because there is no calculus or anything needed.
But it's still cute.
Dilb
24th August 2005, 12:52 PM
Originally posted by pgwenthold
That's one thing, the other is that you have to remember how to factor cubes - i.e. high school algebra.
It ends up being pretty easy at that point, mainly because there is no calculus or anything needed.
But it's still cute.
I actually looked up how to factor cubes (in my calculus textbook:D), since I couldn't be bothered to try and figure it out on paper. The fact that I worked it out once at some point in the past is enough for me.
Jorghnassen
24th August 2005, 12:58 PM
Factoring out cubes? If there's no obvious root (that's really the only trick), don't bother.
Alkatran
24th August 2005, 03:07 PM
Originally posted by Jorghnassen
Factoring out cubes? If there's no obvious root (that's really the only trick), don't bother.
There's a general equation for cubic polynomial roots.
Jorghnassen
24th August 2005, 03:45 PM
Originally posted by Alkatran
There's a general equation for cubic polynomial roots.
I know. I've seen it and still have it somewhere. But it's nasty. As I said, if you can't see one root by inspection, there's no point in trying to factor it (unless you have software like Maple).
pgwenthold
24th August 2005, 04:26 PM
Originally posted by Jorghnassen
I know. I've seen it and still have it somewhere. But it's nasty. As I said, if you can't see one root by inspection, there's no point in trying to factor it (unless you have software like Maple).
The equations in the problem I provided do have obvious roots (well, at least one obvious root). As I said, it's high school algebra. Easily factored.
My calc prof was a big fan of these types of cubic equations when it came to limits. It was always things like
"The limit of (n^3 - 8)/(n^2-4) as n approaches 2"
(the answer is 3 - unlike many trivial limits, you can't just stick in n = 2 and find the answer)
LostAngeles
24th August 2005, 04:41 PM
Originally posted by CurtC
I don't see this. Each term of the series is rational, but the limit of the product as the number of terms increases without bound? If that's your argument, and I'm not sure if I understand your statement, you could use that to prove that pi (the number) is rational because it's the sum of an infinite series of rational numbers (4 - 4/3 + 4/5 - 4/7 + 4/9...).
Not quite.
There are thousands of formulas, some simple, some very sophisticated,
that can be used. The simplest of these, which can be derived using
elementary calculus, comes from the series for the arctan function,
namely
arctan(x) = x - x^3/3 + x^5/5 - x^7/7 +-...
from which (by letting x = 1) you get
pi/4 = 1 - 1/3 + 1/5 - 1/7 +...
Unfortunately, this series is useless for computing pi with any degree
of accuracy. You would need billions of terms just to get your 20
decimal places. But similar formulas involving the arctan can also be
derived which converge much more rapidly. The best known of these is
called Machin's formula, which says
pi/4 = 4 * arctan(1/5) - arctan(1/239)
If you use the series above for these arctans, you can get quite good
approximations to pi fairly easily.
http://mathforum.org/library/drmath/view/53905.html
You can approximate pi that way, but pi is not equal to that.
The above series should be rational because an integer multiplied by an integer will always give an integer, therefore you would always have an integer in the nuemerator and the denominator.
Dilb
24th August 2005, 11:55 PM
Originally posted by LostAngeles
You can approximate pi that way, but pi is not equal to that.
But it is equal to that. The infinite series expansion is precisely equal to arctan(x), and arctan(1) precisely equals Pi/4. Just because it's a horrible way to numerically approximate Pi doesn't mean it isn't equal to it.
CurtC
25th August 2005, 10:41 AM
Originally posted by LostAngeles
[B]Unfortunately, this series is useless for computing pi with any degree of accuracy.
You can approximate pi that way, but pi is not equal to that.
I disagree.
First, the series ( 4 - 4/3 + 4/5 - 4/7 ... ) is exactly equal to pi. Not approximately, exactly. Kind of like how 0.9999... is exactly equal to one.
Second, I have used that series to approximate pi to many decimal places, in a very reasonable time. About 20 years ago, I challenged a friend with a (for then) high-powered computer to calculate pi using this formula, but I had to use the macro programming on my HP 41C. My method converged to all ten displayed digits on the 41C in less than 60 seconds. There was a little trick to it, though. His computer program ran for the weekend and had six or seven digits, and ten would have taken years.
The trick was that I noticed that when watching the series try to converge, it would soon bounce up and down above and below the true value, by about the same amount. So I averaged the last two answers and displayed that instead. That number was *much* closer to pi, but still bounced above and below with each new term. So I averaged the last two averages, and that was even closer. Eventually, I had a ten-level deep nested average going on with each new term of the series that I added, and that would converge to ten digits of pi after only about 20 series terms. Using the same technique, I can have Excel give me 15 digits in the blink of an eye. I'd try more digits, but Excel seems to be limited to 15.
So, you can use that formula to calculate pi quickly.
phildonnia
25th August 2005, 11:09 AM
Originally posted by Alkatran
I can't seem to solve it. I did manage the much simpler (x-1)/(x+1) ...
Interestingly, (x-1)/(x+1) is a factor of (n^3-1)/(n^3+1). I can't seem to get much further than that though.
pgwenthold
25th August 2005, 01:12 PM
Originally posted by phildonnia
Interestingly, (x-1)/(x+1) is a factor of (n^3-1)/(n^3+1). I can't seem to get much further than that though.
HINT: what's the other factor?
Second: keep in mind that an infiinte series is, well, infinite.
69dodge
25th August 2005, 01:56 PM
Originally posted by LostAngeles
The above series should be rational because an integer multiplied by an integer will always give an integer, therefore you would always have an integer in the nuemerator and the denominator.The numerator and denominator will "always" be integers, in the sense of "for every finite number of factors, no matter how many". But the question was about the product of infinitely many factors. The product of infinitely many factors is defined as a limit, namely the limit of the product of finitely many factors, as the number of factors increases without bound. In other words, consider the first factor, then the product of the first two factors, then the product of the first three factors, etc. And then find the limit of that infinitely long sequence of products. The limit of a sequence of numbers can be irrational even if each number in the sequence is rational. For example, consider the sequence 3, 3.1, 3.14, 3.142, 3.1416, 3.14159, 3.141593, ..., which consists of pi rounded off to more and more decimal places. Each number in the sequence is rational, but the limit of the sequence is the irrational number pi.
In fact, one way to construct irrational numbers is, roughly, by defining them as the limits of (certain) sequences of rational numbers. Try Googling for "Cauchy sequence".
LostAngeles
25th August 2005, 03:27 PM
Backing up here.
For all a,b in Z
Let a * b = c
Assume c not in Z
a * b = c
a = (c/b)
Let c be a non-integer, irreducible, rational number, p/q.
a = (p/q * b) (I want to make a jump here that I'm not entirely sure is valid.)
Let c be irrational
a = (c/b)
(c/b) not in the set of rationals, therefore a can not be an integer.
But going back to where I wanted to make a jump, let me use that part to clarify my point. By definition, a rational number has an integer in the numerator and the denominator, therefore,
(q * b) * a = p = q * b * a
and associativity makes multiplying any number of integers the same as multiplying two.
The original problem was (PI) and not (SIGMA). Just because pi can be approximated using a summation does not disprove that an integer multiplied by an integer equals an integer.
The exact equation for pi from everything I'm finding is Machin's:
pi/4 = 4arctan(1/5)-arctan(1/239)
Which by the MacLaurin series is absolutely hideous, but it can be done. What you're using, Curt, is the MacLaurin series for the arctan x, where x = 1. It's an alternating series so yes, it does bounce back and forth around the actual value and will converge to it.
The seqeuence {3, 3.1, 3.14, 3.142...} is a sequence and not a series. There's a difference. A sequence is an ordered set, were a series is an ordered set that gets combined.
A Cauchy sequence inolves the distance forumla, which involves square roots, so of course you can use rationals and get an irrational.
And for the record, I (rule 8) hate series almost as much as I hate transcendentals.
Dilb
27th August 2005, 03:38 PM
Originally posted by CurtC
The trick was that I noticed that when watching the series try to converge, it would soon bounce up and down above and below the true value, by about the same amount. So I averaged the last two answers and displayed that instead. That number was *much* closer to pi, but still bounced above and below with each new term. So I averaged the last two averages, and that was even closer. Eventually, I had a ten-level deep nested average going on with each new term of the series that I added, and that would converge to ten digits of pi after only about 20 series terms. Using the same technique, I can have Excel give me 15 digits in the blink of an eye. I'd try more digits, but Excel seems to be limited to 15.
So, you can use that formula to calculate pi quickly.
Could you explain this in more detail? I'm trying to recreate this but I keep either getting a sequence which is either obviously wrong, or converges very slowly.
69dodge
27th August 2005, 03:55 PM
Originally posted by LostAngeles
[...] and associativity makes multiplying any number of integers the same as multiplying two.Any finite number of integers.
What's the product of, e.g., infinitely many 2s? Whatever it is, it's not an integer. What integer could it be, after all? Any integer you might think of would be too small.The original problem was (PI) and not (SIGMA). Just because pi can be approximated using a summation does not disprove that an integer multiplied by an integer equals an integer.An integer multiplied by an integer is definitely an integer. And similarly, the product of two rational numbers is rational. But we're dealing here with the product of infinitely many fractions, not just two.
You're right that the example was not entirely analogous. But it does happen to be true that infinite products and infinite sums work the same way in this respect. The product of infinitely many rationals is not necessarily rational, just as the sum of infinitely many rationals is not necessarily rational.The sequence {3, 3.1, 3.14, 3.142...} is a sequence and not a series. There's a difference. A sequence is an ordered set, were a series is an ordered set that gets combined.Yes, but it's easy to turn one into the other: just form the ratios of successive pairs of terms. Specifically, consider the infinite product (3) (3.1 / 3) (3.14 / 3.1) (3.142 / 3.14) (3.1416 / 3.142) ... . For any n, the product of the first n factors is equal to the nth term of the previous sequence, because everything else cancels out. So the value of the infinite product is the same as the limit of the sequence, namely pi, although it is the product of rational numbers. But it is the product of infinitely many rational numbers, so there's no contradiction with the fact that multiplying two rationals gives a rational product.
Dilb
27th August 2005, 03:58 PM
Originally posted by LostAngeles
The exact equation for pi from everything I'm finding is Machin's:
pi/4 = 4arctan(1/5)-arctan(1/239)
That's a better method of numerically calculating it, but arctan(1)*4 is still exactly equal to pi.
Originally posted by LostAngeles
The seqeuence {3, 3.1, 3.14, 3.142...} is a sequence and not a series. There's a difference. A sequence is an ordered set, were a series is an ordered set that gets combined.
How about the series of {3, 0.1 , 0.04, 0.001 ...}? Infinite series can have all rational terms but converge to irrational numbers.
Furthermore, wikipedia (http://en.wikipedia.org/wiki/Infinite_product), god bless it, has an example of how to define pi by an infinite series, each term of which is clearly rational. It evidently is not enough to say that an infinite product converges to a rational just because every finite product is rational.
LostAngeles
27th August 2005, 11:22 PM
Well if the forum hadn't gone down, I'd have been able to add that a and b were non-zero.
LostAngeles
27th August 2005, 11:34 PM
'Kay, now that I made the post I needed to make and was making before we went down.
An infinte sum or product goes to infinty. (which is not a number. which ruins many "infinity +..." arguements.) When you have infinity over infinity, generally it comes down to which is getting bigger faster.
So is there an actual reason why it's rational before you play with it?
metacristi
29th August 2005, 03:30 AM
Originally posted by pgwenthold
NOTE: This is NOT from a homework assignment
Evaluate the product
PI(n=2 to infinity) of (n^3 - 1)/(n^3 + 1)
I know the answer, and I have figured out why. Can you figure it out?
It can be applied the old method of cancelling equal terms (having opposite sign) after some easy transformations. If S is the product to find and S[n] is the product of the first 'n' terms then by taking the natural logarithm from S[n] --->
ln S[n]=ln [∏ <sub>k=2 to n</sub> (k^3 - 1)/(k^3 + 1)]
ln S[n]= ∑ <sub>k=2 to n</sub> ln(k-1)-ln(k+1)+ln(k<sup>2</sup>+k+1)-ln(k<sup>2</sup>-k+1)
k=2 ---> S2= 0-ln3+ln7-ln3
k=3 ---> S3=ln2-ln4+ln13-ln7
k=4 ---> S4=ln3-ln5+ln21-ln13
k=5 ---> S5=ln4-ln6+ln31-ln21
................................................
k=n-2 ---> Sn-2=ln(n-3)-ln(n-1)+ln(n<sup>2</sup>-3n+3)-ln(n<sup>2</sup>-5n+7)
k=n-1 ---> Sn-1=ln(n-2)-ln(n)+ln(n<sup>2</sup>-n+1)-ln(n<sup>2</sup>-3n+3)
k=n ---> Sn=ln(n-1)-ln(n+1)+ln(n<sup>2</sup>+n+1)-ln(n<sup>2</sup>-n+1)
-----------------------------------------------------------------------------
ln S[n]= S2+S3+...........+Sn-1+Sn
Simplifying equal factors --->
ln S[n]=0+ln2-ln(n)-ln(n+1)+ln(n<sup>2</sup>+n+1)-ln3
Finally ln S[n]=ln [(2/3)*(n<sup>2</sup>+n+1)/n(n+1)]
S[n] = (2/3)*(n<sup>2</sup>+n+1)/[n(n+1)]
S= lim<sub>n --> ∞</sub> S[n] = 2/3
pauldmin
29th August 2005, 06:35 AM
Originally posted by CurtC
The trick was that I noticed that when watching the series try to converge, it would soon bounce up and down above and below the true value, by about the same amount. So I averaged the last two answers and displayed that instead. That number was *much* closer to pi, but still bounced above and below with each new term. So I averaged the last two averages, and that was even closer. [/B]
Please note that this method of averaging may not be applicable in all numeric methods.
When calculating eigenvalues, it can happen that the system converges onto one value then suddenly jumps to another value before converging properly.
In the pi case, I think the approximation was justified. Have a look at the Taylor Series expansions. I think there is a fairly good method of estimating accuracy of result at each stage of the iteration.
phildonnia
29th August 2005, 05:06 PM
Originally posted by pgwenthold
HINT: what's the other factor?
Second: keep in mind that an infiinte series is, well, infinite.
Ok, I think I got it now.
(k^3-1)/(k^3+1) is (k-1)/(k+1) times (k^2+k+1)/(k^2-k+1).
If you multiply out all the (k-1)/(k+1), every denominator cancels with the numerator two terms later. Only a 1 and a 2 are left unpaired in the numerator.
If you multiply out all the (k^2+k+1)/(k^2-k+1), every numerator cancels with a denominator of the next term. This leaves a lone 3 in the denominator.
© 2001-2009, James Randi Educational Foundation. All Rights Reserved.
vBulletin® v3.7.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.