We need to find a function
\(f\) such that
\(\frac{\partial f}{\partial x} = M\text{,}\) \(\frac{\partial f}{\partial y} = N\text{,}\) and
\(\frac{\partial f}{\partial z} = P\text{.}\)
Integrating the first equation with respect to
\(x\text{:}\)
\(f(x,y,z) = xy + xz + g(y,z)\)
where
\(g(y,z)\) is a function of
\(y\) and
\(z\text{.}\)
Taking the partial derivative with respect to
\(y\text{:}\)
\(\frac{\partial f}{\partial y} = x + \frac{\partial g}{\partial y} = N = x + z\)
\(\frac{\partial g}{\partial y} = z\)
Integrating with respect to
\(y\text{:}\)
where
\(h(z)\) is a function of
\(z\text{.}\)
\(f(x,y,z) = xy + xz + yz + h(z)\)
Taking the partial derivative with respect to
\(z\) :
\(\frac{\partial f}{\partial z} = x + y + \frac{\partial h}{\partial z} = P = x + y \)
\(\frac{\partial h}{\partial z} = 0\)
Integrating with respect to
\(z\text{:}\)
Therefore, the potential function is:
\(f(x,y,z) = xy + xz + yz + C\)