While solving the a partial differential equation involving potential theory,
$$\frac{{\partial a_2}}{{\partial x}} - \frac{{\partial a_1}}{{\partial y}} = B_z$$
The solution is given in the form, $$a_2 = p \int^x B_z dx = pxB_z$$ & $$a_1 = (p-1) \int^y B_z dy = (p-1)yB_z$$
Where, $a_1 = a_1(x,y) \ and \ a_2 = a_2 (x,y)$, $B_z$ can be assumed as a constant for this case.
Now, while I understand intuitively that what is written makes complete sense but I can't seem to understand the mathematical proof that involves this.
Thanks.