Existence-Uniqueness Theorem for First-Order Differential Equation

Theorem
Let $P$ and $Q$ be continuous real functions on some open interval $I \subseteq \R$.

Let $a \in I$.

Let $b \in \R$.

There exists a unique function $\map f x = y$ on $I$ that satisfies the linear first order ordinary differential equation:


 * $(1): \quad y' + \map P x y = \map Q x$

along with the initial condition:


 * $\map f a = b$

This function is:


 * $\ds \map f x = be^{-\map A x} + e^{-\map A x} \int_a^x \map Q t e^{\map A t} \rd t$

where $\ds \map A x = \int_a^x \map P t \rd t$

Existence
Because $P$ and $Q$ are continuous, they are integrable.

Hence we may use the Fundamental Theorem of Calculus.

Therefore:
 * $\map {f'} x + \map P x \map f x = \map Q x$

For the initial condition:

Uniqueness
Let $f$ be a solution to $(1)$ which satisfies the initial condition.

Let $\map g x = \map f x e^{\map A x}$.

Moreover:
 * $\map g a = b$

By the Fundamental Theorem of Calculus:


 * $\ds \map g x = \int_a^x \map Q t e^{\map A t} \rd t + b$

Furthermore:
 * $\map f x = \map g x e^{-\map A x}$

Therefore, we can conclude that:


 * $\ds \map f x = b e^{-\map A x} + e^{-\map A x} \int_a^x \map Q t e^{\map A t} \rd t$