You can parameterize the curve
and compute the integral along each component curve, or you can use the fact that
is the continuous gradient of a function
and observe that the line integral is path independent.
In other words, there is a function
such that
, so the integral along any curve
from the points
to
is simply
You have
, and so
while
where
is an arbitrary constant. So we've found that
which means the line integral has a value of