Representing $f(x,y)$ as a Sum of Partial Derivatives I was attempting an exam question which looked like this:
Given the expression:
$P(x, y)\text{d}x + Q(x,y)\text{d}y = 0$ 
Where:
$P(x,y) = 6x +9y + 11 \\
Q(x, y) = 9x - 4y +3$
Find a function $f(x,y)$ such that
$\text{d}f = P(x,y)\text{d}x + Q(x,y)\text{d}y$
My immediate thought was the definition of the total differential, so I equated this with the RHS of the above equation:
$\frac{\partial f}{\partial x}\text{d}x + \frac{\partial f}{\partial y}\text{d}y = P(x,y)\text{d}x + Q(x,y)\text{d}y$
From here I stated that:
$\frac{\partial f}{\partial x} = P(x, y) \\
\frac{\partial f}{\partial y} = Q(x, y)$
I then did not know how to proceed in any way that I could remember being taught, but I had a guess at "partially integrating" both and summing the result:
$\int P(x, y) \partial x = 3x^2 + 9xy + 11x \\
\int Q(x, y) \partial y = 9xy - 2y^2 + 3y \\
f = \int P(x, y) \partial x + \int Q(x, y) \partial y \\
f = 3x^2 + 18xy + 11x - 2y^2 + 3y$
And I checked the result:
$\frac{\partial f}{\partial x} = 6x + 18y + 11\\
\frac{\partial f}{\partial y} = 18x - 4y + 3$
Not quite right, but I can see that I'm close. I then realised that perhaps I was counting the contribution of the "common parts" of $P(x,y)$ and $Q(x,y)$ to $f$ twice. Once I halve the "common parts", then the answer is correct.
My question is, is it "legal" to write $f(x,y)$ to be the sum of the partial derivatives with respect to each variable minus the "common parts"? Or have I made an assumption along the way which means that the solution does not follow from what I have said? Additionally, what are the "common parts" called?
I am a struggling first year, so I apologise if I have made an elementary error.
 A: First off, a notational comment: partial derivatives are denote with $\partial$ (\partial) and not $\delta$.
Now to your calculations: Indeed you are summing the contributions twice. The problem in your calculation, is that you forgot the constant when integrating: your integrals should read
$$\int P(x, y)\thinspace dx = 3x^2 + 9xy + 11x +c(y)=F(x,y)\\
\int Q(x, y)\thinspace d y = 9xy - 2y^2 + 3y +c(x)=F(x,y)\\$$
because, of course, these give you zero when you derive with respect to the other variable.
Note that I have added $=F$ on both expression, because $F$ has indeed to satisfy these equations, by the fundamental theorem of calculus.
Once you have obtained the two expressions, you need to check that the terms involving both variable contemporarily agree, else no $F$ satsfying both equalities can exist. Once you have done that, sum all individual contributions once, and lastly add a constant $C$, independent of $x$ and $y$. So the general solution becomes 
$$F(x,y)=3x^2+9xy+11x-2y^2+3y+C.$$
PS: for the existance of $F$, refer to Poincaré's Lemma 
A: One way to answer it is to recognize that $f$ will have to be of the form
$$f(x,y)=\frac{1}{2}Ax^2+\frac{1}{2}By^2+Cxy+Dx+Ey$$
(we could also include a constant).
Then 
$$f_x(x,y)=Ax+Cy+D$$
and
$$f_y(x,y)=By+Cx+E$$
Since $f_x(x,y)=P(x,y)$ and $f_y(x,y)=Q(x,y)$ we can then equate coefficients to get $f$.
We end up with $A=6$, $B=9$, $C=9$, $D=11$ and $E=3$.
