Recursive Calculation of Gaussian-Like Sequence
- To: mathgroup at smc.vnet.net
- Subject: [mg28018] Recursive Calculation of Gaussian-Like Sequence
- From: "A. E. Siegman" <siegman at stanford.edu>
- Date: Wed, 28 Mar 2001 02:40:48 -0500 (EST)
- Organization: Stanford University
- Sender: owner-wri-mathgroup at wolfram.com
(Apologies -- this is more a math than a Mathematica question -- but there seem to be a lot of helpful experts on this group.) I'm evaluating the recursion relation: f[0] = 1; f[1] = ((2-alpha)/2) f[0]; f[n_] := f[n] = (2-alpha + beta (n-1)^2) f[n-1] - f[n-2] numerically with beta = alpha^2 and with alpha having some small value like 2 X 10^(-5), expecting to get a gaussian-like sequence symmetric about n=0 that's close to f[n] approx= Exp[-(alpha/2) n^2] . That's in fact exactly what I get, out to be about 5 or 6 standard deviations (n approx= 1000 for the alpha value above) -- but then the numerical results for larger n suddenly turn into a growing Exp[+(alpha/2)n^2]-type behavior with a sign that's extraordinarily sensitive to small changes in the initial value of f[1]/f[0]. Is this round-off error? (probably not) -- an inherent numerical instability in the recursion relation? (probably so). Is there a way around it. (The recursion form in the third line above comes from a variational analysis of a physical problem; the values of alpha and beta can be adjusted arbitrarily, but have to remain in a k1 + k2 n^2 form.)
- Follow-Ups:
- Re: Recursive Calculation of Gaussian-Like Sequence
- From: Tomas Garza <tgarza01@prodigy.net.mx>
- Re: Recursive Calculation of Gaussian-Like Sequence