DEFINITION. The general first-order linear differential equation is

(1)

Unless otherwise stated, the functions and are assumed to be
continuous functions of time. The equation

(2)

is called the homogeneous first-order linear differential equation, and
Equation (1) is called the nonhomogeneous first-order linear differential
equation for not identically zero.

Fortunately, the homogeneous equation (2) can be solved quite easily. One can show that the general solution of (2)

(3)

where is any real number.

First, divide both sides of the equation by and rewrite it in the form

Second, observe that

where by we mean the natural logarithm of . Hence Equation
(2) can be written in the form

Integrating both sides yields

where is an arbitrary constant of integration. Taking exponentials of
both sides yields

where

is a positive constant. From this it follows that

Note that is a solution of (2), therefore the general solution of (2)
is

where is any real number.

EXAMPLE: Find the general solution of the equation

(4)

Solution 1: By (3) with we have

where is any real number.

Solution 2: If , then

where

is a positive constant. From this it follows that

Note that is a solution of (4), therefore the general solution of (4)
is

where is any real number.

In applications, we are usually not interested in all solutions of (2).
Rather, we are looking for the specific solution which at some initial
time has the value . Thus, we want to determine a function such
that

One can show that

(5)

EXAMPLE: Find the solution of the initial-value problem

Solution 1: By (5) with and we have

We have

Solution 2: We have

where
is a positive constant. Since , we get

We have

hence

so

Note that
,
since . Therefore
.

EXAMPLE: Find the solution of the initial-value problem

Solution: By (5) with and we have

We return now to the nonhomogeneous equation

One can show that

where

It should be clear from our analysis of the homogeneous equation that the
way to solve the nonhomogeneous equation is to express it in the form

and then to integrate both sides to solve for ``something". However, the expression

does not appear to be the derivative of some simple
expression. The next logical step in our analysis therefore should be the
following: Can we make the left hand side of the equation to be of
``something"? More precisely, we can multiply both sides of (1) by any
continuous function to obtain the equivalent equation

(6)

(By equivalent equations we mean that every solution of (6) is a solution of
(1) and vice-versa.) Thus, can we choose so that

is the derivative of some simple expression? The answer to this
question is yes, and is obtained by observing that

Hence, the left-hand side of (6) will be equal to the derivative of if
and only if

But this is a first-order linear homogeneous
equation for , i.e.

which we already know how to solve, and since we only need one such function
we set the constant in (3) equal to one and take

The function is called an integrating factor for the nonhomogeneous equation.
For this , Equation (6) can be written as

(7)

To obtain the general solution of the nonhomogeneous equation (1), that
is, to find all solutions of the nonhomogeneous equation, we take the indefinite
integral (anti-derivative) of both sides of (7) which yields

or

Alternately, if we are interested in the specific solution of (1) satisfying
the initial condition , that is, if we want to solve the initial-value
problem

then we can take the definite integral of both sides of (7) between and
to obtain that

or

EXAMPLE: Find the general solution of the equation

(8)

Solution: Here so that

Multiplying both sides of equation (8) by we obtain

which is equivalent to

We first note that
can be rewritten as

Observe that the left-hand side is indeed by the product rule:

Integrating both sides with respect to , we obtain

which gives

We have

and

so

therefore

We have

EXAMPLE: Find the solution of the initial-value problem

(9)

Solution: Here so that

Multiplying both sides of equation (9) by we obtain

which is equivalent to

We first note that
can be rewritten as

Observe that the left-hand side is indeed by the product rule:

Now we can proceed in two ways.

Integrating both sides with respect to , we obtain

which gives

We have

and

so

But , therefore

We have

therefore

becomes

Integrating both sides with respect to , we obtain

which gives

We have

hence

and

hence

So

therefore

We have

which can be rewritten as

We have

EXAMPLE: Find the solution of the initial-value problem

(10)

Solution: An appropriate integrating factor in this case is

Multiplying both sides of equation (10) by we obtain

which is equivalent to

We first note that
can be rewritten as

Observe that the left-hand side is indeed by the product rule:

Integrating both sides with respect to , we obtain

which gives

We have

and

so

Hence,

We have

Imposing the initial condition yields

We have

so that . Thus the required particular solution is

which can be rewritten as

We have

EXAMPLE: Solve

Solution: We first write the given differential equation in standard form. Dividing by yields

(11)

An integrating factor is

Multiplying both sides of equation (11) by we obtain

which is equivalent to

We first note that
can be rewritten as

Observe that the left-hand side is indeed by the product rule:

Integrating both sides with respect to , we obtain