Re: FindFit
- To: mathgroup at smc.vnet.net
- Subject: [mg92743] Re: FindFit
- From: psycho_dad <s.nesseris at gmail.com>
- Date: Sun, 12 Oct 2008 04:31:27 -0400 (EDT)
- References: <200810100835.EAA07169@smc.vnet.net> <gcq097$c2k$1@smc.vnet.net>
Hi, Since you have to deal with quite large numbers, one way to do it is to use logarithms: data=Table[{n,Log[(1/2) ((1+Sqrt[13])^(2^n)+(1-Sqrt[13])^(2^n))]},{n, 1,6}]//Simplify; FindFit[data,Log[(1/2) ((a+Sqrt[b])^(2^x)+(a-Sqrt[b])^(2^x))],{{a,2}, {b,10}},x,WorkingPrecision\[Rule]10] Out: {a\[Rule]1.000000000,b\[Rule]13.00000000} The only reason that I have specified a direction {{a,2},{b,10}} is because your model is degenerate with respect to a. If I didn't do it then you might get the other minimum (equivelent but not the one you want) {a\[Rule]-1.000000000,b\[Rule]13.00000000}. Note also that now, you no longer require such large working precision. Cheers
- References:
- Unevaluated subtleties
- From: magma <maderri2@gmail.com>
- Unevaluated subtleties