Deducing function of two variables from its partial derivatives

linear-pdemultivariable-calculuspartial differential equationssystems of equations

I am fighting with a very simple system of linear PDEs, which solution I think it is straightforward, however, I cannot write it down in a formal way.
$$ \left\{ \begin{array}{c}
\frac{\partial X\left(x_{1},x_{2}\right)}{\partial x_{1}}=f\left(x_{1},x_{2}\right)\\
\frac{\partial X\left(x_{1},x_{2}\right)}{\partial x_{2}}=g\left(x_{1},x_{2}\right)
\end{array}\right. $$

I would like to write the solution as an integral of $f$ and $g$. In this way I can also work out the boundary conditions.

Can I write it as some sort of $X\left(x_{1},x_{2}\right)=\int\ ?\ dx_{1}\ dx_{2}+ Constant$?

Just to give an idea, at the end, a boundary condition could be e.g. $X(x_1=0,x_2) = 0$ but I'd like to be general.

Best Answer

Differentiate the first equation w.r.t. $x_2$ and second equation w.r.t. $x_1$. The equality of mixed partials holds for smooth solutions, so that $f_{x_2} = g_{x_1}$ must be satisfied. Now, integrate the first differential equation w.r.t. $x_1$ as follows: $$ X(x_1,x_2) - X(a,x_2) = \int_{a}^{x_1} f(\xi,x_2)\, d\xi \, . $$ Then, injecting this expression in the second differential equation gives $$ \int_{a}^{x_1} f_{x_2}(\xi,x_2)\, d\xi + X_{x_2}(a,x_2) = g(x_1,x_2)-g(a,x_2) + X_{x_2}(a,x_2) = g(x_1,x_2) \, , $$ which is naturally satisfied. Of course, if we integrate the second equation first, we get $$ X(x_1,x_2) - X(x_1,b) = \int_{b}^{x_2} g(x_1,\eta)\, d\eta \, . $$ Both expressions are linked through the condition $f_{x_2} = g_{x_1}$. You may also have a look at this post and related links.

For a boundary condition of the form $X(0,x_2)=0$, we find $$ X(x_1,x_2) = \int_0^{x_1} f(\xi,x_2)\, d\xi $$ by setting $a=0$.

Related Question