Cathr said:
I see. I think the problem is I don't really understand what we do with the ##\frac {\partial f}{\partial y}dy## part when we integrate with respect to x. Even if it is a dy differential, it still depends of x, but we say it's a constant.
I guess the right way to do it is to ignore the dy part when we integrate with respect to x, and add a constant depending on y, then integrate the dy part and add a C(x). Then to say ##x^2y^3 + C(x) = x^2y^3 + C(y) ## Then it works, but to me it still seems a bit confusing.
You need to take a step back and look at what is actually happening here. The differentials themselves are something of a nice shortcut, but you can get into trouble if you try to deconstruct things from them. So:
We have a function ##f(x, y)## of these two variables. We know that:
##df = \frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy = 2xy^3 dx + 3x^2y^2 dy##
This gives us a couple of differential equations for ##f##:
##\frac{\partial f}{\partial x} = 2xy^3##
##\frac{\partial f}{\partial y} = 3x^2y^2##
Now, we can integrate each of these to give:
##f(x, y) = x^2y^3 + C_1(y)##
##f(x, y) = x^2y^3 + C_2(x)##
Where ##C_1, C_2## are any functions of a single variable.
From this we see that ##C_1(y) = C_2(x)##. There is now a simple but powerful argument (can you see it?) that:
##C_1(y) = C_2(x) = C##
For some constant ##C##. And therefore:
##f(x, y) = x^2y^3 + C##