How to find a polynomial $P(x)$ of order $4$ such that $\max\{\vert\ln(n)-P(n)\vert : 1\leq n \leq12\}$ is as small as possible?
I guessed the solution with linear programming, but I don't know how to formulate the equations.
How to find a polynomial $P(x)$ of order $4$ such that $\max\{\vert\ln(n)-P(n)\vert : 1\leq n \leq12\}$ is as small as possible?
I guessed the solution with linear programming, but I don't know how to formulate the equations.
For any function $f$, define
$$ \phi(f)=(308f(2)+154f(7)+63f(12))-(140f(1)+275f(4)+110f(11)) \tag{1} $$
Let $P$ be a polynomial of degree $4$, and let $\varepsilon={\sf max}\bigg\lbrace\big|\ln(n)-P(n)\big| \ \bigg| \ 1\leq n\leq 12\bigg\rbrace$. Since $308+154+63+140+275+110=1050$, we see that $\big|\phi(\ln-P)\big| \leq 1050\varepsilon$, or in other words $\big|\phi(\ln)-\phi(P)\big|\leq 1050\varepsilon$. Now it is a starightforward computation that $\phi(P)=0$. It follows that
$$ \varepsilon \geq \frac{\big|\phi(\ln)\big|}{1050} \approx 0,02 \tag{2} $$
And the bound in (2) is optimal ; indeed, it is attained when $$ \begin{array}{lcl} P(x) &=& \frac{16x^4 - 97x^3 - 2500x^2 + 19477x - 17940}{9450}\ln(2) \\ & & +\frac{x^4 - 22x^3 + 155x^2 - 398x + 300}{600}\ln(3) \\ & & +\frac{7x^4 - 214x^3 + 2045x^2 - 6326x + 5280}{5400}\ln(7)\\ & & +\frac{-19x^4 + 442x^3 - 3221x^2 + 8438x - 6432}{7560}\ln(11) \end{array}\tag{3} $$
Here is a graphic with the log function in red and $P$ in blue ; you can tell they are very close :
