Problem:
Is $\omega = (x^2 + y^2)\mathrm{d}x + 2xy \mathrm{d}y$ an exact differential form? If so, write it as the differential of a scalar.
Integrating over a closed curve (the unit circle in this case) $$\int_\gamma \omega = \int_\gamma (x^2 + y^2)\mathrm{d}x + 2xy \mathrm{d}y = \int_0^{2\pi} (-\sin(\theta) +2\cos^2(\theta) \sin(\theta))\mathrm{d}\theta = 0$$
An exact differential form can be written as (in this case, for 2 dimensions)
$$\mathrm{d}z = \frac{\partial z}{\partial x}\mathrm{d}x+ \frac{\partial z}{\partial y}\mathrm{d}y$$ where $z = f(x,y)$.
How can I find such a function? I feel this is a really basic thing that I am missing but I can't find it.
I think I solved it. Is this a procedure I can exploit for future questions or is this a method that works only with polynomial functions?
$$\mathrm{d}f = \frac{\partial f}{\partial x} \mathrm{d}x + \frac{\partial f}{\partial y}\mathrm{d}y = (x^2 + y^2) \mathrm{d}x + 2xy\mathrm{d}y$$
$$\int \mathrm{d} f = \int (x^2 + y^2 )\mathrm{d}y \therefore f(x,y) = \frac{x^3}{3} + y^2x + g(y)$$
$$\frac{\partial f}{\partial y} = 2xy + \frac{\mathrm{d}g(y)}{\mathrm{d}y} = 2xy \therefore \frac{\mathrm{d}g(y)}{\mathrm{d}y} = 0\therefore g(y) = k \in \mathbb{R}$$
Putting everything together
$$f(x,y) = \frac{x^3}{3} + y^2x+k$$
This scalar function fulfills the requirements since
$$\frac{\partial f}{\partial x} = x^2 + y^2$$
$$\frac{\partial f}{\partial y} = 2xy$$