![\mathbf G(x,y)=(ye^{xy}+4\cos(4x+y))\,\mathbf i+(xe^{xy}+\cos(4x+y))\,\mathbf j](https://tex.z-dn.net/?f=%5Cmathbf%20G%28x%2Cy%29%3D%28ye%5E%7Bxy%7D%2B4%5Ccos%284x%2By%29%29%5C%2C%5Cmathbf%20i%2B%28xe%5E%7Bxy%7D%2B%5Ccos%284x%2By%29%29%5C%2C%5Cmathbf%20j)
We're computing the line integral
![\displaystyle\int_C\mathbf G\cdot\mathrm d\mathbf r](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Cint_C%5Cmathbf%20G%5Ccdot%5Cmathrm%20d%5Cmathbf%20r)
It looks like the circular part of
![C](https://tex.z-dn.net/?f=C)
should be along the circle
![x^2+y^2=16](https://tex.z-dn.net/?f=x%5E2%2By%5E2%3D16)
starting at (4,0) and terminating at
![\left(\dfrac4{\sqrt2},\dfrac4{\sqrt2}\right)](https://tex.z-dn.net/?f=%5Cleft%28%5Cdfrac4%7B%5Csqrt2%7D%2C%5Cdfrac4%7B%5Csqrt2%7D%5Cright%29)
.
Because integrating with respect to a parameterization seems like it would be a pain, let's check to see if
![\mathbf G](https://tex.z-dn.net/?f=%5Cmathbf%20G)
is a conservative vector field. For this to be the case, if
![\mathbf G(x,y)=P(x,y)\,\mathbf i+Q(x,y)\,\mathbf j](https://tex.z-dn.net/?f=%5Cmathbf%20G%28x%2Cy%29%3DP%28x%2Cy%29%5C%2C%5Cmathbf%20i%2BQ%28x%2Cy%29%5C%2C%5Cmathbf%20j)
, then
![\mathbf G](https://tex.z-dn.net/?f=%5Cmathbf%20G)
is conservative iff
![\dfrac{\partial P(x,y)}{\partial y}=\dfrac{\partial Q(x,y)}{\partial x}](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20P%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%3D%5Cdfrac%7B%5Cpartial%20Q%28x%2Cy%29%7D%7B%5Cpartial%20x%7D)
.
We have
![P(x,y)=ye^{xy}+4\cos(4x+y)](https://tex.z-dn.net/?f=P%28x%2Cy%29%3Dye%5E%7Bxy%7D%2B4%5Ccos%284x%2By%29)
and
![Q(x,y)=xe^{xy}+\cos(4x+y)](https://tex.z-dn.net/?f=Q%28x%2Cy%29%3Dxe%5E%7Bxy%7D%2B%5Ccos%284x%2By%29)
. The corresponding partial derivatives are
![\dfrac{\partial P(x,y)}{\partial y}=e^{xy}(1+xy)-4\sin(4x+y)](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20P%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%3De%5E%7Bxy%7D%281%2Bxy%29-4%5Csin%284x%2By%29)
![\dfrac{\partial Q(x,y)}{\partial x}=e^{xy}(1+xy)-4\sin(4x+y)](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20Q%28x%2Cy%29%7D%7B%5Cpartial%20x%7D%3De%5E%7Bxy%7D%281%2Bxy%29-4%5Csin%284x%2By%29)
and so the vector field is indeed conservative.
Now, we want to find a function
![G(x,y)](https://tex.z-dn.net/?f=G%28x%2Cy%29)
such that
![\nabla G(x,y)=\mathbf G(x,y)=\left(\dfrac{\partial G(x,y)}{\partial x},\dfrac{\partial G(x,y)}{\partial y}\right)](https://tex.z-dn.net/?f=%5Cnabla%20G%28x%2Cy%29%3D%5Cmathbf%20G%28x%2Cy%29%3D%5Cleft%28%5Cdfrac%7B%5Cpartial%20G%28x%2Cy%29%7D%7B%5Cpartial%20x%7D%2C%5Cdfrac%7B%5Cpartial%20G%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%5Cright%29)
. We have
![\dfrac{\partial G(x,y)}{\partial x}=ye^{xy}+4\cos(4x+y)](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20G%28x%2Cy%29%7D%7B%5Cpartial%20x%7D%3Dye%5E%7Bxy%7D%2B4%5Ccos%284x%2By%29)
Integrating with respect to
![x](https://tex.z-dn.net/?f=x)
yields
![\displaystyle\int\frac{\partial G(x,y)}{\partial x}\,\mathrm dx=\int(ye^{xy}+4\cos(4x+y))\,\mathrm dx](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Cint%5Cfrac%7B%5Cpartial%20G%28x%2Cy%29%7D%7B%5Cpartial%20x%7D%5C%2C%5Cmathrm%20dx%3D%5Cint%28ye%5E%7Bxy%7D%2B4%5Ccos%284x%2By%29%29%5C%2C%5Cmathrm%20dx)
![G(x,y)=e^{xy}+\sin(4x+y)+g(y)](https://tex.z-dn.net/?f=G%28x%2Cy%29%3De%5E%7Bxy%7D%2B%5Csin%284x%2By%29%2Bg%28y%29)
Differentiating with respect to
![y](https://tex.z-dn.net/?f=y)
gives
![\dfrac{\partial G(x,y)}{\partial y}=\dfrac{\partial}{\partial y}\left[e^{xy}+\sin(4x+y)+g(y)\right]](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cpartial%20G%28x%2Cy%29%7D%7B%5Cpartial%20y%7D%3D%5Cdfrac%7B%5Cpartial%7D%7B%5Cpartial%20y%7D%5Cleft%5Be%5E%7Bxy%7D%2B%5Csin%284x%2By%29%2Bg%28y%29%5Cright%5D)
![xe^{xy}+4\cos(4x+y)=xe^{xy}+\cos(4x+y)+\dfrac{\mathrm dg(y)}{\mathrm dy}](https://tex.z-dn.net/?f=xe%5E%7Bxy%7D%2B4%5Ccos%284x%2By%29%3Dxe%5E%7Bxy%7D%2B%5Ccos%284x%2By%29%2B%5Cdfrac%7B%5Cmathrm%20dg%28y%29%7D%7B%5Cmathrm%20dy%7D)
![\implies \dfrac{\mathrm dg(y)}{\mathrm dy}=0](https://tex.z-dn.net/?f=%5Cimplies%20%5Cdfrac%7B%5Cmathrm%20dg%28y%29%7D%7B%5Cmathrm%20dy%7D%3D0)
![\implies g(y)=C](https://tex.z-dn.net/?f=%5Cimplies%20g%28y%29%3DC)
and so
![G(x,y)=e^{xy}+\sin(4x+y)+C](https://tex.z-dn.net/?f=G%28x%2Cy%29%3De%5E%7Bxy%7D%2B%5Csin%284x%2By%29%2BC)
Because
![\mathbf G(x,y)](https://tex.z-dn.net/?f=%5Cmathbf%20G%28x%2Cy%29)
is conservative, and a potential function exists, the line integral is path-independent and the fundamental theorem of calculus of line integrals applies, so we can evaluate the line integral by evaluating the potential function at the endpoints. We end up with