Problem : Let $f$ be a real valued continuous function on $[-1,1]$, such that $f(x)=f(-x)$ for all $x \in [-1,1]$. Show that for every $\epsilon \gt 0$ there is a polynomial $p(x)$ with rational coefficients such that for every $x \in [-1,1]$, $$|f(x)-p(x^2)| \lt \epsilon$$.
This problem had appeared in ISI JRF exam, 2017.
I know that the set of polynomials with rational coefficients over $[-1,1]$ is dense in the set of real valued continuous functions on $[-1,1[$. So I'm directly using it here.
So for every $\epsilon \gt 0$ three exists a polynomial with rational coefficients $q(x)$ such that for all $ x \in [-1,1]$, $|f(x)-q(x)| \lt \epsilon$.
Since $f(x)=f(-x)$ for all $x \in [-1,1]$, we have $|f(x)-q(|x|)| \lt \epsilon$ for all $x \in [-1,1]$.
I am stuck here. What can be done next? Applying Stone-Weierstrass again to get $p$ as required? Thanks.
Take $\varepsilon>0$. There is a polynmial $q(x)\in\mathbb{Q}[x]$ such that $(\forall x\in[-1,1]):\bigl|f(x)-q(x)\bigr|<\frac\varepsilon2$. Therefore, $(\forall x\in[-1,1]):\bigl|f(-x)-q(-x)\bigr|<\frac\varepsilon2$, and this is equivalent to $(\forall x\in[-1,1]):\bigl|f(x)-q(-x)\bigr|<\frac\varepsilon2$. Take $r(x)=\frac{q(x)+q(-x)}2$. Then $\bigl|f(x)-r(x)\bigr|<\varepsilon$. But $r(x)$ is a polynomial and an even function and therefore there is a polynomial $p(x)$ such that $r(x)=p(x^2)$.