# Finding the equation of curve? [closed]

I am not sure which level cure it will be, what I have is domain and range for it which are as follows.

f(0) = 0
f(1) = 1
f(2) = 1
f(3) = 3
f(4) = 5
f(5) = 8
f(6) = 13
f(7) = 21
f(8) = 34
f(9) = 55
f(10) = 89


It's programmaticly tough to find out the values beyond f(10) hence is there any way i can figure it out mathematically.

As a wild guess I think is will repeat after some interval so must be a curve but any lead is appreciated !

• This post answers your problem; Get polynomial interpolation formula – Artes Jun 2 '17 at 9:10
• Is it correct that you are skipping f(8)? – Marius Ladegård Meyer Jun 2 '17 at 9:12
• Yes I skipped f(5) although it would be there – CMouse Jun 2 '17 at 9:41
• This looks like the Fibonacci sequence, but there should have been a 2 between 1 and 3 (and 8 is omitted). – LLlAMnYP Jun 2 '17 at 11:00

Put the data in a Mathematica list:

data = {{0, 0}, {1, 1}, {2, 1}, {3, 3}, {4, 5}, {6, 13}, {7, 21}, {8, 34}, {9, 55}, {10, 89}}


Plot it:

ListPlot[data]


Looks exponential. Try a fit:

fit = NonlinearModelFit[data, a Exp[b x] + c, {a, b, c}, x]


We get a FittedModel object in return. The fit is very good:

fit["RSquared"]


0.999952

The best fitting model is

fit["BestFit"]


-0.490631 + 0.774275 E^(0.474907 x)

• I skipped some inputs, although i got your answer, just wanted to notify that the question was changed, Thanks ! – CMouse Jun 2 '17 at 9:40
• I do not understand, can you give links to how you did it ? and how do i get the equation of line is it -1.74487 + 1.33712 E^(0.468692 x) ? – CMouse Jun 2 '17 at 9:51
• Yes, that is the function that best fits the points. The commands I've written in my answer is the way I did it: the code should be clear enough, if you read the documentation for NonlinearModelFit. You do realize this is the SE for the software Mathematica by Wolfram, right...? You don't mention it in your OP. – Marius Ladegård Meyer Jun 2 '17 at 9:54
• Then you have posted on the wrong StackExchange site. – Marius Ladegård Meyer Jun 2 '17 at 10:01
• Can you please correct your answer according to the corrected inputs, so that I can accept the answer as correct ? – CMouse Jun 2 '17 at 10:11