First-order linear differential equations

In this post, we'll see how we solve first-order linear differential equations.



Consider the following first-order homogeneous linear differential equation

(Eq:homdiff)y+p(x)y=0. 

By separating variables, we have

dyy=p(x)dx.

Integrating both sides gives

log|y|=p(x)dx+c

so that

(Eq:homsol)y=Cep(x)dx

where C is a constant.

Example. Let's solve

y+2y=0.

By separating variables, we have

dyy=2dx.

Integrating both sides,

log|y|=2x+c.

Exponentiating both sides, we have

y=Ce2x.

where C is a constant. □

Method of variation of parameters

Next, consider the inhomogeneous differential equation

(Eq:inhomdiff)y+p(x)y+q(x)=0.

As we have learned in a previous post, we need to find one special solution to construct the general solution. How do we find a special solution?

See also: Linear differential equations: Introduction

Here's one way. This is called the method of variation of parameters. That is, we replace the constant (paramater) C in the solution (Eq:homsol) of the homogeneous case (Eq:homdiff) with a function C(x):

y=C(x)Y(x)

where Y(x)=exp(p(x)dx) is a solution of the homogeneous equation. Noting that Y+p(x)Y=0,

y+p(x)y+q(x)={C(x)Y(x)}+p(x)C(x)Y(x)+q(x)=Y(x)C(x)+q(x).

If y=C(x)Y(x) is a solution, then we must have Y(x)C(x)+q(x)=0, which gives

C(x)=q(x)ep(x)dx.

Integrating this yields

C(x)=q(x)ep(x)dxdx.

Therefore,

y=ep(x)dxq(x)ep(x)dxdx

is a special solution.


Example. Let's solve

(Eq:eg2)y+2y3e4x=0.

First, solving the homogeneous ODE

y+2y=0,

we have

y=Ce2x.

Replacing the constant C with a function p(x), let y(x)=p(x)e2x.

Then, we have y=p(x)e2x2p(x)e2x. Substituting this into (Eq:eg2),

p(x)e2x2p(x)e2x+2p(x)e2x3e4x=0

so that

p(x)=3e6x.

Integrating both sides, we have

p(x)=12e6x+C

where C is a constant. Therefore, the general solution is given by

y=(12e6x+C)e2x=12e4x+Ce2x

where C is a constant. □

Comments

Popular posts from this blog

Birth process

Branching processes: Mean and variance

Informal introduction to formal logic