Ordinary differential equations

Ordinary Differential Equations

Often in Physics, Chemistry, Biology, Geometry, etc there arise equations that relate a function with its derivative, or successive derivatives.

Definition - Ordinary differential equation. An ordinary differential equation (O.D.E.) is a equation that relates an independent variable x, a function y(x) that depends on x, and the successive derivatives of y, y,y,,y(n); it can be written as

F(x,y,y,y,,y(n))=0.

The order of a differential equation is the greatest order of the derivatives in the equation.

Example. The equation y+sen(x)y=2x is a differential equation of order 3.

Deducing a differential equation

To deduce a differential equation that explains a natural phenomenon is essential to understand what a derivative is and how to interpret it.

Example. Newton’s law of cooling states

“The rate of change of the temperature of a body in a surrounding medium is proportional to the difference between the temperature of the body T and the temperature of the medium Ta.”

The rate of change of the temperature is the derivative of temperature with respect to time dT/dt. Thus, Newton’s law of cooling can be explained by the differential equation

dTdt=k(TTa),

where k is a proportionality constant.

Solution of an ordinary differential equation

Definition - Solution of an ordinary differential equation. Given an ordinary differential equation F(x,y,y,y,,y(n)=0, the function y=f(x) is a solution of the ordinary differential equation if it satisfies the equation, that is, if

F(x,f(x),f(x),f(x),,f(n(x))=0.

The graph of a solution of the ordinary differential equation is known as integral curve.

Solving an ordinary differential equations consists on finding all its solutions in a given domain. For that integral calculus is required.

The same manner than the indefinite integral is a family of antiderivatives, that differ in a constant term, after integrating an ordinary differential equation we get a family of solutions that differ in a constant. We can get particular solutions giving values to this constant.

General solution of an ordinary differential equation

Definition - General solution of an ordinary differential equation. Given an ordinary differential equation F(x,y,y,y,,y(n)=0 of order n, the general solution of the differential equation is a family of functions

y=f(x,C1,,Cn),

depending on n constants, such that for any value of C1,,Cn we get a solution of the differential equation.

For every value of the constant we get particular solution of the differential equation. Thus, when a differential equation can be solved, it has infinite solutions.

Geometrically, the general solution of a differential equation corresponds to a family of integral curves of the differential equation.

Often, it is common to impose conditions to the solutions of a differential equation to reduce the number of solutions. In many cases, these conditions allow to determine the values of the constants in the general solution to get a particular solution.

First order differential equations

In this chapter we are going to study first order differential equations

F(x,y,y)=0.

The general solution of a first order differential equation is

y=f(x,C),

so to get a particular solution from the general one, it is enough to set the value of the constant C, and for that we only need to impose one initial condition.

Definition - Initial value problem. The group consisting of a first order differential equation and an initial condition is known as initial value problem:

{F(x,y,y)=0,First order differential equation;y(x0)=y0,Initial condition.

Solving an initial value problem consists in finding a solution of the first order differential equation that satisfies the initial condition.

Example. Recall the first order differential equation of the Newton’s law of cooling, dTdt=k(TTa), where T is the temperature of the body and Ta is the temperature of the surrounding medium.

It is easy to check that the general solution of this equation is

T(t)=Cekt+Ta.

If we impose the initial condition that the temperature of the body at the initial instant is 5 ºC, that is, T(0)=5, we have

T(0)=Cek0+Ta=C+Ta=5,

from where we get C=5Ta, and this give us the particular solution

T(t)=(5Ta)ekt+Ta.

Integral curve of an initial value problem

Example. If we assume in the previous example that the temperature of the surrounding medium is Ta=0 ºC and the cooling constant of the body is k=1, the general solution of the differential equation is T(t)=Cet, that is a family of integral curves. Among all of them, only the one that passes through the point (0,5) corresponds to the particular solution of the previous initial value problem.

Area of a positive function

Existence and uniqueness of solutions

Theorem - Existence and uniqueness of solutions of a first order ODE. Given an initial value problem

{y=F(x,y);y(x0)=y0;

if F(x,y(x)) is a function continuous on an open interval around the point (x0,y0), then a solution of the initial value problem exists. If, in addition, Fy is continuous in an open interval around (x0,y0), the solution is unique.

Although this theorem guarantees the existence and uniqueness of a solution of a first order differential equation, it does not provide a method to compute it. In fact, there is not a general method to solve first order differential equations, but we will see how to solve some types:

Separable differential equations

Definition - Separable differential equation. A separable differential equation is a first order differential equation that can be written as

yg(y)=f(x),

or what is the same,

g(y)dy=f(x)dx,

so the different variables are on different sides of the equality (the variables are separated).

The general solution for a separable differential equation comes after integrating both sides of the equation

g(y)dy=f(x)dx+C.

Example. The differential equation of the Newton’s law of cooling

dTdt=k(TTa),

is a separable differential equation since it can be written as

1TTadT=kdt.

Integrating both sides of the equation we have

1TTadT=kdtlog(TTa)=kt+C,

and solving for T we get the general solution of the equation

T(t)=ekt+C+Ta=eCekt+Ta=Cekt+Ta,

rewriting C=eC as an arbitrary constant.

Homogeneous differential equations

Definition - Homogeneous function. A function f(x,y) is homogeneous of degree n, if it satisfies

f(kx,ky)=knf(x,y),

for any value kR.

In particular, a homogeneous function of degree 0 always satisfies

f(kx,ky)=f(x,y).

Setting k=1/x we have

f(x,y)=f(1xx,1xy)=f(1,yx)=g(yx).

This way, a homogeneous function of degree 0 always can be written as a function of u=y/x:

f(x,y)=g(yx)=g(u).

Definition - Homogeneous differential equation. A homogeneous differential equation is a first order differential equation that can be written as

y=f(x,y),

where f(x,y) is a homogeneous function of degree 0.

We can solve a homogeneous differential equation by making the substitution

u=yxy=ux,

so the equation becomes

ux+u=f(u),

that is a separable differential equation.

Once solved the separable differential equation, the substitution must be undone.

Example. Let us consider the following differential equation 4x3y+y(2y3x)=0.

Rewriting the equation in this way

y=3y4x2y3x

we can easily check that it is a homogeneous differential equation.

To solve this equation we have to do the substitution y=ux, and we get

ux+u=3ux4x2ux3x=3u42u3

that is a separable differential equation.

Separating the variables we have

ux=3u42u3u=2u2+6u42u32u32u2+6u4du=1xdx.

Now, integrating both sides of the equation we have

2u32u2+6u4du=1xdx12log|u23u+2|=log|x|+Clog|u23u+2|=2log|x|2C,

then, applying the exponential function to both sides and simplifying we get the general solution

u23u+2=e2log|x|2C=e2Celog|x|2=Cx2,

rewriting the constant K=e2C.

Finally, undoing the initial substitution u=y/x, we arrive at the general solution of the homogeneous differential equation

(yx)23yx+2=Kx2y23xy+2x2=K.

Linear differential equations

Definition - Linear differential equation A linear differential equation is a first order differential equation that can be written as

y+g(x)y=h(x).

To solve a linear differential equation we try to write the left side of the equation as the derivative of a product. For that we multiply both sides by the function f(x), such that

f(x)=g(x)f(x).

Thus, we get

yf(x)+g(x)f(x)y=h(x)f(x)yf(x)+f(x)y=h(x)f(x)ddx(yf(x))=h(x)f(x)

Integrating both sides of the previous equation we get the solution

yf(x)=h(x)f(x)dx+C.

On the other hand, the unique function that satisfies f(x)=g(x)f(x) is

f(x)=eg(x)dx,

so, substituting this function in the previous solution we arrive at the solution of the linear differential equation

yeg(x)dx=h(x)eg(x)dxdx+C,

or what is the same

Solution of a linear differential equation.

y=eg(x)dx(h(x)eg(x)dxdx+C).

Example. If in the differential equation of the Newton’s law of cooling the temperature of the surrounding medium is a function of time Ta(t), then the differential equation

dTdt=k(TTa(t)),

is a linear differential equation since it can be written as

TkT=kTa(t),

where the independent term is kTa(t) and the coefficient of T is k.

Substituting in the formula of the general solution of a linear differential equation we have

y=ekdt(kTa(t)ekdtdt+C)=ekt(kTa(t)ektdt+C).

In the particular case that Ta(t)=t, and the proportionality constant k=1, the general solution of the linear differential equation is

y=et(tektdt+C)=et(et(t+1)+C)=Cet+t+1.

If, in addition, we know that the temperature of the body at time t=0 is 5 ºC, that is, we have the initial condition T(0)=5, then we can compute the value of the constant C,

y(0)=Ce0+0+1=5C+1=5C=4, and we get the particular solution

y(t)=4et+t+1.

Previous
Next