OT: golden ratio

Hi,

I was curious about the golden ratio phi 0.61803398875 and its inverse 1.61803398875 after reading a new story that came out about this number being possibly detected in certain star brightness oscillations:

formatting link

I was interested that for the golden ratio, then inverse of phi is exactly phi+1, I made a plot showing this formula to compare the other real numbers to their inverse numbers:

y(x) = -(x-(1/x))

This plots as y(x) = -x except for a discontinuity around x=0

At x=phi the y value is 1 and at x=-phi the y value is -1

Also if the equation y(x) = phi(x) is plotted, this line intersects the y(x) = -(x-(1/x)) curve at two places, where x = phi and where x = -phi

Here is a link to the graph showing the y(x) = -(x-(1/x)) and y(x) = phi(x) plots:

formatting link

I guess this is just basic math but I thought it might be interesting!

cheers, Jamie

Reply to
Jamie M
Loading thread data ...

On my graph paper, y = -(x-1/x) has a two piece curved graph avoiding origin whereas y = -x has straight line graph through origin.

--
Virgil 
"Mit der Dummheit kampfen Gotter selbst vergebens." (Schiller)
Reply to
Virgil

And (phi+1)*(phi+1) = phi+2

Cheers

--
Syd
Reply to
Syd Rumpo

There are also a set of numbers that have exact reciprocal values that are exact integers greater than themselves, ie:

for n = 1, 0.618033.. (1/0.618033 = 1.618033)

for n = 2, 0.414213.. (1/0.414213 = 2.414213)

for n = 3, 0.302775.. (1/0.302775 = 3.302775)

for n = 4, 0.236067.. (1/0.236067 = 4.236067)

These can all be derived from the plot of y(x) = -(x-(1/x)) by solving for x when y is set to 1, 2, 3, 4 respectively for n.

Also for n=0 this golden number I'll call it phiZero, it is both positive and negative infinity at the same time, and phiZero and

1/phiZero are the same number how strange! :D

for n = 0, +-infinity.. (1/(+-infinity) = +-infinity)

This could be called the set of golden numbers I guess? :D

phi0 = +-infinity phi1 = 0.618033.. (golden ratio) phi2 = 0.414213.. phi3 = 0.302775.. phi4 = 0.236067.. .. phi10 = 0.099019.. phi20 = 0.049875.. .. phi(infinity) = 0

cheers, Jamie

Reply to
Jamie M

I brought this up 20 years ago. Whee were you then ?

Reply to
jurb6006

Hi,

I used that formula for the set of numbers I made up, it looks like phi is a lot more special than the numbers I made, but my "phi2" which is 0.414213 gives 2 which is a bit interesting I guess.

? =((+-infinity)+1)^2 phi0 = +-infinity

2.618033=(0.618033+1)^2 phi1 = 0.618033.. (golden ratio)

2=(0.414213+1)^2 phi2 = 0.414213..

1.6972=(0.302775+1)^2 phi3 = 0.302775..

1.52786=(0.236067+1)^2 phi4 = 0.236067.. ..

1.20784=(0.099019+1)^2 phi10 = 0.099019..

1.10223=(0.049875+1)^2 phi20 = 0.049875.. ..

1=(0+1)^2 phi(infinity) = 0

cheers, Jamie

Reply to
Jamie M

Yes, all a consequence of how Phi is defined (of course). The continued fraction for Phi is 1,1,1,1,1, ..., meaning if you punch this into your calculator:

(start with any number, say 1)

+ 1 = 1/x + 1 = 1/x + 1 = 1/x ...

it eventually converges to Phi, because you're computing that continued fraction.

If you do it with different constants, you get different numbers. For example, 1,2,2,2,2, ... gives sqrt(2) (or, repeating 2 gives sqrt(2)-1).

There are a few peculiar (namely, transcendental) numbers with interesting forms as continued fractions, such as

formatting link

Continued fractions are amazing for computing approximations. Two practical examples:

Suppose you need a transformer of a particular ratio, but you're limited on turns count (say, because it's a high frequency transformer and self-capacitance or electrical length is critical). You can take the desired ratio, subtract the integer part, and take the reciprocal of the remainder. Repeat until you get a conveniently small remainder.

Example: 300 to 50 ohm balun. You need +/-75 ohms to 50, or a turns ratio of 1:1.2247.. per side. So we compute...

1 (remainder 0.2247...) 4 (remainder 0.449...) 2 (remainder 0.2247...) 4 (remainder 0.449...) (also, note any pattern?)

If we take the first, it's 1:1, which is terrible. The second is 1 + 1/4, which is high, but pretty close (1.25). The third is 1/2 of a 1/4 closer (1.222..), and the fourth is 1/4 of the way closer still (1.225). So you see it tends to converge, and sometimes it converges quite quickly. If you get a big integer at some point (more than 5 or so), that's how you know it's a good stopping point.

