When is a submanifold of $\mathbf R^n$ given by global equations? Let $M \subset \mathbf R^n$ be a (smooth) submanifold of dimension $d$. Under which conditions does there exist global equations defining $M$? By global equations I mean : does there exist a smooth function $f: \mathbf R^n \to \mathbf R^{n-d}$, submersive at each point of $M$ and such that $M=f^{-1}(0)$.
Of course there are two necessary conditions:
1) $M$ must be a closed subset of $\mathbf R ^n$.
2) The normal bundle of $M$ in $\mathbf R^n$ must be trivial.
At first, I would have guessed that these conditions are sufficient, but I can't prove it.
I have partial answers, however.
1)The first natural thing to do is to take a tubular neighbourhood $U$ of $M$ in $\mathbf R^n$. The indentification $U \simeq M \times \mathbf R^{n-d}$ allows to define a function $f : U \to \mathbf R^{n-d}$ which has the required properties. But it is not clear to me whether $f$ can be extended to the whole $\mathbf R^n$.
2) There is a way to give an answer if we change a bit the problem: the Pontryagin-Thom construction gives a function $f: \mathbf R^n \to \widehat{\mathbf R^{n-d}} \simeq \mathrm S^{n-d}$ by sending all the points outside a tubular neighbourhood at infinity.
This maybe means that this is the good formulation of the problem, but I am still curious about the original one.
3) If $M$ has codimension $1$, then the function $f$ defined on a tubular neighbourhood $U$ of $M$ as in 1) can actually be extended to $\mathbf R ^n$ by a constant function (using the fact that the complement of $M$ has two connected components).
 A: I have two  comments which  don't fit into the comments field so I'm posting this as an answer.


*

*As Ryan Budney mentioned above the problem becomes trivial if we compose the original embedding $M^d\to \mathbb R^n$ with the canonical inclusion $\mathbb R^n\times\{0\}\subset \mathbb R^{n+1}$.
That means in particular that in the stable range (when $n>2d+1$) there are no obstructions because in that range any two embeddings of $M\to \mathbb R^n$ are ambiently isotopic so if the problem is solvable for one then also for the other. Since $n>2d+1$ we can always isotope our original embedding into $\mathbb R^{n-1}\times \{0\}\subset \mathbb R^n$ and the claim follows. 

*When $k=n-d-1$ is odd then $S^k$ is an Eilenberg-Maclane space over $\mathbb Q$ which means that rationally the same exact argument that worked for $k=1$ also works here.  To elaborate further, given a trivialization of the normal bundle we have a tubular neighborhood $U\cong D^{k+1}\times M$  and we have an obvious map $f: U\to D^{k+1}$ given by the projection onto the second factor. On the boundary of $U$ the map takes values in $S^k$ and we want to extend it to a map from $W=\mathbb R^n\backslash U$ to $S^k$.  Since $S^k$ is rationally equivalent to $K(\mathbb Q,k)$, rationally the homotopy type of $f|_{\partial U}$ is determined by $f^*([S^k]) \in  H^*(\partial U, \mathbb Q)$ and the question becomes whether or not  this class in the image of $i^*:H^k(W,\mathbb Q)\to H^k(\partial W\cong M\times S^k,\mathbb Q)$.
By Alexander duality $H_k(W,\mathbb Q)$ is isomorphic to $H^d(M,\mathbb Q)\cong \mathbb Q)$ with the generator given by  $i_*([S^k])$ where $S^k$ is the normal $S^k$ in $\partial W\cong S^k\times M$.  Let $\alpha\in H^k(W,\mathbb Q)$ be the dual generator to $i_*([S^k])$.
Now, a priori,  the original trivialization may have been wrong so that $i^*(\alpha)$ is not equal to $f^*([S^k])$ if $H^k(M)\ne 0$. However, since the evaluation map  $SO(k+1) \to S^k$ is a rational  isomorphism on $H^k$ we can modify the original trivialization by an appropriate map $M\to SO(k+1)$ which does make $i^*(\alpha)=f^*([S^k])$ meaning that the map extends.
What this means is that whatever (if any) obstructions are present in this case they are all torsion.
When $k=1$ then $S^1$ is already a $K(\mathbb Z,1)$ space and the above works on the nose without tensoring with $\mathbb Q$ as Ryan mentioned in a comment above.
I just realized that algori's answer below can not be correct. His(hers?) idea was that if we write $M$ as $(f_1,\ldots, f_{k})=0$ then after a small perturbation we can assume that $0$ is still a regular value $(f_1,\ldots, f_{k-1})=0$ 
and hence $M$  frame bounds in $N=(f_1,\ldots, f_{k-1})=0$ because it clearly separates $N$.
However, this argument does not work because
 the level set $(f_1,\ldots, f_{k-1})=0$ might not be compact so the fact that $M$ separates it does not imply that it's cobordant to zero. This is not a fake issue since otherwise by Ryan's observation above it would imply that every framed cobordance class is stably trivial which is known not to be the case.
