Introduction and terminology used

An ode \(F\left ( x,y,y^{\prime },y^{\prime \prime }\right ) =0\) is called exact if there exists a function \(R\left ( x,y,y^{\prime }\right ) \) with order one less that of the ode, such that \[ F\left ( x,y,y^{\prime },y^{\prime \prime }\right ) =\frac {d}{dx}R\left ( x,y,y^{\prime }\right ) \] Which also implies that \(R=c\) some constant, because \(F=0\). In the above \(R\left ( x,y,y^{\prime }\right ) \) is called the first integral of the ode \(F\) (also called the reduced ode), because\begin {equation} R=\int Fdx+c \tag {1A} \end {equation} An important property of first integral is the following. If we write the ode \(F\left ( x,y,y^{\prime },y^{\prime \prime }\right ) =0\) as  \(y^{\prime \prime }=\Phi \left ( x,y,y^{\prime }\right ) \) which we can always do, then\begin {equation} R_{x}+y^{\prime }R_{y}+\Phi R_{y^{\prime }}=0 \tag {1B} \end {equation} Lets see how this works. Given the ode \(y^{\prime \prime }+xy^{\prime }+y=0\) which is exact as is from the exactness test \(py^{\prime \prime }+qy^{\prime }+r=0\) which is \(p^{\prime \prime }-q^{\prime }+r=0\), hence \(p=1,q=x,r=1\), therefore \(-1+1=0\) which is true. Therefore we can write because we can write \(y^{\prime \prime }+xy^{\prime }+y=0=\left ( y^{\prime }+B\left ( x\right ) y\right ) ^{\prime }\) and find that \(B=x\), Hence\[ y^{\prime \prime }+xy^{\prime }+y=\left ( y^{\prime }+xy\right ) ^{\prime }\] Where \(y^{\prime }+xy=0\) is the reduced ode. \[ R=y^{\prime }+xy \] For the original ode \(y^{\prime \prime }+xy^{\prime }+y=0\), it can be written as \(y^{\prime \prime }=-\left ( xy^{\prime }+y\right ) \), therefore \(\Phi =-\left ( xy^{\prime }+y\right ) \). Eq (1B) now becomes\begin {align*} R_{x}+y^{\prime }R_{y}+\Phi R_{y^{\prime }} & =0\\ y+y^{\prime }x-\left ( xy^{\prime }+y\right ) \left ( 1\right ) & =0\\ y+y^{\prime }x-xy^{\prime }-y & =0\\ 0 & =0 \end {align*}

Verified. Here is another example. Given the ode \(\left ( x-1\right ) ^{2}y^{\prime \prime }+4y^{\prime }x+2y-2x=0\), this is exact because we can write \(\left ( x-1\right ) ^{2}y^{\prime \prime }+4y^{\prime }x+2y-2x=\frac {d}{dx}\left ( \left ( 2x+2\right ) y+\left ( x^{2}-2x+1\right ) y^{\prime }-x^{2}\right ) \), hence the first integral (or the reduced ode) is \(R=\left ( 2x+2\right ) y+\left ( x^{2}-2x+1\right ) y^{\prime }-x^{2}\). The original ode can be written as \(y^{\prime \prime }=-\frac {\left ( 4y^{\prime }x+2y-2x\right ) }{\left ( x-1\right ) ^{2}}\), therefore \(\Phi =-\frac {\left ( 4y^{\prime }x+2y-2x\right ) }{\left ( x-1\right ) ^{2}}\). Eq (1B) becomes\begin {align*} R_{x}+y^{\prime }R_{y}+\Phi R_{y^{\prime }} & =0\\ \left ( 2y+2xy^{\prime }-2y^{\prime }-2x\right ) +y^{\prime }\left ( 2x+2\right ) -\left ( \frac {4y^{\prime }x+2y-2x}{\left ( x-1\right ) ^{2}}\right ) \left ( x^{2}-2x+1\right ) & =0\\ 0 & =0 \end {align*}

Verified. Equations (1A) and (1B) are important as they will be used to determined an integrating factor when the ode is not exact.