Proving the Poincare Lemma for $1$ forms on $\mathbb{R}^2$
Well if $ d\omega = 0 $ then for any smooth closed curve $ \gamma $ in $\mathbb{R}^2 $ the area enclosed is a smooth compact manifold $M$ where $ \partial M = \gamma $. From stokes theorem we have for any closed curve $\gamma $ $$ \int_\gamma \omega = \int_{\partial M} \omega = \int_M d\omega = 0 $$ Thus if $\gamma_1 $ and $\gamma_2 $ are curves with same endpoints then $ \int_{\gamma_1}\omega = \int_{\gamma_2}\omega $. So let for $ x = (x_1,x_2) $ we define $\gamma_x $ as any curve from origin to $x$ and define $ F : \mathbb{R}^2 \rightarrow \mathbb{R} $ as $$ F(x) = \int_{\gamma_x}\omega $$ Thus for any curve $\alpha $ from $x$ to $x+he_k$ where $h>0 $ and $ k\in\{1,2\} $ we have $ F(x+he_k) -F(x) = \int_\alpha \omega $. So for $ f = (f_1,f_2) $ that are given, if we choose $\alpha $ as the straight line i.e. $ \alpha(t) = x + the_k $ then $ \alpha (0) = x,\ \alpha(1) = x +he_k $ then we arrive at for $k\in \{1,2\} $ $$ F(x+he_k) -F(x) = \int^1_0 (f\circ\alpha)(t).\alpha'(t)dt = \int^1_0 f(x+the_k).he_k dt = h\int^1_0f_k(x+the_k)dt $$ If we define the function $$ g_k(t) = \int^t_0f_k(x+ue_k)du $$ then $g_k(0) = 0 $ and $ g_k'(t) = f_k(x+te_k) $ hence $ g_k'(0) = f_k(x) $. Then from above we clearly have $$ \frac{F(x+he_k)-F(x)}{h} = \int^1_0f_k(x+the_k)dt = \frac{1}{h}\int^h_0 f_k(x+ue_k)du = \frac{g_k(h)-g_k(0)}{h} $$ Hence taking $h \rightarrow 0 $ we have $ \partial F/\partial x_k = g_k'(0) = f_k(x) $. Thus $$ \omega = f_1dx_1 + f_2dx_2 = \frac{\partial F}{\partial x_1}dx_1 + \frac{\partial F}{\partial x_2}dx_2 = dF $$