# Can all equalities be proven by replacing the variable with a constant?

Just out of curiosity. Given any two expressions that use a variable $x$, can replacing the $x$ with, say, an $11$ and evaluating both expressions always prove that they're equal if the results for both are the same?

If no, how? If yes, can this be used when I need to formally prove if two expressions are equal despite it looking really silly?

-
Take expressions $x+3x^2$ and $\sin x$. They are equal at $0$, but certainly not identically equal. But to a limited degree you can. Let $P(x)$ and $Q(x)$ be polynomials of degree $n$. If they are equal at $n+1$ places, they are identically equal. –  André Nicolas Nov 27 '12 at 7:46

Well, take the expressions $x$ and $-x$. Replace $x=0$ and they're both the same. The expressions are different, though. To make sure the expressions are the same, you have to be able to show that no matter what value you substitute, the result is always the same.