To solve the first order linear differential equation of the type dxdyā+Py=Q....(i)
On multiplying both sides of the equation by a function of x say g(x) to get g(x)dxdyā+Pā (g(x))y=Qā g(x)...(ii)
Choose g(x) in such a way that RHS becomes a derivative of yā g(x).
i.e., g(x)dxdyā+Pā g(x)y=dxdā[yā g(x)] āg(x)dxdyā+Pā g(x)y=g(x)dxdyā+ygā²(x) āP(x)=gā²(x)
or P=g(x)gā²(x)ā
Integrating both sides w.r.t. x, we get ā«Pdx=ā«g(x)gā²(x)ādx āā«Pā dx=log(g(x)) āg(x)=eā«Pdx
On multiplying the Eq. (i) by g(x)=eā«Pdx, the LHS becomes the derivative of some function of x and y. This function g(x)=eā«Pdx is called Integrating Factor (IF) of the given differential equation.
On substituting the value of g(x) in Eq. (ii), we get eā«Pdxdxdyā+Peā«Pdxy=Qā eā«Pdx ādxdā(yeā«Pdx)=Qeā«Pdx
On integrating both sides w.r.t. x, we get yā eā«Pdx=ā«(Qā eā«Pdx)dx āy=eāā«Pdxā ā«(Qeeā«Pdx)dx+C
which is the general solution of the differential equation.