Re: Bug in MiniMaxApproximation
- To: mathgroup at smc.vnet.net
- Subject: [mg60664] Re: Bug in MiniMaxApproximation
- From: Peter Pein <petsie at dordos.net>
- Date: Fri, 23 Sep 2005 04:20:16 -0400 (EDT)
- References: <dgtisl$25n$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
dh schrieb:
> Hello,
> it seems to me that MiniMaxApproximation fails each time the given
> function is zero at the beginning of the specified interval
> Consider an example from the Help:
>
> MiniMaxApproximation[Exp[x],{x, {0, 2}, 2, 4}]
>
> this works fine. However, if you change the function to 1-Exp[..]:
>
> MiniMaxApproximation[1 - Exp[x], {x, {0, 2}, 2, 4}]
>
> you get an 1/0 error.
>
> sincerely, Daniel
>
Hi Daniel,
from the docs:
"Because MiniMaxApproximation tries to minimize the maximum of the
relative error, it is not possible to find a minimax approximation to a
function that has a zero in the interval in question. "
mm = x*MiniMaxApproximation[Piecewise[{{-1, x == 0}}, (1 - Exp[x])/x],
{x, {0, 2}, 1, 4}][[2,1]]
((-1.0000021205528822 - 0.204709852011999*x)*x)/
(1 - 0.2952222393355634*x - 0.01939552534357132*x^2 +
0.017813878338228693*x^3 - 0.0020804136873956523*x^4)
--
Peter Pein, Berlin
GnuPG Key ID: 0xA34C5A82
http://people.freenet.de/Peter_Berlin/