If F = ∇Φ find Φ when F = (3x² + y²)i + (2xy + 5)j.
Note that in this example F has only two components. Consequently ∇Φ will have two components, that is \mathbf{F}=\nabla\phi={\frac{\partial\phi}{\partial x}}\mathbf{{i}}+{\frac{\partial\phi}{\partial y}}\mathbf{{j}}. Therefore
(3x^{2}+y^{2})\mathbf{i}+(2x y+5)\mathbf{j}={\frac{\partial\phi}{\partial x}}\mathbf{i}+{\frac{\partial\phi}{\partial y}}\mathbf{j}
Equating the i components we have
{\frac{\partial\phi}{\partial x}}=3x^{2}+y^{2} (26.1)
Equating the j components we have
{\frac{\partial\phi}{\partial y}}=2x y+5 (26.2)
Integrating Equation (26.1) w.r.t. x and treating y as a constant we find
\phi=x^{3}+x y^{2}+f(y) (26.3)
where f (y) is an arbitrary function of y which plays the same role as the constant of integration does when there is only one independent variable. Note in particular that {\frac{\partial}{\partial x}}{{f}}(y)=0. Check by partial differentiation that {\frac{\partial\phi}{\partial x}}=3x^{2}+y^{2}.
Integrating Equation (26.2) w.r.t. y and treating x as a constant we find
\phi=x y^{2}+5y+g(x) (26.4)
where g(x) is an arbitrary function of x. Note that {\frac{\partial}{\partial y}}g(x)=0. Check by partial differentiation that {\frac{\partial\phi}{\partial y}}=2x y+5. Comparing both forms for Φ given in Equations (26.3) and (26.4) we see that by choosing g(x) = x³ and f (y) = 5y we have
\phi=x^{3}+x y^{2}+5y
Check that F is indeed equal to ∇Φ. Also check that by adding any constant to Φ the same property holds, that is F is still equal to ∇Φ.