# Integrating factor

In the case of a linear first order homogeneous ODE such as $au'(x)+bu(x)+c=0,\,\,u(0)=n\,$ the equation should always be divided by $a$ so the coefficient of the $u'$ term is unity.

$u'+{\frac {b}{a}}u+{\frac {c}{a}}=0\,$

The integrating factor ($\rho$) is found by exponentiating the integral of the coefficient of the $u$ term with respect to $x$. The integral is indefinate and you don't have to worry about constants of integration.

$\rho =e^{{\int {\frac {b}{a}}dx}}=e^{{{\frac {b}{a}}x}}\,$

Now, multiply the equation by the integrating factor.

$e^{{{\frac {b}{a}}x}}u'+{\frac {b}{a}}e^{{{\frac {b}{a}}x}}u+{\frac {c}{a}}e^{{{\frac {b}{a}}x}}=0\,$

Notice that the first two terms of the left hand side (LHS) of the equation are the chain rule expansion of

${\frac {d}{dx}}\left[e^{{{\frac {b}{a}}x}}u\right]=-{\frac {c}{a}}e^{{{\frac {b}{a}}x}}\,$

Integrate both sides with respect to x, and here constants of integration are required again.

$e^{{{\frac {b}{a}}x}}u=-{\frac {c}{b}}e^{{{\frac {b}{a}}x}}+c_{1}\,$

$u(x)=-{\frac {c}{b}}+c_{1}e^{{-{\frac {b}{a}}x}}\,$

Plugging in 0 for the IC,

$u(0)=-{\frac {c}{b}}+c_{1}=n\,$

$c_{1}={\frac {c}{b}}+n\,$

So the unique solution for this IC is

$u(x)=-{\frac {c}{b}}+\left({\frac {c}{b}}+n\right)e^{{-{\frac {b}{a}}x}}\,$