You are on page 1of 11

Chapter 1

First-Order ODEs

1.1 Basic Concepts. Modeling

※ Ordinary Differential Equation (常微分方程)

Physical laws and relations are almost always described by differential equations

mathematically (i.e., F  ma , V 2  V02  2ax ). An ordinary differential equation is

an equation that contains one or several derivatives of an unknown function which


depends on only one single variable. The function may also contain the function itself,
and constants. For example
y   sin x where y   dy / dx
y   4 y  sin 2 x where y  d 2 y / dx 2
2 x 2 y   3 xy   y  0

Other differential equations, e.g., partial differential equations (PDEs, 偏微分方程)


 2u  2u
 0.
x 2 y 2

In this chapter, we shall consider first-order ODEs ( 一 階 常 微 分 方 程 ). Such


equations contain only first derivative y  and may contain y and any given functions of
x and thus can be written as

F ( x, y, y )  0 ,

or often in the form

y   f ( x, y ) .

※ Concept of solution (解)

A function
y  h (x )

is called a solution of a given ODE F ( x, y, y )  0 on some open interval


a  x  b if h (x) is defined and differentiable throughout the interval and is such that it
satisfies F ( x, y, y )  0 .

Example:

1
dy
y  2 x  c (c is an arbitrary constant) is a family of solutions of y   2 . Such a
dx
solution containing an arbitrary constant c is called a general solution (通解) of the
ODE. If we choose a specific c (e.g., 1 or 0 or -1) we obtain what is called a particular
solution (特解) of the ODE. A particular solution does not contain any arbitrary
constants.

※ Initial Value Problem (初始值問題)


In most cases the unique solution (唯一解) of a given problem is obtained from a
general solution by an initial condition y ( x0 )  y 0 (初始條件), with given values
of x0 and y 0 , that is used to determine a value of the arbitrary constant c.
Geometrically this condition means that the solution curve should pass through the
point ( x 0 , y 0 ) in the xy-plane. An ODE together with an initial condition is called an
initial value problem. If the ODE is y   f ( x, y ) , the initial value problem is of the
form
y   f ( x, y ), y ( x0 )  y 0 .

Example:

Solve the initial value problem


dy
y   y , y (0)  2 .
dx
The general solution: y ( x)  ce  x .
The initial condition gives y (0)  ce 0  c  2 .
The unique solution: y ( x)  2e  x .

※ Modeling (模擬)

2
Three steps:

I: Mathematical formulation of the physical problem


II: Solve the equation
III: Interpretation of the result

Example: Falling body

If we drop a stone, we can assume air resistance to be negligible. Experiments show


that under that assumption the acceleration of this motion is constant. State this as an
ODE for y (t ) , the distance fallen as a function of time t:

y   d 2 y dt 2  g , y (0)  V (0)  0 , y (0)  0 .

Solve the ODE to the get the familiar law of free fall y  gt 2 2 .

3
1.3 Separable ODEs (可分離常微分方程). Modeling

Many practically useful ODEs can be reduced to the form of

g ( y ) y   f ( x)

by purely algebraic manipulations. Then we can integrate on both sides with respect
to x, obtaining

 g ( y) ydx   f ( x)dx  c .
On the left we can switch to y as the variable of integration. By calculus, y dx  dy ,
so that

 g ( y)dy   f ( x)dx  c
This method is called the method of separating variables (分離變數法).

Example:

Solve y   ( x  2) y 2  0 .

Solution:

dy
 ( x  2) y 2  0
dx

dy
  ( x  2) dx
y2

1 x2
   2x  c
y 2

1 2
 y  2 .
x 2  2 x  c x  4 x  2c
2

※ Extended method: Reduction to Separable Form

Certain non-separable ODEs can be made separable by transformations that introduce


a new unknown function. We discuss this technique for a class of ODEs of practical
importance, namely, for equations

y   f ( y x) .

