0
$\begingroup$

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 !

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

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]

enter image description here

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)

| improve this answer | |
$\endgroup$
  • $\begingroup$ I skipped some inputs, although i got your answer, just wanted to notify that the question was changed, Thanks ! $\endgroup$ – CMouse Jun 2 '17 at 9:40
  • $\begingroup$ 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) ? $\endgroup$ – CMouse Jun 2 '17 at 9:51
  • $\begingroup$ 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. $\endgroup$ – Marius Ladegård Meyer Jun 2 '17 at 9:54
  • $\begingroup$ Then you have posted on the wrong StackExchange site. $\endgroup$ – Marius Ladegård Meyer Jun 2 '17 at 10:01
  • $\begingroup$ Can you please correct your answer according to the corrected inputs, so that I can accept the answer as correct ? $\endgroup$ – CMouse Jun 2 '17 at 10:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.