View Single Post
  #26   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad,sci.electronics.basics
Martin Brown Martin Brown is offline
external usenet poster
 
Posts: 2,701
Default Difference Equations

On 08/02/2013 02:32, Phil Hobbs wrote:
On 2/7/2013 5:40 AM, Martin Brown wrote:

Works best on alternating series with poor convergence or divergence!

I was once very interested in extended convergence tricks and have used
the rational approximation for Log(1+x) in anger several times.

Log(1+x) = x(6+x)/(6+4x) where -1/2 x 1

The other common one sometimes useful is

Sqrt(x) = (1+3x)/(3+x) where -1/2 x 2

Only really any good if you have fast hardware divide.

These tricks sometimes allow a rough polynomial approximation soluble
analytically to provide a much better initial input guess for more rapid
convergence of an iterative method like N-R.


Good stuff. Did you ever read Forman Acton's "Numerical Methods That
Work"?


Yes - but along time ago. I don't possess a copy any more.

One memorable fun version of 3 term Shanks with terrible numerical
stability (but you can divide it out to get something much better) is
difference of geometric mean over arithmetic mean

given the partial sums a, b, c

x' = (a*c-b^2)/(a+c-2*b)

And if you feed it 1,3,7 it gives

x' = (1*7-3^2)/(1+7-2*3) = (7-9)/(8-6) = -1

Users of twos compliment arithmetic take note!

A numerically stable version that is formally equivalent is

x' = (a+2b+c)/4 - (a-c)^2/(a+c-2b)/4

Subject to typos and lapses of memory...

--
Regards,
Martin Brown