If I understand you correctly I think you are talking about an Exact differential

This would be a function

such that

To recover z we would use partial integration.

so in your example

Now multiplying by dx we get

Now lets take the first part

This is the partial of z with respect to y

Now if we integrate with respect to y we get

where the arbitrary constant is a function of x.

Now we know what the partial of z with respect to x should be so

Now we set this equal to the part above to get

Simplifying we get

Now putting this back into z(x,y) we get