show/hide this revision's text 2 added 570 characters in body

According to Johan's answer, the problem is not well posed if the function $f$ has zeroes in $[-1,1]$ (if the number of zeroes is finite, perhaps something could be done). In the following I assume that $f(x)\ne0$ for all $x\in[-1,1]$. Let $n$ be a positive integer and let $\mathbb{P}(n)$ be the set of all real polynomials, and denote by $\|\cdot\|$ the $L^\infty$ norm on $[-1,1]$. Then you ask for the existence of $P\in\mathbb{P}(n)$ such that $$\|1-P/f\|=\inf_{p\in\mathbb{P}(n)}\|1-p/f\|.$$ This can be brought under the theory of approximation in the $L^\infty$ norm. Let $\phi_k(x)=x^k/f(x)$, $1\le k\le n$. Each $\phi_k$ is a continuous function, they are independent and generate an $n$-dimensional subspace of the space of continuous functions on $[-1,1]$ that we denote by $V$, which is nothing but the space of all functions of the form $P/f$ with $P\in\mathbb{P}(n)$. Moreover, each $\phi\in V$ has at most $n$ zeros in $[-1,1]$, so that it satisfies what is called the Haar condition. The original problem is now recast as: find the best approximation in $V$ of the constant function $1$.

The general theory of approximation shows that there is a unique best approximation, and that it can be characterized as follows: $\phi\in V$ is the best approximation in $V$ of the constant function $1$ if and only if there exist $x_1 < x_2 < \dots < x_{n+2}$ in $[-1,1]$ such that

  1. $|e(x_k)|=\|e\|$, $1\le k\le n+2$,
  2. $e(x_k)=-e(x_{k+1})$, $1\le k\le n+1$,

where $e(x)=1-\phi(x)$ is the error of the approximation. This is Tchebyshev's alternance theorem.

Finally, Remes' algorithm can be used to construct the best approximation.

Edit in response to your comment

If $f$ has a finite number of zeroes in $[-1,1]$ and can be written as $f=q\cdot h$ where $q$ is a polynomial and $h$ is a continuous function such that $h(x)\ne0$ for all $x\in[-1,1]$, then you may consider the space $V$ of all functions of the form $q\cdot p/f=p/h$ whith $p\in\mathbb{P}(n)$. Then $$\frac{|f(x)-q(x)p(x)|}{|f(x)|} =|1-\frac{p(x)}{h(x)}|.$$ If $\phi$ is the best approximation to $1$ in $V$, then $q\cdot \phi$ will be a best approximation to $f$ of degree $n+\hbox{degree}(q)$ in the relative error sense.

show/hide this revision's text 1

According to Johan's answer, the problem is not well posed if the function $f$ has zeroes in $[-1,1]$ (if the number of zeroes is finite, perhaps something could be done). In the following I assume that $f(x)\ne0$ for all $x\in[-1,1]$. Let $n$ be a positive integer and let $\mathbb{P}(n)$ be the set of all real polynomials, and denote by $\|\cdot\|$ the $L^\infty$ norm on $[-1,1]$. Then you ask for the existence of $P\in\mathbb{P}(n)$ such that $$\|1-P/f\|=\inf_{p\in\mathbb{P}(n)}\|1-p/f\|.$$ This can be brought under the theory of approximation in the $L^\infty$ norm. Let $\phi_k(x)=x^k/f(x)$, $1\le k\le n$. Each $\phi_k$ is a continuous function, they are independent and generate an $n$-dimensional subspace of the space of continuous functions on $[-1,1]$ that we denote by $V$, which is nothing but the space of all functions of the form $P/f$ with $P\in\mathbb{P}(n)$. Moreover, each $\phi\in V$ has at most $n$ zeros in $[-1,1]$, so that it satisfies what is called the Haar condition. The original problem is now recast as: find the best approximation in $V$ of the constant function $1$.

The general theory of approximation shows that there is a unique best approximation, and that it can be characterized as follows: $\phi\in V$ is the best approximation in $V$ of the constant function $1$ if and only if there exist $x_1 < x_2 < \dots < x_{n+2}$ in $[-1,1]$ such that

  1. $|e(x_k)|=\|e\|$, $1\le k\le n+2$,
  2. $e(x_k)=-e(x_{k+1})$, $1\le k\le n+1$,

where $e(x)=1-\phi(x)$ is the error of the approximation. This is Tchebyshev's alternance theorem.

Finally, Remes' algorithm can be used to construct the best approximation.