Direct computation:
Parameterize the top part of the circle
by
![\vec r(t)=(x(t),y(t))=(\cos t,\sin t)](https://tex.z-dn.net/?f=%5Cvec%20r%28t%29%3D%28x%28t%29%2Cy%28t%29%29%3D%28%5Ccos%20t%2C%5Csin%20t%29)
with
, and the line segment by
![\vec s(t)=(1-t)(-1,0)+t(2,-\pi)=(3t-1,-\pi t)](https://tex.z-dn.net/?f=%5Cvec%20s%28t%29%3D%281-t%29%28-1%2C0%29%2Bt%282%2C-%5Cpi%29%3D%283t-1%2C-%5Cpi%20t%29)
with
. Then
![\displaystyle\int_C(\sin x\,\mathrm dx+\cos y\,\mathrm dy)](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Cint_C%28%5Csin%20x%5C%2C%5Cmathrm%20dx%2B%5Ccos%20y%5C%2C%5Cmathrm%20dy%29)
![=\displaystyle\int_0^\pi(-\sin t\sin(\cos t)+\cos t\cos(\sin t)\,\mathrm dt+\int_0^1(3\sin(3t-1)-\pi\cos(-\pi t))\,\mathrm dt](https://tex.z-dn.net/?f=%3D%5Cdisplaystyle%5Cint_0%5E%5Cpi%28-%5Csin%20t%5Csin%28%5Ccos%20t%29%2B%5Ccos%20t%5Ccos%28%5Csin%20t%29%5C%2C%5Cmathrm%20dt%2B%5Cint_0%5E1%283%5Csin%283t-1%29-%5Cpi%5Ccos%28-%5Cpi%20t%29%29%5C%2C%5Cmathrm%20dt)
![=0+(\cos1-\cos2)=\boxed{\cos1-\cos2}](https://tex.z-dn.net/?f=%3D0%2B%28%5Ccos1-%5Ccos2%29%3D%5Cboxed%7B%5Ccos1-%5Ccos2%7D)
Using the fundamental theorem of calculus:
The integral can be written as
![\displaystyle\int_C(\sin x\,\mathrm dx+\cos y\,\mathrm dy)=\int_C\underbrace{(\sin x,\cos y)}_{\vec F}\cdot\underbrace{(\mathrm dx,\mathrm dy)}_{\vec r}](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Cint_C%28%5Csin%20x%5C%2C%5Cmathrm%20dx%2B%5Ccos%20y%5C%2C%5Cmathrm%20dy%29%3D%5Cint_C%5Cunderbrace%7B%28%5Csin%20x%2C%5Ccos%20y%29%7D_%7B%5Cvec%20F%7D%5Ccdot%5Cunderbrace%7B%28%5Cmathrm%20dx%2C%5Cmathrm%20dy%29%7D_%7B%5Cvec%20r%7D)
If there happens to be a scalar function
such that
, then
is conservative and the integral is path-independent, so we only need to worry about the value of
at the path's endpoints.
This requires
![\dfrac{\partial f}{\partial x}=\sin x\implies f(x,y)=-\cos x+g(y)](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20f%7D%7B%5Cpartial%20x%7D%3D%5Csin%20x%5Cimplies%20f%28x%2Cy%29%3D-%5Ccos%20x%2Bg%28y%29)
![\dfrac{\partial f}{\partial y}=\cos y=\dfrac{\mathrm dg}{\mathrm dy}\implies g(y)=\sin y+C](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20f%7D%7B%5Cpartial%20y%7D%3D%5Ccos%20y%3D%5Cdfrac%7B%5Cmathrm%20dg%7D%7B%5Cmathrm%20dy%7D%5Cimplies%20g%28y%29%3D%5Csin%20y%2BC)
So we have
![f(x,y)=-\cos x+\sin y+C](https://tex.z-dn.net/?f=f%28x%2Cy%29%3D-%5Ccos%20x%2B%5Csin%20y%2BC)
which means
is indeed conservative. By the fundamental theorem, we have
![\displaystyle\int_C(\sin x\,\mathrm dx+\cos y\,\mathrm dy)=f(2,-\pi)-f(1,0)=-\cos2-(-\cos1)=\boxed{\cos1-\cos2}](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Cint_C%28%5Csin%20x%5C%2C%5Cmathrm%20dx%2B%5Ccos%20y%5C%2C%5Cmathrm%20dy%29%3Df%282%2C-%5Cpi%29-f%281%2C0%29%3D-%5Ccos2-%28-%5Ccos1%29%3D%5Cboxed%7B%5Ccos1-%5Ccos2%7D)