The function minimax is called by entering :
where expr is an univariate expression (e.g. f(x) ) to approximate, var is a variable (e.g. x ), [a,b]⊂ℝ and n∈ℕ . Expression expr must be continuous on [a,b] . The function returns minimax polynomial (e.g. p(x) ) of degree n or lower that approximates expr on [a,b] . The approximation is found by applying Remez algorithm.
If the fourth argument is specified, m is used to limit the number of iterations of the algorithm. It is unlimited by default.
The maximum error of the approximation p(x) , i.e. maxa≤ x≤ b|f(x)−p(x)| , is printed in the message area.
Input :
Output :
^
2^
3+0.0042684304696*x^
4+^
5+0.00135760214958*x^
6^
7+6.07297119422e-05*x^
8^
9-2.97767481643e-15*x^
10
The maximum error of this approximation is 5.85234008632× 10−6 .