Algorithm/Procedure for finding $\sigma$ such that $\omega=d\sigma$ I know that the Poincare's lemma asserts that under certain conditions a differential form $\omega$ is exact, i.e.  it possesses an antiderivative $\sigma$, such that $\omega=d\sigma$.       
But as far as I can tell, the proof does not contain an algorithm for actually finding such an $\sigma$ (at least in the way we sketched the proof in class). So my question is: Is there a general algorithm (in a loose sense, not necessarily something one would implement on a computer) that tells me how do effectively calculate $\sigma$ ? 
If there is, could someone please illustrate me its steps on some exact form of a higher degree, like the $2$-form $$\omega=(xydy)\wedge (2zdx+xdz) ?$$
My hope is that that will get me started, so that I'll be able to find antiderivatives on my own.
 A: If you have a nice coordinate expression for the form (without singularities), then it is fairly easy. The form you wrote can bw written as:
$$
\omega = y\,dy\wedge (2xz\,dx + x^2\,dz)
$$
Why we isolated $y$ will be clear in a second.
Now: 
$$
d\omega = d(y\,dy)\wedge (2xz\,dx + x^2\,dz) - y\,dy\wedge d(2xz\,dx + x^2\,dz) 
$$
The first term is zero, because $d(y\, dy) = dy\wedge dy = 0$. 
This is why we isolated $y$ (always isolate a coordinate, if you can. It is an overall exact form that decouples from the total form).
We are left with:
$$
d\omega = - y\,dy\wedge d(2xz\,dx + x^2\,dz) = -y\,dy\wedge d(2x - 2x)\,dx\wedge dz = 0
$$
It is crucial that the two terms cancel each other out in the exterior derivative, it means that they are a "Leibniz" term in the form $d\alpha\, \beta +\alpha\, d\beta$, which is $d(\alpha\,\beta)$.
In particular, the term $2xz\,dx$ has a $2x$ that looks a lot like the derivative of the $x^2$ appearing in the second term. Can you see what I mean? So if we rewrite:
$$
\omega = y\,dy\wedge (2xz\,dx + x^2\,dz)
$$
We recognize $d(x^2)=2x\,dx$, and obviously $d(z)=dz$, so:
$$
\omega = y\,dy\wedge (d(x^2)\,z + x^2\,dz) = y\,dy\wedge d(x^2z)
$$
You see that $\omega$ is now clearly the derivative of:
$$
\sigma = y\,dy\,x^2z= x^2yz\,dy
$$
In fact:
$$
d\sigma = d(y\wedge dy)\,x^2z + y\,dy\wedge d(x^2z).
$$
The first term is zero, because $d(y\, dy) = 0$, as we saw.
We are left with:
$$
d\sigma = y\,dy\wedge d(x^2z) = y\,dy\wedge (2xz\,dx + x^2\,dz) = \omega.
$$
I hope it is clear enough, otherwise comment and I'll explain more!
