# $P(x)=P(-x)$ holds for all values of $x$ ,two conditions

I was doing a question on polynomials , where it was found that $$P(x)=P(-x)$$ in the interval $$[-\sqrt2,\sqrt 2 ]$$ It was then concluded that $$P(x)=P(-x)$$ holds for all values of $$x$$ ,"since it is a polynomial". Can someone help me understand why it could be generalized ?

Edit - $$P(x)$$ is a polynomial with real coefficients .

• Your title is misleading: it holds for all $x$ because of two things as the answers make clear: 1) $P(x)$ is a polynomial and 2) it is equal to some other polynomial at an infinite number of points - in that case, the two polynomials have to be equal at all points. Commented May 31, 2020 at 13:20
• Thanks ,I will change it Commented Jun 1, 2020 at 16:18

Let $$Q(x)=P(x)-P(-x)$$, then $$Q(x)$$ is a real polynomial since $$P(x)$$ is (make sure you can show this!). By the assumption, $$Q$$ has infinitely many roots. But the only real polynomial with infinitely many roots is the zero polynomial. Hence $$Q(x)=0$$ for all real $$x$$, so $$P(x)=P(-x)$$ for all real $$x$$.
If polynomial $$f(x)$$ has degree less than $$n$$, then $$n+1$$ number of points on the polynomial determines the polynomial.
Since $$P(x) - P(-x)$$ is a polynomial, and there are infinite number of $$t \in [-\sqrt 2, \sqrt2]$$ satisfying $$P(t) - P(-t) = 0$$, we have $$P(x) - P(-x) \equiv 0$$ as function.
• @Grace500 Let $f(x) = a_0 + a_1 x + \cdots + a_n x^n$ and $(x_0, y_0), \cdots, (x_n, y_n)$ be the points of the polynomial, i.e. $f(x_i) = y_i$ for all $i \in \{0, \cdots, n\}$. Then we have the linear system of $a_0, \cdots, a_n$. $n+1$ number of variables, $n+1$ number of equations. And the system is linearly independent. en.wikipedia.org/wiki/Vandermonde_matrix Commented May 31, 2020 at 7:59