Proof of ODE solution It is known that if you have the following differential equation: $$y+P(x)y'=Q(x)$$ Then $y$ is $$\frac{1}{I(x)}\int I(x)Q(x)dx$$ Where $$I(x)=e^{\int P(x) dx}$$ is the integrating factor. So what is the proof of this solution (other than just substituting in for $y$)? I have no idea where to start.
 A: $\space\space\space$ Using an integrating factor is a similar idea to completing the square with a polynomial. You are forcing your differential equation into a form where it is easier to work with. Per your example, we have;
$$y'+P(x)y=Q(x)$$
$\space\space\space$ Now, we want to multiply both sides our equation by a factor, $\mu(x)$, that makes the left-hand side of our equation look like the consequence of the product rule. That is, we want;
$$\mu(x)\cdot y'+\mu(x)P(x)\cdot y=\mu(x)\cdot y'+\mu'(x)\cdot y={d\over dx}\left(\mu(x)\cdot y\right)$$
$\space\space\space$ Therefore, we need our integrating factor to have the property;
$$\mu'(x)=\mu(x)P(x)$$
$\space\space\space$ The most obvious way to achieve this property is to use an exponential function;
$$\mu(x)=e^{\int P(x)dx} \implies \mu'(x)={d\over dx}\left(\int P(x)dx\right)\cdot e^{\int P(x)dx}=P(x)\cdot\mu(x)$$
$\space\space\space$ So, making our integrating factor of the form, $e^{\int P(x)dx}$, allows us to write our differential equation as;
$${d\over dx}\left(y\cdot \mu(x)\right)=\mu(x)Q(x)$$
$\space\space\space$ Integrating by $dx$ on both sides of our equation yields our solution...
$$y(x)={1\over \mu(x)}\int\mu(x)Q(x)dx$$
