A set of the form $\{(x,y)\in \mathbb{R}^2\,:\,P(x,y)=0\}$ for a nonzero polynomial $P\in \mathbb{R}[x,y]$ is said to be an algebraic curve. This set can be denoted simply by "$P(x,y)=0$".
Question: Can we fit the graph of cosine, namely, $\{(t,\cos t)\in \mathbb{R}^2\,:\,t\in\mathbb{R}\}$, into an algebraic curve?
Intuition says "no" and that's correct.
Indeed, suppose there is some nonzero polynomial $P$ such that $P(t,\cos t)\equiv 0$. Consider the polynomial $Q_\lambda(x,y):=y-\lambda$, for $\lambda\in [-1,1]$. Due to cosine's periodicity, the algebraic curve $Q_\lambda(x,y)=0$ intersects the graph of cosine infinitely many times. This tells us that the algebraic curves $P(x,y)=0$ and $Q_\lambda(x,y)=0$ have an infinite intersection and, by an Algebraic Geometry theorem, $P$ and $Q_\lambda$ must have a nonconstant common factor. Since $Q_\lambda$ is irreducible, this factor must be $Q_\lambda$ itself. So we are saying that $y-\lambda$ is a factor of $P$ for every $\lambda \in [-1,1]$... Since $P$ is a polynomial, this is impossible, unless $P\equiv 0$, which we discarded by hypothesis.
Very good. But what if we wanted to answer the "local" version of the question?
Question (local): Can we fit a piece of the graph of cosine, say, $\{(t,\cos t)\in\mathbb{R}^2\,:\,t\in (a,b)\}$, into an algebraic curve?
Intuition still says that we can't, but I don't know how to prove this.
Since we're limited to a piece of the graph, we lose the argument of that infinite intersection...
General case (for $P\in\mathbb{R}[X]$):
This is a direct implication of the fact that any trigonometric function is transcendental in any open interval of $\mathbb{R}$. One such proof goes as follows. A function $f$ is real-algebraic iff the set $\{x^kf(x)^l\}$ is $\mathbb{R}$-linearly dependent. What we do then is find a ODE which annihilates this set (on said interval) and check if the wronskian is identically zero. This is a very powerful technique for these types of proofs. See this link for more details.
Special case (for $P\in\mathbb{Q}[X]$):
If $P[t,\cos(t)]=0$ on an open set, then there exists a non-zero rational s.t. $P[q,\cos(q)]=0$ meaning $\cos(q)$ is algebraic, but $\cos(x)$ is transcendental for $x\neq0$ algebraic.