# Linear first order differential equations

## Linear differential equation first order with constant coefficients

One of the simplest differential equations is the first order linear differential equation with constant coefficients.

$y′+ay=b$

$\text{with}\phantom{\rule{1em}{0ex}}a,b\phantom{\rule{0.5em}{0ex}}\in \phantom{\rule{0.5em}{0ex}}\mathbb{R}$

For b = 0 the homogeneous first-order linear differential equation with constant coefficients is available.

$y′+ay=0$

Solution of the homogeneous linear differential equation of first order with constant coefficients:

$y\prime =-ay$

Transformation of the equation

$\frac{y\prime }{y}=-a$

Division by y

$\left(\mathrm{ln}y\right)\prime =-a$

Applying the chain rule

$\mathrm{ln}y=-a\int \mathrm{dx}=-ax+\stackrel{~}{C}$

Integration

${y}_{h}=C{e}^{-ax}$

General solution of the homogeneous equation with undetermined constants C

Variation of the constants:

The solution of the inhomogeneous differential equations can be obtained from the homogeneous one. Generally the solution of the inhomogeneous equation is given by the solution of the homogeneous equation plus a special solution of the inhomogeneous equation. The special solution can be obtained by the method of variation of constants. Here the constant C of the homogeneous solution is assumed as a function of x and the homogeneous solution is inserted into the inhomogeneous equation. C(x) is then determined so that the equation is fulfilled.

${y}_{h}^{\prime }=C\prime {e}^{-ax}-aC{e}^{-ax}$

Derivation of the homogeneous solution with C as a function of x

$C\prime {e}^{-ax}-aC{e}^{-ax}$$-aC{e}^{+ax}$$=b$

Insertion into the inhomogeneous equation

$C\prime =b{e}^{ax}$

By rearranging we obtain an equation for the determination of C

$C=\frac{b}{a}{e}^{ax}$

Integration gives C(x)

${y}_{s}=\frac{b}{a}$

Insertion of C(x) in yh provides a special solution ys

$y={y}_{s}+{y}_{h}=\frac{b}{a}+C{e}^{-ax}$

This is the general solution of the inhomogeneous differential equation with constant coefficients

### Example: Solution of y'+ay=ce^bx

$y′(x)+ay(x)=cebx$

In the first step the homogeneous equation has to be solved.

$y′+ay=0$

Solution of the homogeneous linear differential equation of first order with constant coefficients:

$y\prime =-ay$

Transformation of equation

$\frac{y\prime }{y}=-a$

Division by y

$\left(\mathrm{ln}y\right)\prime =-a$

Applying the chain rule

$\mathrm{ln}y=-a\int \mathrm{dx}=-ax+\stackrel{~}{k}$

Integration

${y}_{h}=k{e}^{-ax}$

General solution of the homogeneous equation with undetermined constants k

Variation of the constants:

${y}_{h}^{\prime }=k\prime {e}^{-ax}-ak{e}^{-ax}$

Derivation of the homogeneous solution with k as a function of x

$k\prime {e}^{-ax}-ak{e}^{-ax}$$+ak{e}^{-ax}$$=c{e}^{bx}$

Insertion into the inhomogeneous equation

$k\prime =c{e}^{\left(a+b\right)x}$

By rearranging we obtain an equation for the determination of k

$k=\frac{c}{a+b}{e}^{\left(a+b\right)x}$

Integration gives k(x)

${y}_{s}=\frac{c}{a+b}{e}^{bx}$

Insertion of k(x) in yh provides a special solution ys

$y={y}_{s}+{y}_{h}=\frac{c}{a+b}{e}^{bx}+k{e}^{-ax}$

This is the general solution of the inhomogeneous differential equation

## Linear first order differential equation

The general linear first order differential equations is given as follows.

$y′+f(x)y=g(x)$

The general solution is obtained by the following formula.

$y(x)=1e∫f(x)dx(∫g(x)e∫f(x)dxdx+C)$

## General terms and notations for differential equations

Differential equations are equations between searched functions and their variables and the derivatives of the searched functions.

Ordinary differential equations (ODE): Ordinary differential equations are equations between searched functions of a variable and the derivatives of the searched functions.

Partial differential equations: A partial differential equation is present if the searched function depends on more than one variable.

Differential equations: Differential equations are equations which contains a function and derivatives of this function.

Order: The order of the differential equations denotes the highest derivative of the function that occurs in the equation. A 1st order equation therefore contains the function and at most the first derivative of the function.

Notations for derivatives:

$d y d x = d d x y(x) = y′(x) = y′$

Direction field of the differential equation:

The explicit ODE defines for each point of the x/y plane the slope of the solution of the ODE that passes through that point. If you plot tangents on a grid of the x/y-plane for the gradient in the grid point, you get the directional field. From the direction field you can estimate the function course for different initial values of the solution. The equation for the directional field is obtained by transforming of the ODE.

$y′=f(xy)$

Initial values:

The general solution of the differential equation is a set of functions parameterized by the constant C. The specification of a special solution is done by specifying initial values. This means the specification of a function value y0 at the position x0. This means that the constant C can be determined from the general solution.

${y}_{0}=\frac{b}{a}+C{e}^{-a{x}_{0}}$

The constant C is determined by:

$C=\left({y}_{0}-\frac{b}{a}\right){e}^{a{x}_{0}}$

## Releated sites

Here is a list of of further useful sites:

Index ODE first order General first order ODE ODE second order ODE-System 2x2 ODE-System 3x3 Exponential growth Logistic growth y'+ay=b y'+ay=ce^bx y'+2xy=xe^(-x^2) y'+xy=x y'+y=x y'=y^2 y'+y^2=1 y'=(Ay-a)(By-b)