Finding a function $f(x,y)$ with specified partials I'm wondering if there is a function $f(x,y)$ such that
$$\frac{\partial f}{\partial x}(x, y)=2x-3y$$
and
$$\frac{\partial f}{\partial y}(x, y)=3x+4y$$  
Integrating the first equation with respect to x and the second with respect to y, we get:
$$\int (2x-3y)dx = x^2-3xy+c_1$$ where $c_1$ can depend on y and:
$$\int (3x+4y)dy = 2y^2+3xy+c_2$$ where $c_2$ can depend on x.  
At this point my argument is that in order to get a $-3y$ from a partial with respect to $x$, we need $-3xy$ in the function.  But to get $3x$ from the partial with respect to $y$, we need $-3xy$.  Therefore, in order to combine these 2 equations above, we would need $c_1$ to depend on $x$, which is not allowed, and $c_2$ to depend on $y$.  How can I formalize this argument?  Am I missing something?  Do I have the right idea?
 A: Zarrax's solution is the straightforward way to do it. If you want to push through your own, it's best to write $c_1$ and $c_2$ explicitly as functions.
You would need a function $f(x,y)$ with
$$f(x,y) = x^2 - 3xy + c_1(y) = 2y^2 + 3xy + c_2(x).$$
For equality to hold, you would need 
$$c_1(y) = 2y^2 - x^2 + 6xy + c_2(x) = 2y^2 + 6xy + \Bigl(c_2(x)-x^2\Bigr).$$
Since $c_1(y)$ can only depend on $y$, this tells you that the part that depends on $x$ alone, $c_2(x)-x^2$, must be equal to $0$; but that still leaves the $6xy$ term, which cannot cancel out. So no such function $c_1(y)$ exists that depends only on $y$, so there are no solutions.
A: Instead of integrating both equations and then trying to match $c_1$ and $c_2$ to each other, it's usually simpler (especially for larger systems) to integrate just one equation, say the first one. This gives
$$f(x,y) = x^2 - 3xy + c_1(y)$$
for some (still unknown) function $c_1(y)$.
Plugging that into the second differential equation, one finds that it holds iff
$$-3x + \frac{dc_1}{dy}(y) = 3x + 4y.$$
But it is impossible to satisfy this, since there is no function of $y$ alone such that its derivative equals $6x+4y$. Consequently, the system has no solution $f(x,y)$.
A: From the first equation ${\displaystyle {\partial \over \partial y} {\partial f \over \partial x} = -3}$, while from the second equation ${\displaystyle {\partial \over \partial x} {\partial f \over \partial y} = 3}$. Since the mixed partials have to be the same for your purposes, the equations can't be solved simultaneously.
