Definition

Let be an ODE.

If there exist a function s.t. , then is called an integrating factor

Finding

If and , then . If depends only on ,

If and , similarly, . If depends only on ,

Examples

&e^{x} + (e^{x}\cot(y) + 2y \csc(y))y' = 0\\ &\underbrace{e^{x}}_{P}dx + \underbrace{(e^{x}\cot(y) + 2y \csc(y))}_{Q}dy = 0\\ &P_{y}=0,\quad Q_{x}=e^{x}\cot(y), \quad R(x) = \frac{Q_{x}-P_{y}}{P}=\cot(y), F(y)=\exp(\int\cot(y)dy)=\sin(y)\\ &\underbrace{\sin(y)e^{x}}_{P'}dx + \underbrace{(e^{x}\cos(y) + 2y)}_{Q'}dy = 0\\ &P'_{y} = Q'_{x} = \cos(y)e^{x}: \text{Exact ODE}\\ &\int p' dx = \sin(y)e^{x} + h(y) = f\\ &f_{y} = e^{x}\cos(y) + h'(y) = (e^{x}\cos(y) + 2y) \Rightarrow h'(y) = 2y \Rightarrow h(y)=y^{2}\\ &f = \sin(y)e^{x} + y^{2}= C \end{aligned}$$