Second Order ODE/y'' - f(x) y' + (f(x) - 1) y = 0

Theorem
The second order ODE:
 * $(1): \quad y'' - \map f x y' + \paren {\map f x - 1} y = 0$

has the general solution:
 * $\ds y = C_1 e^x + C_2 e^x \int e^{-2 x + \int \map f x \rd x} \rd x$

Proof
Note that:
 * $1 - \map f x + \paren {\map f x - 1} = 0$

so if $y'' = y' = y$ we find that $(1)$ is satisfied.

So:

and so:
 * $y_1 = e^x$

is a particular solution of $(1)$.

$(1)$ is in the form:
 * $y'' + \map P x y' + \map Q x y = 0$

where:
 * $\map P x = -\map f x$

From Particular Solution to Homogeneous Linear Second Order ODE gives rise to Another:
 * $\map {y_2} x = \map v x \, \map {y_1} x$

where:
 * $\ds v = \int \dfrac 1 { {y_1}^2} e^{-\int P \rd x} \rd x$

is also a particular solution of $(1)$.

We have that:

Hence:

and so:

From Two Linearly Independent Solutions of Homogeneous Linear Second Order ODE generate General Solution:


 * $\ds y = C_1 e^x + C_2 e^x \int e^{-2 x + \int \map f x \rd x} \rd x$