Calculating Phi

Since we are on the topic of fixed point iterative methods for calculation of irrational numbers I have decided to talk about how to calculate one of my favorite irrational numbers: \Phi

Also known as the golden ratio, \Phi is often the subject of psudoscientific conjecture and mysticism. This ratio has been used in greek architecture, under the belief that it produces aesthetically pleasing geometry. It would be used to construct golden rectangles, and as a ratio between various lengths in architecture.

\Phi is the ratio you get when you divide a line segment in two such that the ratio of the larger half to the smaller half is the same as the ratio of the whole line to the larger half. This is a pretty natural way to define it.

It also pops up in the Fibonacci sequence.

The fibonacci sequence is recursively defined as : x_0 = 1; x_1 = 1; x_{n+1} = x_{n} + x_{n-1} Numbers that appear in this sequence are called the fibonacci numbers. Let F(n) denote the n^{th} fibonacci number.

\lim\limits_{n \to \infty}\frac{F(n+1)}{F(n)} = \Phi

here is some code that will caulate it with matlab:

clear;
x(1) = 1;
x(2) = 1;
for j=3:1000
        x(j) = x(j-1) + x(j-2);
        phi = x(j)/x(j-1);
end
format long;
phi
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.