Privately (and maliciously), Warren suggested: On Sat, Jan 14, 2012 at 8:41 AM, Warren Smith <warren.wds@gmail.com> wrote:
you could perturb the constant "5" occuring twice in your formula, to get presumably more accuracy from the same functional form.
rwg>Yeah, Mma tried to trick me into doing that when I said x+n->x+d[n]. (Except it missed the e^(-x-5).) Then later I tried making the 5 negotiable, and got stuck. But just now I tried with the other x+n unperturbed, and it worked! I need to investigate further. --Bill I just blew about 20hrs merely trying to analogously perturb the constant "4"! Remez takes a function, an interval, and an expression containing n undetermined coefficients, and attempts to determine those coefficients to minimize the maximum error over the interval (subject to your choice of smooth weighting function). It does this cleverly, not by directly trying to minimize anything with calculus, but rather by seeking to equalize the heights and alternate the signs of n+1 extrema of the error expression. (The n+1st degree of freedom being μ, the magnitude of those heights.) This is "equal ripple". You start the process either by guessing initial values of the n coefficients (and optimistically guess μ=0), and then hope to locate n+1 extrema, or by guessing the abscissæ of the extrema, and trying to solve for the coefficients. If you can get started with n+1 extrema, you iteratively alternate between determining the coefficients from these extrema, and then determining the new extrema from these coefficients. Convergence, once established, is usually quadratic! Officially, however, the approximating expression is assumed to be a polynomial or rational function. Other expressions void the warranty, e.g. the d(4) in the second Spouge expression <http://www.tweedledum.com/rwg/remspouge.png>. With great difficulty, working by analogy from a still smaller example, I managed to guess a set of abscissæ and coefficients yielding eight extrema. These successfully iterated to refined values. And then got stuck <http://www.tweedledum.com/rwg/stuckspouge.png>! Even though the abscissæ had improved, the ripples simply refused to equalize--FindRoot announced failure, even with MaxIterations-> 9999. But it also returned its partial results, which gave eight very unequal ripples, which required manual intervention to fully locate. Re-solving with these extrema and the partial results got very slightly closer. And after many manual iterations, FindRoot resumed success, finally delivering 1.3 additional digits reward for perturbing the "4", as illustrated. Perturb "5" Warren? Be my guest. --rwg