We know that a cotangent bundle $T^\star M$ has a canonical symplectic form and $M$ is a natural Lagrangian submanifold of it. A well known result is that any submanifold $X=\{(p,f(p)): p\in M\}$, where $f$ is a closed one form is Lagrangian. Denote by $[f]$ the de Rham cohomology class of $f$. Assume that we flow $X$ in a Hamiltonian direction to $Y$, then $Y$ will be a Lagrangian submanifold of $T^\star M$. My question is can we write it as $Y={(p,g(p)): p\in M}$ for some closed one form $g$.? If so, do we have $ [g]=[f]?$ Thanks in advance!

As has been noted in Peter Michor's answer, a Hamiltonian isotopy can certainly move the graph of a closed oneform to a Lagrangian submanifold that is not the graph of a oneform. However, in the special case that the starting and ending submanifolds are both graphs of closed oneforms, the de Rham cohomology classes will in fact be equal. (It is important that we are assuming here that the isotopy is Hamiltonian and not just symplectic.) This can be seen as follows: Let $\lambda=\sum p_idq_i$ be the canonical oneform $T^{\ast}M$, so the symplectic form is $d\lambda$. In general, if $\iota:L\to T^{\ast}M$ is a Lagrangian embedding, then the Lagrangian condition amounts to the statement that $\iota^{\ast}\lambda$ is closed. Consequently, there is a welldefined de Rham cohomology class $[\iota^{\ast}\lambda]\in H^1(L;\mathbb{R})$, generally called the Liouville class. In the special case that $L=M$ and the Lagrangian embedding is a closed oneform $\sigma:M\to T^{\ast}M$ (viewed as a section), the definition of the canonical oneform $\lambda$ is such that $\sigma^{\ast}\lambda=\sigma$. In particular, the Liouville class of a closed oneform is just the cohomology class of the oneform. I claim now that the Liouville class is invariant under Hamiltonian isotopies of the Lagrangian submanifold. In other words, if $\{\phi_t\}$ is a Hamiltonian isotopy, obtained as the flow of the Hamiltonian vector field $X_H$ of a function $H:T^{\ast}M\to \mathbb{R}$ (i.e. $i_{X_H}d\lambda=dH$), and if $\iota$ is some Lagrangian embedding, I claim that the Liouville class of $\phi_t\circ \iota$ is independent of $t$. (For ease of notation I'll assume $H$ is timeindependent, but the timedependent case is a straightforward modification.) Indeed this follows fairly quickly from Cartan's magic formula, as follows: $$ \frac{d}{dt}(\phi_{t}\circ\iota)^{\ast}\lambda=\iota^{\ast}\left(\frac{d}{dt}\phi_{t}^{\ast}\lambda \right) =\iota^{\ast}\phi_{t}^{\ast}\mathcal{L}_{X_H}\lambda=\iota^{\ast}\phi_{t}^{\ast}(di_{X_H}\lambda+i_{X_H}d\lambda) $$ $$=\iota^{\ast}\phi_{t}^{\ast}d\left(i_{X_H}\lambdaH\right) $$ which is exact; hence the cohomology class of $(\phi_{t}\circ\iota)^{\ast}\lambda$ is indeed independent of $t$. In particular if $\iota$ is equal to the section of $T^{*}M$ given by a closed oneform $\sigma$ and if $\phi_1\circ\iota$ is equal to the section given by $\tau$ then looking at their respective Liouville classes shows that $\sigma$ and $\tau$ are cohomologous. 


You can write $Y$ as the image of 1form as long as $Y$ meets each fiber of $T^*M\to M$ exactly once and this transversally. For a short time this is so (locally on $M$ if you move the image of a closed oneform by a Hamiltonian flow or even a symplectic flow (this is a smooth curve in the group of symplectic diffeomorphisms). If you look at $M=\mathbb R$, symplectic flows on $T^*M$ are just volume preserving flows on $\mathbb R^2$, and you easily see that one can deform $X$ so that it becomes vertical or a curve meandering wildly, and you can do that faster as you go to $\infty$ on $\mathbb R$, so that at no time $Y$ is still the graph of a 1form (closed plays no role here, since all 1forms are closed. Even if $Y$ stays the graph of a form, the de Rham cohomology class is not constant: Take $M=S^1$ then $T^*M$ is a cylinder, and you can move $X$ just up, which increases the integral, thus the cohomology class. Edit: Okay, take $T^*\mathbb R$. there every symplectiv flow is Hamiltonian since $H^1=0$. Here the vertical flow is a counterexample. 

