Let $p:[-1,1] \to \mathbb{R}$ be a polynomial. Prove $\exists$ a polynomial $q$ with rational coefficients s.t. $\Vert p-q \Vert_\infty \lt \epsilon$

functional-analysispolynomialsproof-verificationreal-analysis

Let $p:[-1,1] \to \mathbb{R}$ be a polynomial. Prove that for every
$\epsilon \gt0, \exists$ a polynomial $q:[-1,1] \to \mathbb{R}$ with
rational coefficients s.t. $\Vert p-q \Vert_\infty \lt \epsilon$.

My overall approach is in constructing a polynomial with rational coefficients.

Proof:

Let $\epsilon \gt 0$ be given and let a polynomial $p$ be given. Let $p(x) = a_0 + a_1x+ a_2x^2 +\dots+ a_nx^n$ for some $n \in \mathbb{N}$ and $a_0, a_1, \dots, a_n \in \mathbb{R}$.

Define a polynomial $q(x) = b_0 + b_1x +\dots+b_nx^n$, where each coefficient $b_i$ is defined by:

$\displaystyle b_i = \frac{l_i}{m_i}$ where $l_i,m_i \in \mathbb{N}, m_i \neq 0$, s.t. $\displaystyle \left| \frac{l_i}{m_i} -a_i \right| \lt \frac{\epsilon}{n+1}$.

Then
$$
\begin{align}
\displaystyle
|p(x)-q(x)| & = \left| \left(a_0-\frac{l_0}{m_0}\right) + \left(a_1-\frac{l_1}{m_1}\right)x + \dots + \left(a_n-\frac{l_n}{m_n}\right)x^n\right| \\
& \leq \left| a_0-\frac{l_0}{m_0} \right| + \left| a_1-\frac{l_1}{m_1} \right| \cdot |x| + \dots + \left| a_n-\frac{l_n}{m_n} \right| \cdot |x^n| \\
& \leq \frac{\epsilon}{n+1} + \frac{\epsilon}{n+1} \cdot |x| + \dots + \frac{\epsilon}{n+1} \cdot |x^n| \\
& \leq \frac{\epsilon}{n+1} (n+1) \\
& = \epsilon .
\end{align}
$$

So $|p(x) – q(x)| \lt \epsilon, \ \forall x \in [-1,1]$, then $\Vert p-q \Vert_\infty \lt \epsilon$.

$\Box$

I would like some feedback on overall correctness, style as well as simplification if possible.

Thank you.

Best Answer

A compact way of writing, maybe:

Choose $b_{i}\in\mathbb{Q}$ such that $|a_{i}-b_{i}|<\epsilon/(n+1)$, then for $x\in[-1,1]$, \begin{align*} |p(x)-q(x)|&=\left|\sum_{i=0}^{n}(a_{i}-b_{i})x^{i}\right|\\ &\leq\sum_{i=0}^{n}|a_{i}-b_{i}||x|^{i}\\ &\leq\sum_{i=0}^{n}|a_{i}-b_{i}|\\ &<\sum_{i=0}^{n}\dfrac{\epsilon}{n+1}\\ &=\epsilon, \end{align*} so $\|p-q\|\leq\epsilon$.