4
Here, f is any (differentiable) function of y x , such as  y x 2 , ln y x  , and so on.
The form of such an ODE suggests that we set y x  u ; thus

dy
y  ux and y   u x  u .
dx

Substitution into y   f ( y x ) gives

u x  u  f (u ) or u x  f (u )  u .

We see that this can be separated

du dx
 .
f (u )  u x

Example:

Find the unique solution for the initial value problem.

2 xyy   3 y 2  x 2 , y (1)  2 .

Solution:

dy y x
2 3 
dx x y

y dy 1
Now let  u and y    u x  u , thus we have 2 (u x  u )  3u 
x dx u

1 u2 1
 2u x  u  
u u

u du dx
2 
u 1 x
2

 ln (u 2  1)  ln x  c

 u 2  1  cx

 y   x cx  1

Applying I.C.: y (1)  2 gives c  5 .

 y   x 5x  1 .

5
1.4 Exact ODEs (正合常微分方程式). Integrating Factors (積分因子)

Recall from calculus, if a function u ( x, y ) has continuous partial derivatives, its


differential is

u u
du  dx  dy .
x y

From this it follows that if u ( x, y )  c  const. then du  0 . This idea leads to a


powerful solution as follows. A first-order ODE of the form

M ( x, y )dx  N ( x, y ) dy  0

is called an exact (正合) differential if the differential form M ( x, y )dx  N ( x, y ) dy is


exact. That is, this form is the differential

u u
du  dx  dy
x y

of some function u ( x, y ) . Then M ( x, y )dx  N ( x, y ) dy  0 can be written as

du  0 .

By integrating we obtain the general solution of M ( x, y )dx  N ( x, y ) dy  0 in the


form

u ( x, y )  c .

This is called the implicit form (隱式形式), in contrast with a solution y  h (x) as
defined in §1.1, which is also called an explicit solution (顯式解).

u u
Comparing M ( x, y )dx  N ( x, y ) dy  0 and du  dx  dy , we see that the
x y
former is an exact differential if there is some function u ( x, y ) such that

u u
(a) M (b) N
x y

From this we derive a formula for checking whether M ( x, y )dx  N ( x, y ) dy  0 is


exact or not, as follows. Let M and N be continuous and have continuous first
derivatives in a region in the xy-plane whose boundary is a closed curve without
u u
self-intersections. Then by partial differentiation of  M and N
x y

M  2u  2u N
   .
y yx xy x
6
This condition is not only necessary but also sufficient for
M ( x, y )dx  N ( x, y ) dy  0 to be an exact differential equation.

If M ( x, y )dx  N ( x, y ) dy  0 is exact, the function can be found by inspection or in


u
the following systematic way. From  M we have by integration with respect to
x
x

u   Mdx  k ( y)

u
To determine k ( y ) , we derive u y from u   Mdx  k ( y) , use  N to get
y
dk dy , and integrate dk dy to get k.

Example:

Determine a general solution for the ODE

  sin x sinh y dx  cos x cosh y dy  0 .

Solution:

M   sin x sinh y

N  cos  x cosh y

M N
  sin x cosh y  ∴ the ODE is exact
y x

Determination of u ( x, y )

u   Mdx  k ( y)  cos x sinh y  k ( y)

u dk ( y )
 cos  x cosh y   N  cos  x cosh y k ( y )  c
y dy

The general solution is

u  cos  x sinh y  c .

※ Reduction to Exact Form. Integrating Factors (積分因子)

Suppose the following ODE is not exact

7
P( x, y ) dx  Q( x, y ) dy  0

We multiply P( x, y ) dx  Q( x, y ) dy  0 by a function F, in general, will be function


of both x and y. This results in the following equation

P( x, y ) F ( x, y ) dx  Q( x, y ) F ( x, y ) dy  0

that is exact. Such a function F ( x, y ) is called an integration factor of


P( x, y ) dx  Q( x, y ) dy  0 .

Example:

