To show \(\vec F\) is conservative, we need to find \(z = f(x,y)\) such that \(\vec F = \nabla f = \la f_x, f_y\ra\text{.}\) That is, we need to find \(f\) such that \(f_x = 3x^2y+2x\) and \(f_y = x^3+1\text{.}\) As all we know about \(f\) are its partial derivatives, we recover \(f\) by integration:
\begin{equation*}
\int \frac{\partial f}{\partial x}\, dx = f(x,y) + C(y)\text{.}
\end{equation*}
Note how the constant of integration is more than “just a constant”: it is anything that acts as a constant when taking a derivative with respect to
\(x\text{.}\) Any function that is a function of
\(y\) (containing no
\(x\)’s) acts as a constant when deriving with respect to
\(x\text{.}\)
Integrating \(f_x\) in this example gives:
\begin{equation*}
\int \frac{\partial f}{\partial x}\, dx = \int (3x^2y+2x)\, dx = x^3y+x^2 + C_1(y)\text{.}
\end{equation*}
Likewise, integrating \(f_y\) with respect to \(y\) gives:
\begin{equation*}
\int \frac{\partial f}{\partial y}\, dy = \int( x^3+1)\, dy = x^3y+ y + C_2(x)\text{.}
\end{equation*}
These two results should be equal with appropriate choices of \(C_1(y)\) and \(C_2(x)\text{:}\)
\begin{equation*}
x^3y+x^2 + C_1(y) = x^3y+ y + C_2(x) \Rightarrow C_2(x) = x^2 \text{ and } C_1(y) = y\text{.}
\end{equation*}
We find
\(f(x,y) = x^3y+x^2+y\text{,}\) a potential function of
\(\vec F\text{.}\) (If
\(\vec F\) were not conservative, no choice of
\(C_2(x)\) and
\(C_1(y)\) would give equality.)
By the Fundamental Theorem of Line Integrals, regardless of the path from \(A\) to \(B\text{,}\)
\begin{align*}
\int_A^B\vec F\cdot d\vec r \amp = f(B) - f(A)\\
\amp = f(1,4) - f(0,1)\\
\amp = 9 - 1 = 8\text{.}
\end{align*}
To illustrate the validity of the Fundamental Theorem, we pick a path from \(A\) to \(B\text{.}\) The line between these two points would be simple to construct; we choose a slightly more complicated path by choosing the parabola \(y = x^2+2x+1\text{.}\) This leads to the parametrization \(\vrt = \la t, t^2+2t+1\ra\text{,}\) \(0\leq t\leq 1\text{,}\) with \(\vrp(t) = \la t, 2t+2\ra\text{.}\) Thus
\begin{align*}
\int_C \vec F\cdot d\vec r \amp = \int_C\vec F\big(\vrt\big)\cdot\vrp(t)\, dt\\
\amp = \int_0^1\la 3(t)(t^2+2t+1)+2t, t^3+1\ra\cdot\la t,2t+2\ra\, dt\\
\amp = \int_0^1 \big(5t^4+8t^3+3t^2+4t+2\big)\, dt\\
\amp = \big(t^5+2t^4+t^3+2t^2+2t\big)\Big|_0^1\\
\amp = 8\text{,}
\end{align*}
which matches our previous result.