Example two: arbitrary-frequency PWM. Suppose you have an 8 bit register but you want 16 bit control. Well, obviously, you're screwed, you can never be guaranteed to get better than 8 bits of counting out of it, right? But... that doesn't mean the resolution always has to be in steps of 1/256th. In fact, it can be quite a bit better.

What you do is, first, start with the desired ratio. It is expressed in some form that's more numerically accurate than what we're doing: it could be a fractional word of more bits than the register (e.g., 0.16 fixed point), or floating point (not that you'd be wasting your resources handling floats..), or some arbitrary rational ratio (in P/Q numerator and denominator form*).

*Note that the fixed point fraction is implicitly a fraction in terms of Q = 2^N. Floating point numbers are similarly limited, though in a much less simplified way (because the exponent is variable; on the upside, most exponents -- that are too large (>= 1), or that give a number much smaller than 1/256th -- simply don't matter because we won't be able to express them, anyway).

Note also that, if Q < 256, we're home free, because we can enter that mark-space ratio into the registers directly. See where this is going?

What you do is, after inputting the ratio num!, (yes, this is BASIC -- I wrote it *years* ago!)

CONST MAXVAL = 256

a = FIX(num!) pm1 = 1: qm1 = 0: p0 = a: q0 = 1 FOR i = 1 TO 100 num! = num! - a IF num! < 1 / MAXVAL THEN EXIT FOR num! = 1 / num! a = FIX(num!) p1 = a * p0 + pm1 q1 = a * q0 + qm1 IF p1 > MAXVAL OR q1 > MAXVAL THEN EXIT FOR pm1 = p0: qm1 = q0: p0 = p1: q0 = q1 NEXT

Returns p0, q0 = best convergent for q0 < MAXVAL.

So, if num! = ratio to output via PWM, then assign p0 => cycles_output_positive and q0 => total_cycles_of_register. Guaranteed q0

Reply to
Tim Williams

Apart from a slightly odd sign convention you are just solving a specific quadratic equation for x. Namely:

x^2 - Nx - 1 = 0

formal solutions x = N/2 +/- sqrt(N^2+4)/2 = N/2 +/- N.sqrt(1+4/N^2)/2

That is when simplified

high root = N + N.(sqrt(1+4/N^2)-1)/2 low root = N(sqrt(1+4/N^2))-1)/2

Using the rough Pade approximant for sqrt(1+x)-1 ~ x(4+x)/(8+4x)

Yields an approximate expression for the low root of

low root ~ (N^2+1)/(N^2+2)/N

There is a lot of random New Age guff written about phi.

It is an interesting number in arguably being the most irrational one and also a very convenient ratio for telescope eyepieces since the classic sequence 6,10,16,26,40 when used in combination with a 2x or 3x Barlow lens contains no duplicates.

--
Regards, 
Martin Brown
Reply to
Martin Brown

That finding is disputable...

You're just playing with numbers there. The most interesting factoids are in geometry:

formatting link

Reply to
bloggs.fredbloggs.fred

can

You can generalize this method by constructing a Stern-Brocot tree for n < some integer and printing all the mediants; this will give you all the best rational approximations under n or a given real.

formatting link

--


----Android NewsGroup Reader---- 
http://usenet.sinaapp.com/
Reply to
bitrex

Hi,

I wrote a little C# program to sum up the set of all these "phi" numbers:

phi1 = 0.618033.. (golden ratio) phi2 = 0.414213.. phi3 = 0.302775.. phi4 = 0.236067..

I summed up to phi(1 billion), and here are the results starting at phi (0.618..)

at 10,000 = 9.25195663890752 at 100,000 = 11.5545867277016 at 1,000,000 = 13.8571763262718 at 10,000,000 = 16.1597663608829 at 100,000,000 = 18.4731603038946 at 1,000,000,000 = 18.8959954602162 at 10,000,000,000 = 18.8959954602162

So the sum of all the infinite set of phi golden ratio's is about

18.895.. I guess, does it mean anything!?

cheers, Jamie

Reply to
Jamie M

Hi,

To clarify for these numbers if you 1/x them you get this:

phi1 = 0.6180339887498949.. (golden ratio) phi2 = 0.41421356237309515.. phi3 = 0.30277563773199456.. phi4 = 0.2360679774997898.. phi5 = 0.19258240356725187.. phi6 = 0.16227766016837952..

(1/x on each phi number)

phi1 = 1.6180339887498949.. (golden ratio) phi2 = 2.41421356237309515.. phi3 = 3.30277563773199456.. phi4 = 4.2360679774997898.. phi5 = 5.19258240356725187.. phi6 = 6.16227766016837952..

So these numbers are all golden ratios, and the infinite set of them has the sum 18.8959954602162

cheers, Jamie

Reply to
Jamie M

