Wolfram Function Repository
Instantuse addon functions for the Wolfram Language
Function Repository Resource:
Find a minimax approximation of a function
ResourceFunction["MiniMaxApproximation"][expr,{x,{x_{0},x_{1}},m,n}] finds the rational polynomial function of x, with numerator order m and denominator order n, that gives a minimax approximation to expr on the interval x_{0} to x_{1}. 

ResourceFunction["MiniMaxApproximation"][expr,approx,{x,{x_{0},x_{1}},m,n}] finds the minimax approximation to expr, starting the iterative algorithm with approx. 
A list containing the points where the maximum error occurs and the desired interpolation, along with the value of the error:
In[1]:= 

Out[1]= 

The rational approximation:
In[2]:= 

Out[2]= 

The relative error in the approximation over the interval:
In[3]:= 

Out[3]= 

The convergence process does not finish within a small number of iterations without braking:
In[4]:= 

Out[4]= 

With the default brake, the conversion succeeds:
In[5]:= 

Out[5]= 

Supply a function that gives a list of derivatives of the function to be approximated, evaluated at numeric points:
In[6]:= 

In[7]:= 

Out[7]= 

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:
In[8]:= 

Out[8]= 

Divide out the zero and then multiply back into the rational function:
In[9]:= 

Out[9]= 

In[10]:= 

Out[10]= 

The relative error:
In[11]:= 

Out[11]= 

Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License