Re: FindFit
- To: mathgroup at smc.vnet.net
- Subject: [mg92744] Re: [mg92733] FindFit
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 12 Oct 2008 04:31:38 -0400 (EDT)
- References: <200810100835.EAA07169@smc.vnet.net> <200810111047.GAA12354@smc.vnet.net>
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 >
- References:
- Unevaluated subtleties
- From: magma <maderri2@gmail.com>
- FindFit
- From: Artur <grafix@csl.pl>
- Unevaluated subtleties