If I understand correctly, the line integral for scalar functions is defined as

As

we may conclude that

Now, these derivatives on , , and are as follows:

In all cases, therefore, we end up with . Our task is now to find

The function is different for each :