Let's consider function:
$$f : [a, b] \ni x \mapsto f(x) \in \mathbb R$$
and $f \in C^n$ such that $\forall_{x \in (a, b)}:f'(x) \neq 0 $. I want to prove that:
$$\textrm{lin}\{1,x, x^2,...,x^{n - 1}, f(x)\}$$
is a Haar space.
My work so far
If we take $$g \in \textrm{lin}\{1, x, x^2, ..., x^{n - 1}, f(x)\} \Rightarrow \exists_{a_0, a_1,...,a_n \in \mathbb R}: g(x) = a_0 + a_1x+a_2x^2+...+a_{n - 1}x^{n - 1} + a_n f(x)$$
Now if there exists $z_0, z_1,...,z_n \in [a, b], \; z_i \neq z_j,\;i \neq j: g(z_i) = 0$ we want to show that $g|_{[a, b]} \equiv 0$. I know that function $g$ zeroes in $(n + 1)$ points, whereas it consists of a polynomial of degree $(n - 1)$ but I'm not sure how to end this proof. Can I ask you for a hand in doing so?
The statement is wrong. Let $f(x)=2x+\sin(x)$ and $[a,b] = [0,\pi (n+1)].$ Then $f'(x)\neq 0$ and $\sin \in \mathrm{lin}\{1,x,\ldots,x^{n-1},f(x)\}$, but $\sin$ has more than $n$ zeroes in $[a,b]$.
For $\mathrm{lin}\{1,x,\ldots,x^{n-1},f(x)\}$ to be a Haar space, each element (except the constant function $0$) must not have more than $n$ zeroes.
But maybe there is a typo. The statement is true with a different condition, specifically $\forall x\in(a,b): f^{(n)}(x)\neq 0$ instead of $\forall x\in(a,b): f'(x)\neq 0.$
We know that there must be at least one zero of the derivative of a function between two zeroes of the function itself, see Rolle's theorem. Therefore, a function $g\in C^n$ with more than $n$ zeroes has an $n$-th derivative $g^{(n)}$ with at least one zero in $(a,b)$.
Let $g(x) = a_0 +a_1x + \ldots + a_{n-1} x^{n-1} + a_n f(x)$ and $(a_0,a_1,\ldots,a_n)\neq (0,0,\ldots,0).$
Now we assume that $g(x)$ had more than $n$ zeroes in $[a,b]$.
We have $g^{(n)}(x) = a_nf^{(n)}(x).$ This means that $a_n=0,$ because we assumed $f^{(n)}(x)\neq 0\; \forall x\in(a,b)$ but showed that $\exists\, x\in(a,b) : g^{(n)}(x) = 0.$
Therefore, $g$ must be a polynomial of degree of at most $n-1,$ which cannot have more than $n-1$ zeroes. Our initial assumption ($g$ has more than $n$ zeroes and $g\neq 0$) is false.
Each $g \in \left(\mathrm{lin}\{1,x,\ldots,x^{n-1},f(x)\}\right)\setminus \{0\}$ has at most $n$ zeroes, the system is a Haar space.