Previous Up Next

11.2.9 Minimax polynomial approximation

The minimax command finds the minimax polynomial approximation of a continuous function on a bounded interval using the Remez algorithm.

Since the coefficients of p are computed numerically, you should avoid setting n unnecessary high as it may result in a poor approximation due to the roundoff errors.

Example

minimax(sin(x),x=0..2*pi,10)

max. absolute error: 5.85231264871e-06

     
 5.85141928628×10−6+0.999777263417 x+0.001400152516 x2         
   −0.170089663468 x3+0.0042684302281 x4+0.00525794778108 x5         
   +0.00135760211866 x6−0.000570502070425 x7         
 
  +⎛
⎝
6.0729711779×10−5⎞
⎠
x8 −⎛
⎝
2.14787415748×10−6⎞
⎠
x9
         
 
  −⎛
⎝
1.49765719172×10−15⎞
⎠
x10
         

Previous Up Next