I am reading this answer here explaining the difference between varieties and smooth manifolds and it says:
"...Varieties are cut out in their ambient (affine or projective) space as the zero loci of polynomial functions, rather than simply as the zero loci of smooth functions. ...
...Also, a manifold need not be regarded as lying in an ambient Eulcidean space, but can always be immersed into one, and can then be thought of as being cut out as the zero locus of smooth functions.) ..."
I am aware of Whitney's theorem:
Any closed set in $\mathbb R^n$ is the zero locus of a smooth function.
But not every manifold is closed. I tried to google this but did not find anything useful.
Hence my question:
Is every smooth manifold the zero locus of a smooth function? And if so, please could you elaborate on it a bit?
I also found this thread here and both answers seem to insist that the reason why manifold and variety are not the same is not smoothness. But surely the zero locus of a bunch of polynomials can have cusps?