Find the potential $$\varphi$$ with $$y$$ of and electrostatic field $$E = 2axyi + a(x^{2} - y^{2})j$$, where $$a$$ is a constant, $$i$$ and $$j$$ are the unit vectors of the $$x$$ and $$y$$ axes.
As we know that,
$$-d\varphi = \vec {E} \cdot d\vec {r} = [2a xy \vec {i} + 2(x^{2} - y^{2}) \vec {j}]\cdot [dx \vec {i} + dy \vec {j}]$$
or, $$d\varphi = 2a\ x\ y\ dx + a(x^{2} - y^{2})dy = ad (x^{2}y) - ay^{2} dy$$
On integrating, wee get,
$$\varphi = ay \left (\dfrac {y^{2}}{3} - x^{2}\right ) + C$$.