$$\frac{dy}{dx} = p \left( x \right) y + q \left( x \right)$$
Procedure:
– Calculate $I = \int p\left( x \right) \, dx$
– Find the integrating factors $e^{-I \left( x \right)}$ and $e^{I \left( x \right)}$
– Evaluate $\int e^{I \left( x \right)} q \left( x \right) \, dx$
– Hence the solution:
$$y = e^{-I \left( x \right)} \left( \int e^{I \left( x \right)} q \left( x \right) \, dx \right) + C e^{-I \left( x \right)}$$