Constructing lagrangian submanifold of a symplectic manifold Let $(M,\omega)$ be a symplectic manifold. To keep it simple, let us take $M = \mathbb{R}^{2n}$ with linear coordinates $(x^1,\ldots,x^n,y^1,\ldots,y^n)$ and the standard symplectic form $\omega = \sum_{i=1}^n dx^i \wedge dy^i$. 
A submanifold $\Lambda$ of $M$ is said to be Lagrangian if, for each $p \in \Lambda$, $T_p\Lambda$ is a lagrangian subspace of $T_pM$, that is, $\omega_p \vert_{T_p\Lambda} \equiv 0$ and $\dim T_p\Lambda = \frac{1}{2}\dim T_pM$. Equivalently, if $\iota : \Lambda \hookrightarrow M$ is the inclusion map, then $\Lambda$ is Lagrangian if and only if $\iota^*\omega = 0$ and $\dim \Lambda = \frac{1}{2} \dim M$.
This seems like a reasonably easy definition, but in practice, how does one really construct a lagrangian submanifold of $(M,\omega)$? For instance, given a smooth function $f : U \subset \mathbb{R}^2 \to \mathbb{R}^4$, can one explicitely construct a Lagrangian immersion out of $f$? 
I read a little bit about generating functions of Lagrangian submanifolds, but am unsure if this relates here.
Thank you for your help.
 A: Here are some facts that might help you, but I'm not sure if it is what you are looking for.


*

*Consider a $1$-form $\mu$ as a map $\mu:M\to T^\ast M$. We know that the cotangent bundle always has a canonical symplectic structure. Let $\omega=-d\alpha$ be the canonical $2$-form on $T^\ast M$. It is not too hard to show that the graph of $\mu$, that is $\Gamma_\mu=\{(p,\mu_p) \ , \ p\in M\}$, is a Lagrangian submanifold of $T^\ast M$ if and only if $\mu$ is closed.

*Let $(M_1,\omega_1)$ and $(M_2,\omega_2)$ be two symplectic manifolds. It's not too hard to check that $M_1\times M_2$ is symplectic. In fact, $a\pi_1^\ast\omega_1+b\pi_2^\ast\omega_2$ is a symplectic form for all non-zero $a$ and $b$. Taking $a=1$ and $b=-1$, we obtain the twisted form $\widetilde\omega=\pi_1^\ast\omega_1-\pi_2^\ast\omega_2$. Given a diffeomorphism $\varphi:M_1\to M_2$ it is a proposition that $\varphi$ is a symplectomorphism if and only if $\Gamma_\varphi$ is a Lagrangian submanifold of $(M_1\times M_2,\widetilde\omega)$.


We can combine these 2 bullets to find something related to what your question is about. Let $(M_1,\omega_1)$ and $(M_2,\omega_2)$ be symplectic manifolds. Let $f\in C^\infty(M_1\times M_2)$. It follows that $df$ is a closed $1$-form on $T^\ast M_1\times T^\ast M_2$. Hence by bullet 1, we have that $\Gamma_{df}$ is a Lagrangian submanifold of $T^\ast M_1\times T^\ast M_2$, with the natural symplectic form. In fact, its not hard to show that its a Lagrangian submanifold of $(T^\ast M_1\times T^\ast M_2,\widetilde\omega)$, where $\widetilde\omega$ is the twisted product form described above.
Hence, using bullet 2, the goal is to find a diffeomorphism $\varphi:T^\ast M_1\times T^\ast  M_2$ such that $\Gamma_\varphi=\Gamma_{df}$. If you can find such a $\varphi$ then you know it is a symplectomorphism and so its graph is a Lagrangian submanifold.
It's often possible, locally, to find such a $\varphi$. In fact, finding such a $\varphi$ is governed by the implicit function theorem. 
