
Parameterize the line segment (call it
) by


with
. Then

and the line integral is



Alternatively, if we can show that
is conservative, then we can apply the fundamental theorem of calculus. We need to find
such that
, which requires



Integrating both sides of the first equation with respect to
gives

Differentiating both sides wrt
gives


Differentiating wrt
gives


So we have

and
is conservative. By the FTC, we find
