Is it impossible to perfectly fit a polynomial to a trigonometric function on a closed interval? On a closed interval (e.g. $[-\pi, \pi]$), $\cos{x}$ has finitely many zeros. Thus I wonder if we could fit a finite degree polynomial $p:\mathbb{R} \to \mathbb{R}$ perfectly to $\cos{x}$ on a closed interval such as $[-\pi, \pi]$.

The Taylor series is

$$\cos{x} = \sum_{i=0}^{\infty} (-1)^i\frac{x^{2i}}{(2i)!} = 1 - \frac{x^2}{2} + \frac{x^4}{4!} - \frac{x^6}{6!} + \frac{x^8}{8!}-\dots$$

Using Desmos to graph $\cos{x}$ and $1-\frac{x^2}{2}$ yields:



which is clearly imperfect on $[-\pi,\pi]$. Using a degree 8 polynomial (the first 5 terms of the Taylor series above) looks more promising:



But upon zooming in very closely, the approximation is still imperfect:



There is no finite degree polynomial that equals $\cos{x}$ on all of $\mathbb{R}$ (although I do not know how to prove this either), but can we prove that no finite degree polynomial can perfectly equal $\cos{x}$ on any closed interval $[a,b]\subseteq \mathbb{R}$? Would it be as simple as proving that the remainder term in Taylor's Theorem cannot equal 0? But this would only prove that no Taylor polynomial can perfectly fit $\cos{x}$ on a closed interval...
Yes, it is impossible.

Pick any point in the interior of the interval, and any polynomial. If you differentiate the polynomial repeatedly at that point, you will eventually get only zeroes. This doesn't happen for the cosine function, which instead repeats in an infinite cycle of length $4$. Thus the cosine function cannot be a polynomial on a domain with non-empty interior.
Although this is an incomplete answer unlike the ones I read here, I'd like to offer what I eventually thought of since the idea still seems original:  There can be no polynomial with rational coefficients that exactly approximates $\cos$ on $[0,1]$, because it will have a wrong integral over this interval ($\sin 1$ being irrational).  I believe this argument can be adapted to a different interval $[\alpha,\beta]$ by finding a sub-interval with rational endpoints $[a,b] \subset [\alpha,\beta]$ and using something like the notion of algebraic independence over $\mathbb{Q}$ (search for $a$ and $b$ such that $\sin b - \sin a$ be irrational?  Which should happen most of the time) and/or Niven's theorem, and possibly enhanced to real coefficients since a polynomial with such coefficients can be well-approximated by sequences of polynomials with rational ones.  Thank you for your question, it reminds me much of the kind I would've asked when younger!