• Show that the differential equation \[\begin{equation*} (2x+3x^{2}y)\,dx+(x^{3}+2y-3y^{2})\,dy=0 \tag{1} \end{equation*}\] is an exact differential equation.
  • Find the general solution.
  • Solution (a) Let \(\ M=2x+3x^{2}y\) and \(N=x^{3}+2y-3y^{2}.\) Then \[ \frac{\partial M}{\partial y}=3x^{2}\qquad \hbox{and}\qquad \frac{\partial N }{\partial x}=3x^{2} \]

    Since \(\dfrac{\partial M}{\partial y}=\dfrac{\partial N}{\partial x}\) for all \(x\) and \(y\), the differential equation (1) is exact over the \(xy\)-plane.

    Finding a potential function \(f\) for a conservative vector field \(F\) is discussed in Section 15.3, pp. 995–996.

    (b) Since the differential equation \((2x+3x^{2}y)\,dx +(x^{3}+2y-3y^{2})\,dy=0\) is exact, there is a function \(z=f( x,y)\) so that \[ \frac{\partial f}{\partial x}=M=2x+3x^{2}y\qquad \hbox{and}\qquad \frac{\partial f}{\partial y}=N=x^{3}+2y-3y^{2} \]

    We find \(f\) by integrating \(\dfrac{\partial f}{\partial x}=M=2x+3x^{2}y\) partially with respect to \(x\) (holding \(y\) constant). Then \[ \begin{equation*} f( x,y) =\int ( 2x+3x^{2}y)\,dx=x^{2}+x^{3}y+B(y) \tag{2} \end{equation*}\]

    where the constant of integration is a function \(B\) of \(y\) alone, which is as yet unknown. To determine \(B(y)\), we use the fact that \(f\) must also satisfy \(\dfrac{\partial f}{\partial y}=N=x^{3}+2y-3y^{2}\). Then from (2), \[\begin{equation*} \frac{\partial f}{\partial y}=\dfrac{\partial }{\partial y}[ x^{2}+x^{3}y+B(y)] =x^{3}+\dfrac{\partial }{\partial y}B(y)\qquad \hbox{and}\qquad \frac{\partial f}{\partial y}=x^{3}+2y-3y^{2} \end{equation*}\]

    Equating the two expressions, we have \[\begin{eqnarray*} x^{3}+\dfrac{\partial }{\partial y}B(y) &=&x^{3}+2y-3y^{2} \\[4pt] \dfrac{\it dB}{dy} &=&2y-3y^{2}\qquad \color{#0066A7}{{B\hbox{ is a function of }y\hbox{ alone; }\quad \dfrac{\partial B}{\partial y}=\dfrac{dB}{dy}.}} \end{eqnarray*}\]

    Now we integrate \(\dfrac{\it dB}{dy}=2y-3y^{2}\) with respect to \(y.\) \[\begin{equation*} B(y) =\int ( 2y-3y^{2})\,dy=y^{2}-y^{3}+C \end{equation*}\]

    Substituting for \(B(y)\) in (2), we obtain \[\begin{equation*} f(x,y)=x^{2}+x^{3}y+y^{2}-y^{3}+C \end{equation*}\]

    The general solution of the differential equation is \[\begin{equation*} x^{2}+x^{3}y+y^{2}-y^{3}+C=0 \end{equation*}\]

    where \(C\) is a constant.