Example 2 Here is an example where the method of integrating factor does not work. \[ y^{\prime \prime }+\frac {1}{x}y^{\prime }+\frac {1}{x}y=0 \] Here \(p=1,q=\frac {1}{x},r=\frac {1}{x},f\left ( x\right ) =0\). The condition of exactness is\begin {align*} p^{\prime \prime }-q^{\prime }+r & =0\\ 0-\left ( -\frac {1}{x^{2}}\right ) +\frac {1}{x} & =0 \end {align*}

Is not satisfied. Hence the ode is not exact. Therefore let us try to find \(M\). Using\begin {align*} M & =e^{\frac {1}{2}\int qdx}\\ & =e^{\frac {1}{2}\ln x}\\ & =\sqrt {x} \end {align*}

Therefore \(M^{\prime }=\frac {1}{2}x^{\frac {-1}{2}}\) and \(M^{\prime \prime }=-\frac {1}{4}x^{\frac {-3}{2}}\). Substituting these in (4) to verify gives (using \(r=x^{-1}\))\begin {align*} -\frac {1}{4}x^{\frac {-3}{2}}-x^{\frac {1}{2}}\left ( x^{-1}\right ) & =0\\ -\frac {1}{4}x^{\frac {-3}{2}}-x^{-\frac {1}{2}} & =0 \end {align*}

Which does not verify as the LHS is not zero. Therefore the integrating method did not work on this ode.

An easier method to find if an \(M\) integrating factor exists is the following. Since \(M=e^{\frac {1}{2}\int qdx}\) then substituting this into (2A) gives\[ y^{\prime \prime }+y^{\prime }\left ( 2\frac {M^{\prime }}{M}\right ) +\frac {M^{\prime \prime }}{M}y=f\left ( x\right ) \] Since \(M^{\prime }=\frac {1}{2}qM\) and since \begin {align*} M^{\prime \prime } & =\frac {1}{2}\left ( q^{\prime }M+qM^{\prime }\right ) \\ & =\frac {1}{2}\left ( q^{\prime }M+\frac {1}{2}q^{2}M\right ) \end {align*}

Then (2A) now becomes\begin {align*} y^{\prime \prime }+y^{\prime }\left ( 2\frac {\frac {1}{2}qM}{M}\right ) +\frac {\frac {1}{2}\left ( q^{\prime }M+\frac {1}{2}q^{2}M\right ) }{M}y & =f\\ y^{\prime \prime }+qy^{\prime }+\frac {1}{2}\left ( q^{\prime }+\frac {1}{2}q^{2}\right ) y & =f \end {align*}

By comparing the above to the given ode in normal form shows that for \(M\) to exist the condition is \[ r=\frac {1}{2}\left ( q^{\prime }+\frac {1}{2}q^{2}\right ) \] if the above is true, then \(M\) exists and is given by \[ M=e^{\frac {1}{2}\int qdx}\] Using this method on the first example above \(y^{\prime \prime }-4xy^{\prime }+\left ( 4x^{2}-2\right ) y=0\), where \(q=-4x\) and \(r=\left ( 4x^{2}-2\right ) \). Checking if \(\left ( 4x^{2}-2\right ) =\frac {1}{2}\left ( q^{\prime }+\frac {1}{2}q^{2}\right ) \), then \(\frac {1}{2}\left ( -4+\frac {1}{2}\left ( 16x^{2}\right ) \right ) =\allowbreak 4x^{2}-2=r\). Hence \(M\) exists. This is a much faster method to determine if \(M\) exists or not.  

The second example \(y^{\prime \prime }+\frac {1}{x}y^{\prime }+\frac {1}{x}y=0\) where \(q=\frac {1}{x},r=\frac {1}{x}\), then \(\frac {1}{2}\left ( q^{\prime }+\frac {1}{2}q^{2}\right ) =\frac {1}{2}\left ( -x^{-2}+\frac {1}{2}x^{-2}\right ) =-\frac {1}{4x^{2}}\neq r\). Therefore no \(M\) exists and the integration factor does not exist for this ode. Note this does not mean there is no integrating factor. It just means this short cut method which I call the \(M\) integrating factor does not work.