I'm just learning about green's formula and im wondering about what happens when $\frac{\partial Q}{\partial x} = \frac{\partial P}{\partial y}$. Suppose that we're trying to calculate the closed loop integral:
$\gamma: (2, 0) \to (-1,1) \to (0, -2) \to (1, 2) \to (-2, -1) \to (2, 0)$ (i.e. a star :D)
$P(x,y)= \frac{x-y}{x^2+y^2}$ $Q(x,y)= \frac{x+y}{x^2+y^2}$
$\int_\gamma Pdx + Qdy$
Since its a closed loop I figured I could try to calculate this expression using Green's formula, however given that $\frac{\partial Q}{\partial x} = \frac{\partial P}{\partial y}$ we just integrate over $0$, which should the answer 0. Yet the corrct answer is $4\pi$.
You have to make a "hole" around the origin, and orient it clockwise. Then, Green's formula applies to the combined contour. Since you have $Q_x=P_y$, the double integral in the punctured region will be zero, and the conclusion is that your integral is equal to $$ \oint_C Pdx+Qdy, $$ where $C$ is a positively oriented circle of small radius $\epsilon$ around the origin, such that the circle is contained in your star (you go around the circle twice). Then you have to parametrize the circle, but the computation will be simple because on the circle, $x^2+y^2=\epsilon^2$. Of course your result will not depend on $\epsilon$.