When we want to solve an Exact Differential Equation of the form $P(x, y)dx + Q(x, y)dy = 0$ we have a solution of the form: $$f(x, y) = \int_{x_0}^{x}{P(x, y)dx} + \int_{y_0}^{y}{Q(x_o, y)dy} = c$$
My question is the following:
In the first part I must perform an integration with regard to x. As the book I am reading says, I must calculate this integral keeping y constant. But we know that $y$ is a function of $x$ .($y = y(x)$). Is it mathematically correct to do that, despite the fact that during integration $x$ moves in the interval $(x_0, x)$?
Second question similar to the previous one:
The definition of the exact ODE says that for it to be exact the following must happen for a function $f(x, y)$: $$\frac{\partial f}{\partial x}(x, y) = P(x, y) \space and \space \frac{\partial f}{\partial y}(x, y) = Q(x, y)$$ We know once again that y is a function of x. So is it correct for the second partial derivative to differentiate with regard to $y$ and keep $x$ constant?
No, it is not implied that $y$ is a function of $x$. This whole exercise is about real functions in two variables, regardless of its connection to differential equations.
You should also make a distinction between independent, free variables and integration variables $$ f(x, y) = \int_{x_0}^{x}{P(\tilde x, y)d\tilde x} + \int_{y_0}^{y}{Q(x_0, \tilde y)d\tilde y} = c $$ from where it follows that $$ \frac{\partial f}{\partial x}(x, y) = P(x,y) $$ and $$ \frac{\partial f}{\partial y}(x, y) = \int_{x_0}^{x} \frac{\partial P}{\partial y}(\tilde x, y)d\tilde x + Q(x_0,y) $$ If the integrability condition $\frac{\partial P}{\partial y}=\frac{\partial Q}{\partial x}$ is satisfied, the second transforms to $$ \frac{\partial f}{\partial y}(x, y) = \int_{x_0}^{x} \frac{\partial Q}{\partial x}(\tilde x, y)d\tilde x + Q(x_0,y)=Q(x,y). $$ Now you can try to prove that the integrability condition is not only sufficient, but also necessary.