MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FindFit


I don't think FindFit can ever do this since you would need huge  
precision and then it would take for ages. But there is a trivial way  
to do this and I can't see why you can't use it.

ls = {14, 248, 102272, 20489142272, 839425017825619607552,
   1409268686920894404615927074915795024740352}
eqs = Table[1/2 ((a + Sqrt[b])^(2^x) + (a - Sqrt[b])^(2^x)), {x, 1, 6}]

Solve[eqs == ls, {a, b}]
{{b -> 1, a -> -Sqrt[13]}, {b -> 1, a -> Sqrt[13]}, {b -> 13,
   a -> -1}, {b -> 13, a -> 1}}

Andrzej Kozlowski


On 11 Oct 2008, at 19:47, Artur wrote:

> Dear Mathematica Gurus,
> Who have idea which procedure I can use inspite FindFit in following:
> In[1]: Table[Simplify[Expand[(1/2) ((1 + Sqrt[13])^(2^n) + (1 -
> Sqrt[13])^(2^n))]], {n, 1, 6}]
> Out[1]: {14, 248, 102272, 20489142272, 839425017825619607552,
> 1409268686920894404615927074915795024740352}
> In[2]: FindFit[{14, 248, 102272, 20489142272, 839425017825619607552,
>  1409268686920894404615927074915795024740352}, (1/
>    2) ((a + Sqrt[b])^(2^x) + (a - Sqrt[b])^(2^x)), {a, b}, x,
> WorkingPrecision -> 100]
> Out[2]:{a -> 2.43785286368448657933626328600,
> b -> 4.95343824602875750402007143975}
>
> Should be: {a -> 1.00000000000000000000,
> b -> 13.000000000000000000}
>
> Who have idea how find (true) a,b when I have sequence
> Best wishes
> Artur
>



  • Prev by Date: Bug in Manipulate with Trigger control?
  • Next by Date: Re: Roots of polynomial equations with complex coefficients
  • Previous by thread: FindFit
  • Next by thread: Re: FindFit