Also, as far as I can tell the effect of the change of the trivialization by a map $M\to SO(n-d)$  changes  the framed cobordance class by something in the image of the $J$-homomorphism $J\colon \pi_d(SO(n-d))\to \pi_n(S^{n-d})\cong\Omega^{fr}_d(\mathbb R^n)$. 
More explicitly it seems to me that it works as follows. Given any $\alpha\in \pi_d(SO(n-d))$ and $M^d$ as above, take a degree one map $f:M\to S^d$. Then twisting the trivialization by $\alpha\circ f:M\to SO(n-d)$ should give a new framed cobordism class which is different from the original one by $J(\alpha)$.
This should be very well-known I'm sure so could somebody in the know please comment on this?
So it would seem that the group $\pi_n(S^{n-d})/\mathrm{Im }(J)$ is relevant here  but I'm having trouble phrasing  our obstruction problem in cobordism terms. In particular, is it 
clear that if we have two frame cobordant manifolds  in $\mathbb R^n$ and one can be given by a single equation then so is the other?
A: It seems to me now that there may be obstructions after all. Here is a potential source of counter-examples.
Let $M$ be a $d$-dimensional complete intersection in $\mathbb{R}^n$, i.e. $M$ is given as the zero locus of $f_1,\ldots, f_k,k=n-d$ defined globally on $\mathbb{R}^n$ and the differentials of $f_i$'s are linearly independent at each point of $M$. 
[upd 2: Then the normal bundle of $M$ is framed. Let us show that, unless $\dim M=0$, $M$ is framed cobordant to 0 bounds a submanifold of $\mathbb{R}^n$. Notice that when $\dim M=0$, this is not necessarily so: take e.g. $M$ to be one point in $\mathbb{R}$.
For each fixed $d>0$ we proceed by induction on $n\geq d+1$. The case $n=d+1$ (i.e., $M$ is a hypersurface) is clear.  Suppose $n>d+1$ and embed $\mathbb{R}^n$ in $S^n$ as the complement of a point, $\infty$. Take a function $\phi:\mathbb{R}^n\to\mathbb{R}$ that is equal 1 in some ball containing $M$ and decreases sufficiently fast at the infinity, so that we can extend the functions $g_i=\phi f_i$ to $S^n$ by setting $g_i(\infty)=0$. Let $\bar g_i,i=1,\ldots,k$ be a slight perturbation of $g_i$ such that


*

*both $\bar g_1=\cdots=\bar g_{k}=0$ and $\bar g_1=\cdots=\bar g_{k-1}=0$ define smooth complete intersections; denote these as $M'$ and $N$ respectively;

*the components of $M'$ are $M$ and possibly some submanifolds of a small open $n$-ball $U$ such that $\infty\in U$ and $M\cap \bar U=\varnothing$;

*$N$ intersects $S=\partial \bar U$ transversally.
Then $M$ is framed cobordant to $N\cap S$. A cobordism can be obtained by taking $N_+=\{x\in N\mid \bar g_k(x)\geq 0\}$ and intersecting with the exterior of $U$. Now, $N\cap S$ is a smooth complete intersection of dimension $d$ in $\mathbb{R}^{n-1}$, and hence is framed cobordant to 0 bounds a submanifold of $S$ by the induction hypothesis.]
So if we find a manifold $M\subset \mathbb{R}^n$ with trivial normal bundle but such that no framing of this bundle makes $M$ framed cobordant to 0 that does not bound any manifold in $\mathbb{R}^n$, we have a counter-example. The Pontrjagin-Thom construction gives an isomorpfhism $$\Omega^{fr}_{d}(\mathbb{R}^{n})\cong \pi_{n}(S^{n-d}).$$
Each choice of a framing $f$ of the normal bundle of $M$ gives some element of $\pi_{n}(S^{n-d})$. What is not clear (to me) is how this element changes when $M$ is fixed and $f$ varies under the action of the gauge group $Map(M,O(n-d))$.
Remark: from Ryan's answer it follows that if there are counterexamples, then the corresponding elements of $\pi_{n}(S^{n-d})$ are killed by the suspension map $\pi_{n}(S^{n-d})\to \pi_{n+1}(S^{n+1-d})$ after a change of framing. From the tables of the homotopy groups there are plenty of elements killed by suspension maps, but I don't know how to describe them explicitly.
On the positive side: if one takes any framing of the normal bundle and doubles $M$ using one of the sections, them the resulting "two copies" of $M$ can be given by global equations.
A: I no longer think there are further obstructions.  Here's why. 
Let $f : \mathbb R^n \to S^k$ be smooth with $p \in S^k$ a regular value, and $M=f^{-1}(p)$. You get this map from your conditions (1) and (2) + the Pontriagin construction.  
Then 
$$ g : \mathbb R^n \times \mathbb R \to \mathbb R^{k+1}$$
given by $g(v,t) = e^tf(v)$ is smooth, has $p$ also as a regular value, and $M=g^{-1}(p)$. 
I'm using the convention that $S^k$ is the unit sphere in $\mathbb R^{k+1}$. 
If you're not happy including $M$ into $\mathbb R^{n+1}$ like above, then the original argument is all I have.  That is, $M$ is the pre-image of the regular value of a smooth function $f : \mathbb R^n \to \mathbb R^k$ if and only if your conditions (1), (2) and further that the complement $W$ of an open tubular neighbourhood of $M$ in $\mathbb R^n$ has this property: unit normal spheres (from the normal bundle of $M$ in $\mathbb R^n$) are retracts of $W$.  I suspect this is a non-trivial restriction to your original question but I haven't found a concrete example. 
A: An example of a compact $16$-dimensional submanifold of $\mathbb{R}^{30}$ with trivial normal bundle that is not defined by such global equations may be found in [Akbulut-King, Submanifolds and homology of nonsingular real algebraic varieties, Am J Math 107 45 (1985), Theorem 5.8].
