From [a,b] to [$0$,$1$] I was checking an exercise and it's proof and I couldn't understand why the interval [a,b] can be 'replaced' by [0,1].

This is the exercise:

Prove that every continuous function f:[a,b]$\rightarrow \mathbb R$ is the uniform limit of a sequence of even polynomials if and only if (a,b) doesn't contain the origin.

Proof:

Suppose (a,b) doesn't contain the origin.
And for simplicity consider $[0,1]$ instead of [a,b].

.

. (and the proof continue)

.

So why is it equivalent to work with $[0,1]$ ?

Is there a proof to show that $[0,1] \Leftarrow \Rightarrow [a,b]$ ?
Suppose we have the result for $[0,1].$ If now $f\in C([0,b]),$ define $g:[0,1] \to [0,b]$ by setting $g(x) = bx.$ Then $f\circ g \in C([0,1]).$ So there exists a sequence $P_n$ of even polynomials such that $ P_n \to f\circ g$ uniformly on $[0,1].$ This implies $P_n\circ g^{-1} \to f$ uniformly on $[0,b].$ Since each $P_n\circ g^{-1}$ is an even polynomial, we have the result for $[0,b].$

If now $0&lt;a&lt;b$ and $f\in C([a,b]),$ we can extend $f$ to a continuous function $F$ on $[0,b],$ simply by setting $F(x) = f(a)$ for $x\in [0,a).$ By the above, there is a sequence $P_n$ of even polynomials such that $ P_n \to F$ uniformly on $[0,b].$ This of course implies $ P_n \to F$ uniformly on $[a,b].$ Since $F=f$ on $[a,b],$ we have the desired result for $[a,b].$

The result for intervals $[a,b]$ with $a&lt;b\le 0$ follows easily from this.
Yes, actually you can map $[a,b]$ to $[0,1]$ using the following function: $x \mapsto \frac{x - a}{b - a}$. This is a bijection between the two intervals, and it is also a continuous function as you can check.