Solve the ODE: ( y  x 2 ) dx  dy  0

Solution:

F ( x, y ) ( y  x 2 ) dx  F ( x, y ) dy  0

This equation is exact: ( y  x 2 ) F y  F  Fx .

Consider the case that the integration factor is solely a function of x.

( y  x 2 ) F y  F  Fx reduces to

F  Fx this implies that F  ex

Multiplying the original ODE by this integration factor gives

( y  x 2 ) e x dx  e x dy  0

Determination of u ( x, y )

u   ( y  x 2 ) e x dx  ye x  x 2 e x  2 xe x  2e x  k ( y)

u
 e x  k ( y)  e x k ( y )  0 k ( y )  const.
y

The general solution: ye x  x 2 e x  2 xe x  2e x  c . check!

8
1.5 Linear ODEs ( 線 性 常 微 分 方 程). Bernoulli Equation ( 柏 努 利 方 程 式 ).
Population Dynamics (族群動態)

A 1st order linear ODE is defined when the differential equation is linear in both y ( x)
and its first order derivative dy ( x) / dx . That is, there is no multiplication between
y ( x) and dy ( x) / dx in the 1st order ODE. Therefore, a first-order ODE is said to be
linear if it can be written as

y   p ( x) y  r ( x)

after algebraic manipulations.

※ Homogeneous Linear ODE (齊性線性常微分方程)

A homogeneous linear differential equation is when a linear ODE is a homogeneous


function of the unknown function and its derivatives. That is, if y ( x)  f ( x) is a
solution, so is cf ( x) for any non-zero constant c. In order for this condition to hold,
each nonzero term of the linear differential equation must depend on y ( x) or any
derivative of y ( x) .

y   p ( x) y  0

dy
 p ( x) y  0
dx

dy
  p( x) dx
y

Thus

ln y   p( x) dx  c *

Taking exponents on both sides, we obtain the general solution of y   p ( x) y  0

y ( x )  ce 
 p ( x ) dx
.

※ Nonhomogeneous Linear ODE (非齊性線性常微分方程)

Rewrite y   p ( x) y  r ( x) as

( py  r ) dx  dy  0 (reduction to exact form)

Find the integration factor F ( x, y )

9

F ( py  r )  Fy ( py  r )  Fp  Fx
y

Consider that the integration factor is solely a function of x

dF
Fp  Fx then  p ( x) dx
F

Therefore

F ( x, y )  F ( x )  e 
pdx

Multiply y   p ( x) y  r ( x) on both sides by this F. Then by the product rule

e ( y   py )  (e  y)  e 
pdx pdx pdx
r

By integrating the second and third terms of these three expressions with respect to x

e y   e
pdx pdx
r dx  c

Let h( x)   p( x) dx , we then have


y( x)  e  h  e h r dx  c ,  h( x)   p( x) dx .

Example:

2
y  y  2 (1  ln x)
x

Solution:

2 1
h( x )   dx  2 ln x , e h 
x x2

 x3 x3 x3   2x 3 x 3 
  2  x 2 (1  ln x) dx  2   ln x    2   ln x 
 3 3 9   9 3 

1   2x3 x 3  
 y ( x)  2  2   ln x   c  .
x   9 3  

10
※ Reduction to Linear Form. Bernoulli Equation

A Bernoulli equation is an ODE of the form

y   p ( x) y  g ( x) y a .

It can be seen that if a  0 or a  1 , the ODE is linear. Otherwise it is nonlinear. Let

u ( x)   y ( x) 
1 a

Then

u   (1  a ) y  a y   (1  a ) y  a ( gy a  py )  (1  a ) ( g  pu )

Rearranging gives the following ODE

u   (1  a) pu  (1  a) g

Example:

1
y  y  (1  ln x) y 3
x

Solution:

du dy
Let u  y 2 then  2 y 3 .
dx dx

The original ODE reduces to

2
u  u  2 (1  ln x) .
x

11

You might also like