Example ODE 0

Solve an ordinary first order differential equation in $y(x)$ with variable coefficient and variable right hand side: $$ y' + a(x)\, y = f(x) $$ Operator Calculus enables us to abstract as much as possible from the solution $y(x)$ : $$ \left[ \frac{d}{dx} + a(x) \right] y(x) = f(x) $$ We are going to use now the "very useful formula" at the bottom line of the previous chapter that has been transferred to our non-volatile memory, as promised: $$ \frac{d}{dx} + a(x) = e^{ - \int a(x) \, dx} \ \frac{d}{dx}\ e^{ + \int a(x)\, dx} $$ Systematic integration is possible now: $$ e^{- \int a(x)\, dx} \frac{d}{dx} \ e^{+ \int a(x)\, dx} y(x) = f(x) \\ \frac{d}{dx} \ e^{\int a(x)\, dx} y(x) = f(x) e^{\int a(x)\, dx} \\ e^{\int a(x)\, dx} y(x) = \int \left[ f(x) e^{\int a(x)\, dx} \right] dx \\ y(x) = e^{- \int a(x)\, dx} \cdot \int \left[ f(x) e^{\int a(x)\, dx} \right] dx $$ The above derivation provides a sharp contrast with the common heuristics in documents about differential equations. What makes it so special is the fact that this method leads to the solution in a completely natural way. It is not necessary, at all, to make some kind of miraculous assumption about the nature of the solution: that it "must" have the form of an exponential function or some such.