Linear First Order ODE/y' + 2y = cos x

Theorem
The linear first order ODE:
 * $(1): \quad \dfrac {\d y} {\d x} + 2 y = \cos x$

has the general solution:
 * $y = \dfrac {2 \cos x + \sin x} 5 + C e^{-2 x}$

Proof
$(1)$ is a linear first order ODE in the form:
 * $\dfrac {\d y} {\d x} + \map P x y = \map Q x$

where:
 * $\map P x = 2$
 * $\map Q x = \cos x$

Thus:

Thus from Solution by Integrating Factor, $(1)$ can be rewritten as: