remez - Maple Help

numapprox

 remez
 Remez algorithm for minimax rational approximation

 Calling Sequence remez(w, f, a, b, m, n, crit, 'maxerror')

Parameters

 w - procedure representing a weight function w(x) > 0 on [a, b] f - procedure representing the function f(x) to be approximated a, b - numeric values specifying the interval [a, b] m - integer specifying the desired degree of the numerator n - integer specifying the desired degree of the denominator crit - Array indexed $1..m+n+2$ containing an initial estimate of the critical set (i.e. the points of max/min of the error curve) maxerror - name which will be assigned the minimax norm of $w\left|f-r\right|$

Description

 • This is not usually invoked as a user-level routine.  See numapprox[minimax] for the standard user interface to the Remez algorithm.
 • This procedure computes the best minimax rational approximation of degree $m,n$ for a given real function f(x) on the interval [a, b] with respect to the positive weight function w(x).
 • Specifically, it computes the rational expression r(x) such that

 $\mathrm{max}\left(w\left(x\right)\left|f\left(x\right)-r\left(x\right)\right|,x\in \left[a,b\right]\right)$ (1)

 is minimized over all rational expressions $r\left(x\right)=\frac{p\left(x\right)}{q\left(x\right)}$ with numerator of degree m and denominator of degree n.
 • The value returned is an operator r such that $r\left(x\right)$ is the desired approximation as a quotient of polynomials in Horner (nested multiplication) form.
 • Note that if f(x) is nonzero on the interval of approximation then the relative error will be minimized by specifying the weight function $w\left(x\right)=\frac{1}{\left|f\left(x\right)\right|}$.
 • If $n=0$ then the best minimax polynomial approximation of degree m is computed.
 • The last argument 'maxerror' must be a name and upon return, its value will be an estimate of the minimax norm specified by equation (1) above.
 • Various levels of user information will be displayed during the computation if infolevel[remez] is assigned values between 1 and 3.
 • The command with(numapprox,remez) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{numapprox}\right):$
 > w := proc(x) 1.0 end proc:
 > f := proc(x) evalf(exp(x)) end proc:
 > $\mathrm{crit}≔\mathrm{Array}\left(1..7,\left[0,0.10,0.25,0.50,0.75,0.90,1.0\right]\right):$
 > $\mathrm{remez}\left(w,f,0,1,5,0,\mathrm{crit},'\mathrm{maxerror}'\right)$
 ${x}{↦}{0.9999988700}{+}\left({1.000079446}{+}\left({0.4990961949}{+}\left({0.1704017036}{+}\left({0.03480086848}{+}{0.01390361442}{\cdot }{x}\right){\cdot }{x}\right){\cdot }{x}\right){\cdot }{x}\right){\cdot }{x}$ (1)
 > $\mathrm{maxerror}$
 ${1.131059045}{×}{{10}}^{{-6}}$ (2)
 > $\mathrm{Digits}≔14$
 ${\mathrm{Digits}}{≔}{14}$ (3)
 > g := proc(x) if x=0 then 1.0 else evalf(tan(x)/x) end if end proc:
 > $\mathrm{crit}≔\mathrm{Array}\left(1..8,\left[0,0.05,0.15,0.30,0.48,0.63,0.73,0.78\right]\right):$
 > $\mathrm{remez}\left(w,g,0,\mathrm{evalf}\left(\frac{\mathrm{\pi }}{4}\right),3,3,\mathrm{crit},'\mathrm{maxerror}'\right)$
 ${x}{↦}\frac{{1.2864938726745}{+}\left({-}{0.50393137136308}{+}\left({-}{0.084263112185419}{+}{0.030873561129257}{\cdot }{x}\right){\cdot }{x}\right){\cdot }{x}}{{1.2864938819561}{+}\left({-}{0.50393243320449}{+}\left({-}{0.51307429865340}{+}{0.19870614448995}{\cdot }{x}\right){\cdot }{x}\right){\cdot }{x}}$ (4)
 > $\mathrm{maxerror}$
 ${7.21510}{×}{{10}}^{{-9}}$ (5)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 21, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9797166585922241, "perplexity": 1067.1375617077692}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-33/segments/1659882573193.35/warc/CC-MAIN-20220818094131-20220818124131-00554.warc.gz"}