
Brent K. answered 06/22/21
PhD in Applied Mathematics with 12+years experience with Matlab
If F is conservative, then there must be a potential function, f, such that
f_y = xsin(x)+1, and so, integrating with respect to y,
f(x,y) = xysin(x) + y +C(x)
(since we integrated with respect to y only, our "constant" of integration is only a constant with respect to y alone, and can generally depend on x - so our "constant" of integration is a function of x)
Note also that if we knew C(x), we would be done, since then we would know the potential function f. How do we find C(x)?
Differentiate with respect to x:
f_x = ysin(x)+xycos(x) + C'(x)
This must be equal to the first component of F, so
f_x = ysin(x)+xycos(x) + C'(x) = ysin(x)+xycos(x)
Solving for C'(x), we have
C'(x) = 0, so C(x) = k, where k is a constant.
Hence, a potential function is given by f(x,y) = xysin(x)+y, and so F is conservative.
Using the so-called fundamental theorem for line integrals, the integral is equal to
f(0,-2) - f(1,3) = (-2) - (3sin(1)+3) = -5-3sin(1)