The Mystery of the Integrating Factor The other day I was taught that to solve equations of the form
$$
f'+pf=q,
$$
where $f=f(t)$, $p=p(t)$ and $q=q(t)$, I need to use a function, or integrating factor, $\mu=\mu(t)$ such that
$$
\mu'=\mu p.
$$
However, how do I know that such function $\mu$ exists at all? In other words, can I always find $\mu$?

Subject to some assumptions, you can figure out what $\mu$ must look like. Consider that you have
$$\frac{d\mu}{d x} = \mu \cdot p(x)$$
Separating variables and integrating:
$$\int \frac{d\mu}{\mu} = \int p(x) dx$$
which implies that
$$\log \mu = \int p(x) dx$$
or
$$\mu(t) = \exp \left( \int_{t_0}^t p(x) dx \right)$$
So as long as $p(x)$ has a first integral, the function $\mu(x)$ exists.
