Why does the Lagrangian Density have to be a polynomial of the field? In a lecture, a professor appeared to have said that the Lagrangian can only contain terms that have powers of $\phi$ and a term with $\partial_\mu \partial^\mu \phi$ . I imagine this would make any physically possible Lagrangian of the form
$$\mathcal{L}(\phi, \partial_\mu \phi, t) = k\partial_\mu \phi \partial^\mu \phi + \sum_{i\in I} c_i \phi^i$$
For arbitrary real numbers $k$ and $c_i$ and index set $I$.
Is this truly the case? If so, why would it be impossible to have a Lagrangian that has a term with, say, $\cos(\phi)$ or even $(\partial_\mu \partial^\mu \phi)^2$?
 A: The Lagrangian density of any field theory does not need to by polynomial in the field. The polynomial form of a Lagrangian density is typically taken to be an approximation in the spirit of effective field theory. Indeed, one could easy write down a field theory whose Lagrangian density takes the form
$$\mathcal{L}=\frac{1}{2}\partial\varphi\cdot\partial\varphi+a^2m^2(\cos{\frac{\varphi}{a}}-1).$$
This theory is known as Sine-Gordon theory (for obvious reasons). In $d=2$ dimensions Sine-Gordon theory is actually incredibly interesting and has many applications in the study of duality.
Of course, I could simply Taylor expand the cosine and write
$$\mathcal{L}=\frac{1}{2}\partial\varphi\cdot\partial\varphi+\frac{1}{2}m^2\,\varphi^2-\frac{1}{4!}\frac{m^2}{a^2}\varphi^4+\frac{1}{6!}\frac{m^2}{a^4}\,\varphi^6+\cdots,$$
which resembles the form in which you wrote your Lagrangian density.
The polynomial approximation is typically taken because one cannot do traditional perturbation theory without it (polynomial terms lead to $n$-valent graphs in the Feynman diagrammatic expansion of the partition function in a field theory) and because of the fact that terms in the Lagrangian with high powers of $\varphi$ typically are less important in certain approximation regimes (this is the basis of effective field theory).
I hope this helps!
