Proving that set of points $(x,y)$ in $\mathbb{R}^2$ satisfying $y - \cos(x)= 0$ How can one prove that set of points $(x,y)$ in $\mathbb{R}^2$ satisfying $y-\cos(x)=0$ is not a algebraic curve. That is there does not exist a polynomial $f(x,y)$ in two variables $x$ and $y$ and having integer coefficients such that $f(x,y) = y-\cos(x) =0$. 
This is what I have so far, suppose by the way of contradiction there exist $f(x,y)$ containing $\mathbb{Q}[x,y]$ with $f(x,y)=y - \cos(x)$ then if $y=0$, I should get $f(x,0)=-\cos(x)$. Since left side has finitely many zero's and right side has infinitely many zero's.
Is my proof right? Any help will be appreciated! 
 A: I don't think that quite works. The problem is, what you know is that $f(x,y) = 0$ for exactly the same values of $x, y$ for which $y - \cos x = 0$. Equivalently, that $f(x, \cos x) = 0$ for all $x$. You don't know that $f(x, y) = y - \cos x$ for general $x, y$. But it is the latter statement that your argument requires. 
Still, a variant of your argument works: there are infinitely many $x$ such that $\cos x = 0$. Thus there must be infinitely many solutions to $f(x, 0) = 0$. But the latter is a polynomial, so it must be that $f(x,0) = 0$ for all $x$. Therefore $f(x, y) = yf_1(x,y)$ for some polynomial $f_1$. But then $f(x, \cos x) = (\cos x)f_1(x, \cos x) = 0$ and therefore $f_1(x, \cos x) = 0$ for all $x \ne \pi/2 + n\pi$. By continuity, $f_1(x, \cos x) = 0$ for all $x$. As with $f$, this implies $y \mid f_1(x,y)$ and thus $y^2 \mid f(x,y)$. Continuing, we see that $y^n \mid f(x,y)$ for all $n$, contradicting that $f$ is a polynomial.
Addendum:
A simpler argument: for any $a \in [-1, 1]$, there are infinitely many $x$ such that $\cos x = a$. Therefore $f(x, a) = 0$ has infinitely many roots. Since $f(x, a)$ is a polynomial in $x$, this can only be if $f(x, a) = 0$ for all $x$. Fixing $x, f(x, y) = 0$ for every $y \in [-1, 1]$. Again, since $f$ is a polynomial in $y$, this requires that $f(x,y) = 0$ for all $y$. Therefore $f = 0$ everywhere, not just when $y = \cos x$.
A: Here is another solution to the problem (although is almost the same idea).
Assume that $V=\{(x,y)\in \mathbb{R}^2 ; y=cos(x)\}$ is an algebraic set and let $X=V\cap \{(x,0)\in \mathbb{R}^2 ; x\in \mathbb{R}\}$. We have $X\subseteq \{(x,0)\in \mathbb{R}^2 ; x\in \mathbb{R}\}$ and $X$ is an algebraic set of $\mathbb{R}^2$, then is not difficult to prove that $X$ is an algebraic set of $\mathbb{R}$ (try to prove this!) but $X\neq \mathbb{R}$ is infinite and therefore it can't be an algebraic set of $\mathbb{R}$ (the algebraic sets of $\mathbb{A}^1(k)$ are just $\emptyset, \mathbb{A}^1(k)$ and the finite sets for every field $k$, try to prove this too).
This idea of intersect the set with another algebraic set to prove that it's not an algebraic set is very common in this kind of problems. 
