Here is an example where the method of integrating factor does not work.
Here \(p=1,q=\frac {1}{x},r=\frac {1}{x},f\left ( x\right ) =0\). The condition of exactness is
Is not satisfied. Hence the ode is not exact. Therefore let us try to find \(M\). Using
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}\))
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
Since \(M^{\prime }=\frac {1}{2}qM\) and since
Then (2A) now becomes
By comparing the above to the given ode in normal form shows that for \(M\) to exist the condition is
if the above is true, then \(M\) exists and is given by
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.