How to integrate equations involving partial derivatives? Recently, i had to solve a question in Physics involving partial derivatives:

Find the potential function $V(x,y)$ of an electrostatic field $\vec{E}=2axy\hat i+a(x^2-y^2)\hat j$, where $a$ is a constant.
(A)$V_0+ax^2y-ay^3$
(B)$V_0-ax^2y-ay^3$
(C) $V_0+ax^2y+ay^3$
(D) $\color{green}{V_0-ax^2y+ay^3}$
Note: $E_x=-\dfrac{\partial V}{\partial x}$, $E_y=-\dfrac{\partial V}{\partial y}$

It is easy to obtain the answer by partial differentiation of the options. But how to solve such questions subjectively? What is the method to solve partial differential equations? I am totally new to integration of partial differential equations.
Also, what are such equations and the process of integrating such equations actually called? Because i tried searching multivariable calculus on Wikipedia, but did not find anything useful.
Thanks!
 A: @Hans Lundmark's comment solved the question pretty well. I am just transcribing it into an answer over here, in the form of the solution to my question.
To solve the equation $\vec{E}=2axy\,\hat i+a(x^2-y^2)\,\hat j$, we first write:
$$
\dfrac{\partial V}{\partial x}=-2axy \\
\therefore V=ax^2y + C(y)
$$
where $C(y)$ is a function of $y$. We also have:
$$
\dfrac{\partial V}{\partial y}=ax^2-ay^2=ax^2+\dfrac{\mathrm d(C(y))}{\mathrm dy} \\
\therefore C(y)=-\dfrac{ay^3}{3}+C_1 \\
\therefore \bbox[border:1px solid black]{ V=ax^2-\dfrac{ay^3}{3}+C_1}
$$
This method can be extended to three variables $x$, $y$ and $z$ also, as is shown in the link. For that case, during the first case, we assume a function $C(y,z)$ instead of just $C(y)$.
A: First define your partial derivatives of the potential:
$$-{\partial V\over \partial x}=2axy\quad ;\quad -{\partial V\over \partial y}=a(x^2-y^2)$$
Then solve each partial derivative with respect $x$ and $y$:
$$\Rightarrow \int {\partial V\over \partial x}dx=\int -2axy\ dx=-ax^2y+\phi(y)$$
$$\Rightarrow \int {\partial V\over \partial y}dy=\int a(y^2-x^2)\ dy=a\left({y^3\over 3}-x^2y\right)+\psi(x)$$
Given that the solution is for the same potential, we have:
$$\Rightarrow \int {\partial V\over \partial x}dx = \int {\partial V\over \partial y}dy\Rightarrow -ax^2y+\phi(y)=a\left({y^3\over 3}-x^2y\right)+\psi(x)$$
$$\Rightarrow \phi(y)=a\left({y^3\over 3}\right)+\psi(x)$$
The LHS is only a function of $y$, while the RHS is a function of $y$ and $x$, so the only solution is:
$$\phi(y) = a\left({y^3\over 3}\right)+C\quad ;\quad\psi(x)=C $$
and so$\dots$
$$V= a\left({y^3\over 3}-x^2y\right)+V_0$$
