preferably use this as an example: W=xydx+xydy

In: Mathematics

This isn’t really an ELI5 question but basically there isn’t a closed formula for this:

Let’s start with an easier example:

W=ydx+xdy

We integrate the first part and get F=xy but there is another part which is a function of y which we don’t know yet. We can repeat the process for y and get that

F=xy+c which you can check gives us W=ydx+xdy.

The problem with your example is that there isn’t any function that can give this differential form. An easy way to check is to differentiate again. For most regular functions, differentiations by x and then y is the same as y and then x.

But in your case we get x in one case and y in the other.

I’d reccoment you use a mathematical forum for this question. I can not even type a readable formula in here..

W= S xy dx + S xy dy just does not work. You’d need power of two, the fitst part being 1/2 times x^2 times y and the borders from where to which you want to integrate..

Basically: you integrate partially, the first part with the dx the power of x gets added one and in front you put (1/the power of x+1). The second works the same but with y.