We want to find a scalar function such that . So we need to have Integrating both sides with respect to gives Differentiating with respect to gives So we find that By the fundamental theorem of calculus, we then know the line integral depends only on the values of at the endpoints of the path. Therefore