P: Find the circulation to the square which is defined by $-\frac{\pi}{2}\leq x\leq \frac{\pi}{2} $ and $-\frac{\pi}{2} \leq y \leq \frac{\pi}{2}$
$\hat{v}=v_x\hat{i}+v_y\hat{j}=\cos(x)\sin(y)\hat{i}-\sin(x)\cos(y)\hat{j}$
Approach: $$\Delta\hat{v}=\oint{\hat{v}}\cdot d\hat{r}=I+II+III+IV$$
$$ I(i)=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} {v(x,y)}\cdot dx$$
I would do this for $II(j), III(i), IV(j)$ where I would replace $dx$ with $dy$ whenever I give $x$ an value
$$II(j)=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} {v(\frac{\pi}{2},y)}\cdot dy$$ etc...
I would end up with $$\therefore\Delta\hat{v}=-2-2-2-2=-8$$
Question: I'm curious to know if there is any other possible way to solve this?
Thanks in advance.
You can also apply Stoke's theorem $$\oint\hat{v}\cdot d\hat{r}=\int\!\!\!\int_S(\nabla\times\hat{v})\cdot dS,$$ where $$(\nabla\times\hat{v})\cdot dS=\left(\frac{\partial v_y}{\partial x}-\frac{\partial v_x}{\partial y}\right)dx\,dy=-2\cos x\cos y\,dx\,dy.$$ Then $$\Delta\hat{v}=\int_{-\pi/2}^{\pi/2}\int_{-\pi/2}^{\pi/2}(-2\cos x\cos y)dx\,dy=-2\left(\int_{-\pi/2}^{\pi/2}\cos x\right)^2=-8.$$