# Linear Differential Equations of First Order

## Definition of Linear Equation of First Order

A differential equation of type

where \(a\left( x \right)\) and \(f\left( x \right)\) are continuous functions of \(x,\) is called a linear nonhomogeneous differential equation of first order. We consider two methods of solving linear differential equations of first order:

- Using an integrating factor;
- Method of variation of a constant.

## Using an Integrating Factor

If a linear differential equation is written in the standard form:

the integrating factor is defined by the formula

Multiplying the left side of the equation by the integrating factor \(u\left( x \right)\) converts the left side into the derivative of the product \(y\left( x \right) u\left( x \right).\)

The general solution of the differential equation is expressed as follows:

where \(C\) is an arbitrary constant.

## Method of Variation of a Constant

This method is similar to the previous approach. First it's necessary to find the general solution of the homogeneous equation:

The general solution of the homogeneous equation contains a constant of integration \(C.\) We replace the constant \(C\) with a certain (still unknown) function \(C\left( x \right).\) By substituting this solution into the nonhomogeneous differential equation, we can determine the function \(C\left( x \right).\)

The described algorithm is called the method of variation of a constant. Of course, both methods lead to the same solution.

## Initial Value Problem

If besides the differential equation, there is also an initial condition in the form of \(y\left( {{x_0}} \right) = {y_0},\) such a problem is called the initial value problem (IVP) or Cauchy problem.

A particular solution for an IVP does not contain the constant \(C,\) which is defined by substitution of the general solution into the initial condition \(y\left( {{x_0}} \right) = {y_0}.\)

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

Solve the equation \[y' - y - x{e^x} = 0.\]

### Example 2

Solve the differential equation \[xy' = y + 2{x^3}.\]

### Example 1.

Solve the equation \[y' - y - x{e^x} = 0.\]

Solution.

We rewrite this equation in standard form:

We will solve this equation using the integrating factor

Then the general solution of the linear equation is given by

### Example 2.

Solve the differential equation \[xy' = y + 2{x^3}.\]

Solution.

We will solve this problem by using the method of variation of a constant. First we find the general solution of the homogeneous equation:

which can be solved by separating the variables:

where \(C\) is a positive real number.

Now we replace \(C\) with a certain (still unknown) function \(C\left( x \right)\) and will find a solution of the original nonhomogeneous equation in the form:

Then the derivative is given by

Substituting this into the equation gives:

Upon integration, we find the function \({C\left( x \right)}:\)

where \({C_1}\) is an arbitrary real number.

Thus, the general solution of the given equation is written in the form