This is also a Fibonacci type sequence I think, since for

the formula shows the Fibonacci sequence: 5,8,13 for n=1,2,3

cheers, Jamie

Reply to
Jamie M

I still can't figure out what you're summing to get 18.895..., the infinite set of the first group of numbers above doesn't converge to that, and I don't think the second converges at all. Can you post am example of the first few terms of the sum youre doing, or your code?

--


----Android NewsGroup Reader---- 
http://usenet.sinaapp.com/
Reply to
bitrex

Hi,

A neat thing about this sequence of golden numbers is the position in the sequence of the number is encoded in the number itself!

ie for the 10th number in the sequence the number is 0.099019513592784

if you take the reciprocal of that number 1/x, it is 10.0990195135928..

this is the same number just 10 larger, and 10 is the position in the sequence of that number too!

It works for all numbers in the sequence, are there any other sequences of numbers that can do this? :D

phi1 = 0.6180339887498949.. (golden ratio) phi2 = 0.41421356237309515.. phi3 = 0.30277563773199456.. phi4 = 0.2360679774997898.. phi5 = 0.19258240356725187.. phi6 = 0.16227766016837952.. ..

cheers, Jamie

Reply to
Jamie M

Hi,

Here is the code in C#, it outputs 18.8959954602162 into a textbox:

It is a sum of these numbers starting at phi:

phi1 = 0.6180339887498949.. (golden ratio) phi2 = 0.41421356237309515.. phi3 = 0.30277563773199456.. phi4 = 0.2360679774997898.. phi5 = 0.19258240356725187.. phi6 = 0.16227766016837952.. .. up to phi1000000000

If the sequence is summed up to 10000000000 (ten times more) the output is still the same 18.8959954602162..

C# code:

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

private void Form1_Load(object sender, EventArgs e) { double x; double n; double nSum = 0;

int count = 1000000000;

for (n = 1; n < count - 1; n++) { x = (-n + Math.Sqrt((n * n + 4))) / 2; nSum = nSum + x;

}

textBox1.Text = nSum.ToString();

} } }

cheers, Jamie

Reply to
Jamie M

Here is a list of the first 99 numbers in the sequence:

0.618033988749895 0.414213562373095 0.302775637731995 0.23606797749979 0.192582403567252 0.16227766016838 0.140054944640259 0.123105625617661 0.109772228646444 0.0990195135927845 0.0901699437494745 0.0827625302982193 0.0764732189829527 0.0710678118654755 0.0663729752107782 0.0622577482985491 0.058621384311845 0.0553851381374173 0.0524865872713995 0.0498756211208899 0.047511554864494 0.0453610171872612 0.0433963806151958 0.0415945787922958 0.0399362039844533 0.0384048104052983 0.036986370680884 0.035668847618199 0.0344418537486337 0.0332963783729081 0.0322245670090666 0.0312195418813985 0.0302752548165408 0.0293863659264026 0.0285481429581047 0.0277563773199461 0.0270073136489053 0.0262975904404463 0.0256241897666349 0.0249843945007875 0.0243757517737926 0.0237960416286391 0.0232432500308839 0.022715545545239 0.0222112591104171 0.0217288664426754 0.021266972678152 0.0208242989286269 0.0203996704784579 0.0199920063936077 0.0196003103496913 0.0192236625153761 0.0188612123522383 0.018512172212592 0.0181758116340269 0.0178514522438 0.0175384631983988 0.0172362570938169 0.0169442862908831 0.0166620396072688 0.016389039334257 0.0161248385416464 0.015869018638849 0.0156211871642427 0.0153809757782142 0.0151480384383547 0.014922049737784 0.0147027033899008 0.0144897108446358 0.0142828000231958 0.0140817141595235 0.0138862107382138 0.0136960605195355 0.0135110466434938 0.0133309638053873 0.0131556174964231 0.0129848233034267 0.0128184062623191 0.0126562002606931 0.01249804748511 0.0123437979092955 0.0121933088197537 0.0120464443756347 0.01190307520001 0.0117630779999516 0.0116263352131369 0.0114927346787326 0.0113621693307735 0.0112345369121414 0.0111097397075994 0.0109876842944345 0.0108682813093637 0.0107514452303832 0.0106370941726368 0.0105251496970951 0.0104155366312142 0.0103081829006726 0.0102030193713816 0.0100999797011099
Reply to
Jamie M

A computer program is not a proof. Prove it analytically. Same goes for all your other observations.

Reply to
bloggs.fredbloggs.fred

Nevermind, I made a mistake somewhere. The first set does seem to approach that value.

--


----Android NewsGroup Reader---- 
http://usenet.sinaapp.com/
Reply to
bitrex

Here is a graph of (-x +sqrt((x * x + 4))) / 2

The golden ratio formula! :D

formatting link

cheers, Jamie

Reply to
Jamie M

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.