1

I have this question:

  • $f(0) = 0$

  • $f(1) = 1$

  • $f(n) = f(n-1) + f(n-2)$

help me understand and find $f(n)$.

user
  • 154,566
zac
  • 129

2 Answers2

3

Do you know Fibonacci rabbits?

That's a famous recurrence relation that we can solve by trial solution in the form $f(n)=x^n$ that is

$$x^{n}=x^{n-1}+x^{n-2}\implies x^2-x-1=0 \implies x_{1,2}=\frac{1\pm\sqrt 5}{2}$$

then

$$f(n)=c_1x_1^n+c_2x_2^n=c_1\left(\frac{1+\sqrt 5}{2}\right)^n+c_2\left(\frac{1-\sqrt 5}{2}\right)^n$$

and from the initial conditions $f(0)=0$ and $f(1)=1$ we obtain

  • $c_1+c_2=0\implies c_1=-c_2=c$
  • $c\left(\frac{1+\sqrt 5}{2}-\frac{1-\sqrt 5}{2}\right)=1\implies c=\frac1{\sqrt 5}$

and finally

$$f(n)=\frac1{\sqrt 5}\left(\frac{1+\sqrt 5}{2}\right)^n-\frac1{\sqrt 5}\left(\frac{1-\sqrt 5}{2}\right)^n$$

and indicating with $\phi=\frac{1+\sqrt 5}{2}$ the golden ratio we have that $\frac{1-\sqrt 5}{2}=-\frac1{\phi}$ and thus

$$f(n)=\frac1{\sqrt 5}\left(\phi\right)^n-\frac1{\sqrt 5}\left(-\frac1{\phi}\right)^n=\frac{\phi^{n}-(-\phi)^{-n}}{\sqrt 5}$$

user
  • 154,566
  • no.............. – zac Mar 27 '18 at 21:08
  • 2
    0,1,1,2,3,5,8,...read about it :) – user Mar 27 '18 at 21:09
  • ok thanks I live in stupid country we dont study these things – zac Mar 27 '18 at 21:09
  • 3
    @Wel the Fibonacci sequence is possibly the most recognised sequence in the world! Questions like Find the next number in the sequence $1, 1, 2, 3, 5, 8$ even pop up in IQ tests :) – Mr Pie Mar 27 '18 at 21:10
  • 4
    I would interpret "find $f(n)$ as "find the general term of $f(n)$". In this sense, I don't think this is an answer. – GNUSupporter 8964民主女神 地下教會 Mar 27 '18 at 21:10
  • 2
    @Wel I can't belive it! ;) – user Mar 27 '18 at 21:11
  • @Wel Take a look also here https://www.youtube.com/watch?v=dTWKKvlZB08 – user Mar 27 '18 at 21:12
  • @Wel You are welcome, do not hesitate to ask for any other clarification about the derivation for a general expression, also form the other OP. Bye – user Mar 27 '18 at 21:17
  • @GNUSupporter In the link given there is also the derivation, I can't also derive it there but I think it should be useless. – user Mar 27 '18 at 21:21
  • You can, but you won't since it's an PSQ. IMHO, I don't think that the link YouTube video can help OP understand why there's a golden ratio between two adjacent terms of Fibonacci sequence. – GNUSupporter 8964民主女神 地下教會 Mar 27 '18 at 21:31
  • @GNUSupporter The video is just for curiosity, I'm referring to the wiki link given in the answer. There are all the information there. Thanks – user Mar 27 '18 at 21:34
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – Taroccoesbrocco Mar 27 '18 at 22:19
  • @Taroccoesbrocco Did you read what the OP wrote there? He wrote "thanks for all the help", then maybe my answer was useful for him. The link I gave contains all the necessary information, I could copy and paste it but it should be completely useless. – user Mar 27 '18 at 22:22
  • It's a link only answer. Expand it or it will be removed. Moreover asking rhetorical question as answer is a poor idea as it is likely to trip up reviewers. – quid Mar 27 '18 at 22:54
  • @quid I've expanded the full solution, whitout copy and paste! – user Mar 27 '18 at 23:20
  • Thank your for the expansion. – quid Mar 28 '18 at 00:00
  • @quid I really thought it wasn't necessary but it's ok, thank for your suggestion. Bye – user Mar 28 '18 at 00:03
  • @gimusi looking back at my answer, I did not realise you used the same link in your comment! Very sorry for unintentionally stealing your comment. Do you watch Numberphile too? – Mr Pie Apr 04 '18 at 06:18
  • 2
    @user477343 Don't worry for that! It's a kind of classical derivation, indeed at first I only gave the linj but then I was requested to expand. I did directly to review the subject! Bye – user Apr 04 '18 at 06:22
3

Adding to @gimusi 's answer, if you divide $f(n+1)$ by $f(n)$, then this approaches a certain value, for all $n\in\mathbb{N}$. We will call this value $v$, then $$\frac{f(n+1)}{f(n)}\operatorname*{\longrightarrow}^{n\to\infty} v,$$ or $$\lim_{n\to\infty}\frac{f(n+1)}{f(n)} = v.$$ Whichever choice of notation you prefer. After going here, we find that $$v^2 - v - 1 = 0.\tag{In the link, $v = \Delta$}$$ Do you know the quadratic formula? If so, you can apply it to this equation and obtain that $$v = \frac{1+\sqrt{5}}{2} = \color{orange}{\verb|The Golden Ratio|}\tag{denoted by $\varphi$}.$$

This is why the sequence you have, known as the Fibonacci Sequence, is very well-known!

Mr Pie
  • 9,459