]>

## Solution of a linear first order ODE

A linear first order ODE expresses the unknown function f(t) to only the first power. In comparison, non-linear ODEs have terms that involve higher powers of the unknown function or contain the unknown function as part of another non-linear function. Examples are ${\left[f\left(t\right)\right]}^{2}$ and ln(f(t)). Linear first order ODEs have a simple formula that solves for the unknown function. This makes their solution very straightforward.

Suppose the linear first order ODE is written in general as

$\frac{df\left(t\right)}{dt}+p\left(t\right)f\left(t\right)=g\left(t\right)$

where f(t) is the unknown function that we are solving for, and p(t) and g(t) are any other “simple” functions. Often p(t) and g(t) are any other KNOWN "simple" functions.

[Note that p(t) and g(t) do not need to be linear functions in order for this to be a linear ODE. This is a mistake that students often make in identifying linear ODEs. Only the unknown function f(t) needs to be expressed in only the first power.]

Then the solution for this ODE is

$f\left(t\right)=\frac{1}{u\left(t\right)}\left[{\int }_{t}u\left(s\right)g\left(s\right)ds+c\right]$

where

$u\left(t\right)=\mathrm{exp}\left[{\int }_{t}p\left(s\right)ds\right]$

The notation ${\int }_{t}p\left(s\right)ds$ means “do the indefinite integration” of the function p(s). Thus if $p\left(s\right)={s}^{2}$ then ${\int }_{t}p\left(s\right)ds={t}^{3}/3$ . Or if $p\left(s\right)=\alpha$ , a constant; then ${\int }_{t}p\left(s\right)ds=\alpha t$ .

Finally, the arbitrary constant of integration, c, is determined using what is called the ODE’s initial condition. This is a specification of the value of the solution function ${f}_{0}$ at some particular point ${t}_{0},{f}_{0}=f\left({t}_{0}\right)$ . When solving ODEs you are usually given both the ODE to solve AND the initial condition. If the initial condition is not given, then the solution function f(t) is known up to a arbitrary constant.

Solving linear first order ODEs is just an exercise in indefinite integration, which you learned in freshman calculus!