I want to calculate line integral:
$$\oint_Cy^2\,dx+3xy\,dy$$
when $C$ is half circle $D=(x,y):x^2+y^2\le1,y\ge0$
I know that $r=1$
The applying greens theorem
$$\frac{\delta Q}{\delta x}=3y$$
and
$$\frac{\delta P}{\delta y}=2y$$
so
$$3y-2y=y$$
then the integral
$$\int_0^1y\,dy=\frac{1}{2}$$
is this legit way to calculate this?
By Green's theorem, $$\oint_CP\,dx+Q\,dy={\int\int}_D\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\,dA$$ where $D$ is the region enclosed by the curve. As you mentioned $r=1$ but you also need the bounds for the angle $\theta$ which is $0$ to $\pi$ since you are looking at the upper half circle. Also $dA=r\,dr\,d\theta$ for the polar transformation and $y=r\sin\theta$. Therefore,
$$\oint_Cy^2\,dx+3xy\,dy=\int_{0}^{\pi}\int_{0}^{1}r\sin(\theta) r \,dr\,d\theta$$