Finally a math video where I had the good idea. Looking at the powers I told myself that this product produce exactly one occurrence of each power because choosing the 1 or the power of X is literally the same as choosing a 0 or a 1 for the binary representation of the exponent.
For the lemma, note that (1-x)( partial product up to N) = (1 - x^(2^(N+1)). This is easy to prove by induction using the difference of two squares formula. So limit (1-x)(partial product) = 1.
Does this actually provide a usable approximation to calculate ln(a)/ln(b) = log_b(a)? Edit: I tested it and it seems to give results accurate to 15 digits for the partial product over [-50 ≤ n ≤ 50] using 64-bit floating point arithmetic.
i did some thinking. First of all, the positive part of the product doesn't really help us, it just limits us to |a|,|b| < 1, we're better off taking n from -∞ to -1 and dealing multiplying by a factor of (1-a)/(1-b). Now, taking n from -N to -1 gives us the expression (a^2^-N - 1)/(b^2^-N - 1). Consider (a^u - 1)/(b^u - 1). If we take u to be small, we can do a little Taylor series (a^u - 1)/(b^u - 1) ≈ ln(a)/ln(b) + ½u ln(a)[ln(a)/ln(b) - 1] + O(u²) The error is linear in u. If u = 2^-N, the error falls off pretty quickly. btw, I thought, if we want to compute ln(a)/ln(b), we might as well skip the product and just compute (a^u-1)/(b^u-1) for some small u. The issue then is numerical stability, computing an expression that is like 0.0000(...)/0.0000(...) The product formula doesn't have this issue because we're computing terms like 2.000(...)/2.000(...). But that's not the real problem. The biggest issue is that to compute x^2^-n means we're taking iterative square roots at each step, which isn't cheap! In conclusion: don't.
Otherwise the product diverges (unless b=a which is trivially equal to 1) since it uses (1-b^2^n)/(1-a^2^n) which is equivalent to (b/a)^2^n when n is large.
@@pedroalonso7606 it's also really easy to make it work with values for a and b greater than 1. Simply replace a with 1/a and/or b with 1/b and multiply a factor of -1 on top of the result for each inverse you take.
It's a "telescopic" product: multiply the product by 1-x, you get (1-x)(1+x)=1-x^2, then (1-x^2)(1+x^2)=1-x^4, etc.. Otherwise it's more correct to write the intervals (-1,1) as ]-1,1[.
@@themathhatter5290 Writing reversed square brackets instead of the round parentheses for open intervals is common practice in all German schools I know about. Strangely, in German universities, the round parentheses are used instead.
It is less confusing, at least for me, because the notation (a,b) is usually reserved for a set of coordinates or objects. And when people write for example (a,b] it is quite awkward.. For real numbers it is easy to see that ]a,b] is an interval with a excluded and b included. And for what you call integers (positive or negative) it is common to write with a different notation |[ or ]| but with the same meaning
Day 1 of waiting for another backflip transition
Day 1? Wait, was there one yesterday?
@@xinpingdonohoe3978 no
@@xinpingdonohoe3978 Maybe he just started waiting today (yesterday actually).
@@xinpingdonohoe3978Could've just started waiting.
really great video, I love problems like this and the way your explaining it
I’d have written it as log base b of a at the end, for aesthetics.
Finally a math video where I had the good idea. Looking at the powers I told myself that this product produce exactly one occurrence of each power because choosing the 1 or the power of X is literally the same as choosing a 0 or a 1 for the binary representation of the exponent.
The formula in the thumbnail is not the same as the one in the problem (minus signs where there should be plus signs).
For the lemma, note that (1-x)( partial product up to N) = (1 - x^(2^(N+1)). This is easy to prove by induction using the difference of two squares formula. So limit (1-x)(partial product) = 1.
13:59
For me the video is exactly 14 minutes long so at least you gave him a second.
Does this actually provide a usable approximation to calculate ln(a)/ln(b) = log_b(a)?
Edit: I tested it and it seems to give results accurate to 15 digits for the partial product over [-50 ≤ n ≤ 50] using 64-bit floating point arithmetic.
it probably converges quite slowly
No because it's a double infinite product
@@zachariastsampasidis8880 Why would that be a problem? You can easily rewrite it as a single infinite product.
infinite product representations typically converge extremely slowly compared to series representations
i did some thinking. First of all, the positive part of the product doesn't really help us, it just limits us to |a|,|b| < 1, we're better off taking n from -∞ to -1 and dealing multiplying by a factor of (1-a)/(1-b).
Now, taking n from -N to -1 gives us the expression
(a^2^-N - 1)/(b^2^-N - 1).
Consider (a^u - 1)/(b^u - 1).
If we take u to be small, we can do a little Taylor series
(a^u - 1)/(b^u - 1)
≈ ln(a)/ln(b) + ½u ln(a)[ln(a)/ln(b) - 1] + O(u²)
The error is linear in u. If u = 2^-N, the error falls off pretty quickly.
btw, I thought, if we want to compute ln(a)/ln(b), we might as well skip the product and just compute (a^u-1)/(b^u-1) for some small u. The issue then is numerical stability, computing an expression that is like 0.0000(...)/0.0000(...)
The product formula doesn't have this issue because we're computing terms like 2.000(...)/2.000(...).
But that's not the real problem.
The biggest issue is that to compute x^2^-n means we're taking iterative square roots at each step, which isn't cheap!
In conclusion: don't.
Hey Michael could I suggest a problem imo 1990 problem 3
The correct answer is also log_b(a).
13:46 Why is it important a,b are in (0,1) here? I mean, if a or b were >1 their limit as u approaches zero would be one too.
Otherwise the product diverges (unless b=a which is trivially equal to 1) since it uses (1-b^2^n)/(1-a^2^n) which is equivalent to (b/a)^2^n when n is large.
@@benardolivier6624 Oh! Now I see...Thanks.
@@pedroalonso7606 it's also really easy to make it work with values for a and b greater than 1. Simply replace a with 1/a and/or b with 1/b and multiply a factor of -1 on top of the result for each inverse you take.
It's a "telescopic" product: multiply the product by 1-x, you get (1-x)(1+x)=1-x^2, then (1-x^2)(1+x^2)=1-x^4, etc.. Otherwise it's more correct to write the intervals (-1,1) as ]-1,1[.
In what world are round brackets equal to reversed square brackets. Are you Bourbakian.
@@themathhatter5290 in French world
@@themathhatter5290 Writing reversed square brackets instead of the round parentheses for open intervals is common practice in all German schools I know about. Strangely, in German universities, the round parentheses are used instead.
It is less confusing, at least for me, because the notation (a,b) is usually reserved for a set of coordinates or objects. And when people write for example (a,b] it is quite awkward.. For real numbers it is easy to see that ]a,b] is an interval with a excluded and b included. And for what you call integers (positive or negative) it is common to write with a different notation |[ or ]| but with the same meaning
Have you heard of cyclic sums and products?
Can you take the limit as Euler goes to St. Petersburg?