Sei sulla pagina 1di 42

Ordinary Differential Equations (ODE)

Ordinary Differential Equations (ODE)

LEARNING OBJECTIVES

The objectives of this chapter are to:

1. Impart to students the knowledge of ordinary differential equations and their classifications.

2. Impart to students the concept of solutions of differential equations.

3. Equip students with the knowledge of solving first order ordinary differential equations using
the method of separating the variables.

4. Equip students with the knowledge of solving linear first order ordinary differential equations
using integrating factor.

5. Equip students with the knowledge of solving homogenous first order ordinary differential
equations.

6. Equip students with the knowledge of solving linear second order ordinary differential
equations with constant coefficients.

Differential equations form the language in which the basic laws of science are expressed. The science
tells us how the system at hand changes "from one instant to the next." The challenge addressed by the
theory of differential equations is to take this short-term information and obtain information about
long-term overall behavior. So the art and practice of differential equations involves the following
sequence of steps: one "models" a system (physical, chemical, biological, economic, or even
mathematical) by means of a differential equation; one then attempts to gain information about
solutions of this equation; and one then translates this mathematical information back into the
scientific context.

Solving’ Behaviour over time


Differential Equation:
Short term information

Model Interpretation

Physical World

SK/EUM111/ODE/09 1
Ordinary Differential Equations (ODE)

A basic example is given by Newton's law, F = ma. a = acceleration, the second derivative of x =
position. Forces don't effect x directly, but only through its derivatives. This is a second order ODE,
and we will study second order ODEs extensively later in the course.

Definition: A differential equation is an equation containing derivatives of an unknown function. A


differential equation (DE) contains one or more terms involving derivatives of one variable (the
dependent variable, y) with respect to another single independent variable (the independent variable,
x) is said to be an ordinary differential equation.

dy dy
In the DE = 7x 2 + 4x + 3 y=f(x) is the unknown function. is the derivative of the
dx dx
unknown function.

dy
For example, x where y is the dependent variable and
dx

x is the independent variable

dx
 xt where x is the dependent variable and
dt

t is the independent variable

The DE is an ordinary DE (ODE) if the unknown function depends on only one independent variable.

The following are ODE

dy
a) = 2x 2 - 4
dx
dx x + 1
(b) =
dt t
dy dy
(c) e y + 2( )3 = 1
dx dx
2
d y dy
(d) ( 2 )3 + 3( ) 6 + y 2 = 5x
dx dx

An equation involving the partial derivatives of one or more terms involving derivatives of one
variable of two or more independent variables is called a partial differential equation.

(Partial differential equations)


u  2 u
 (heat equation)
t x 2

SK/EUM111/ODE/09 2
Ordinary Differential Equations (ODE)

 2u  2u
  0 (Laplace’s equation )
x 2 y 2

Order: The order of a differential equation is the order of the highest derivative that appears in the DE
equation.

First-Order : dy/dx = 3x2+10x+3 , y’ = 3x3+4x+2

Second-Order: d2y/dx2 = 4x + 5, y’’ = 5x4+3

Third-Order: y’’’ = 6x +2

Forth-Order: y(4) = 4x2 + 4x + 7

A general nth-order, ordinary differential equation is often represented by the


symbolism
 dy dn y 
F  x, y, ,..., n 
 dx dx 
Thus first-order differential equations, contain only y' and may contain y and functions of x. Hence it is
written as
F(x, y, y’) = 0
second-order differential equations, contain only y’’ and may contain y’, y and functions of x. Hence it
is written as
F(x, y, y’, y’’) = 0

Degree: The degree of a DE is the highest power of the highest derivative (when the derivatives are
cleared of radicals and fractions).

Linear: A DE. is said to be linear if the dependent variable and its derivative are of degree one and
there are no product involving the dependent variable ,the derivative and in transcendental functions
such as sine, exponential.
A DE is linear if it can be written in the form :
dn y d n 1 y dy
an (x) n +a n 1 (x) n 1 +...+a1 (x) +a 0 (x) y = f(x) . (1)
dx dx dx
Two properties:
i) The dependent variables y and all its derivative are of first degree (power of each term is
involving only 1)
ii) Each coefficient depends on only the independent variable x.
iii) Not involving the dependent variable in transcendental functions such as sine, exponential
.
For example

SK/EUM111/ODE/09 3
Ordinary Differential Equations (ODE)

Differential Equation Linearity

1. dx Linear, ordinary and order is 1


 xt
dt

2. d 2x dx Linear, ordinary and order is 2


2
3 t
dt dt

3. dy 2 non-linear ( y’)2
( ) y
dx

2. dx dx
x  xt non-linear ( x )
dt dt

4. y   4 x y   2 y  cos x is linear, ordinary and order is 2

5. y   4 y y   2 y  cos x is nonlinear  y y

6.  2 u v is linear in v but nonlinear in u sin u . The


  u  v  sin u
 x 2 t equation is nonlinear

7. d 2 x dy is linear in each of the dependent variables x and


  x y  sin t y. But it is nonlinear in the set of {x, y}. The
dt 2 d t
equation is nonlinear

Homogeneous or NonHomogeneous Equation

From equation (1), it can be written as

dn y d n 1 y dy
an (x) n
+a n 1 (x) n 1
+...+a1 (x) +a 0 (x) y = f(x) .
dx dx dx
d n y a n1 (x) d n1y a (x) dy a 0 (x) f(x)
n
+ n 1
+...+ 1 + y=
dx an (x) dx an (x) dx an (x) an (x)
d n y a n1 (x) d n1y a (x) dy a 0 (x) f(x)
n
+ n 1
+...+ 1 + y=
dx an (x) dx an (x) dx an (x) an (x)

y ( n )  pn 1 ( x) y ( n 1)  ...  p1 ( x) y '  p0 ( x) y  r ( x) (2)

SK/EUM111/ODE/09 4
Ordinary Differential Equations (ODE)

a n 1 (x) a (x) a 0 (x) f(x)


where ,..., 1 , and are represented with pn 1 ( x),..., p1 ( x), p0 ( x) and r ( x )
an (x) an (x) an (x) an (x)
respectively.

When pn 1 ( x),..., p1 ( x ) and p0 ( x ) are constants, we say that equation (2) has constant
coefficients; otherwise it has variable coefficients. If r(x) = 0, equation (2) becomes

y ( n )  pn 1 ( x) y ( n 1)  ...  p1 ( x ) y '  p0 ( x ) y  0 (3)

and is called homogeneous.

If r(x) is not identically zero, the equation is called nonhomogeneous.

Constant-coefficient linear equations

A linear differential equation has constant coefficients if the coefficients of the dependent variable
and its derivatives are constants.

d 2x dx
For example, 1) 2
3 t constant-coeff linear ODE
dt dt

d2y dy
2) 5 2
 4  7 y  x3 constant-coeff linear ODE
dx dx

dy
3) t  5 y  et linear ODE but not constant-coeff
dt

Exercise :
State the linear or nonlinear, and homogeneous or nonhomgeneous of the following
differential equations.

i. x5 y''' + x2 y' + 8y = 0 - the homogeneous linear equation


ii. y'' + 2y = 6e-x sin x - nonhomogeneous linear differential equation
iii. (2 – x2)y'' – 5xy' + 6y = 0 - homogeneous linear differential equation
iv. x(y''y + y'2) + 2y'y = 0 - homogeneous nonlinear differential equation

Solution of an ODE

SK/EUM111/ODE/09 5
Ordinary Differential Equations (ODE)

A solution is an expression which satisfies the differential equation. A solution of a DE which


involves the

independent variable x and dependent variable y is the finding of the equation f(x,y)=0 which satisfies
the DE.

General Solution: A solution is a set of all possible solutions of the DE.A general solution of a
differential equation represents an infinite number of solutions, where the arbitrary constant C may be
any real or complex number. For example, the general solution of y’ = 2x yields y = x2 + C.

dy
Exercise. 1 : Show that y = e2x is a solution of  2y
dx

dy
Exercise 2: Show that y =5e2x is a solution of  2y
dx

There are many different expressions which can satisfy a differential equation, that is, there are
many solutions. A solution from which many solutions can be found is called the general solution. It
contains the same number of arbitrary constants as the order of the equation.

dy
The general solution of  2 y is y = Ce2x where C is any constant. C is called an arbitrary
dx
constant.

Particular Solution: Particular Solution is any one solution of the DE.A particular solution is created
when the constant C has a specific value, which occurs when initial conditions are given and the
correspondence of a particular value of the independent variable x gives a specific value y.

Example 1 - the particular solution of y’ = 2x with the initial condition of y(0) = 2, yields y = x2 + 2.

Initial Conditions and Boundary Conditions: These two conditions determine the value(s) of the
constant(s) in the general solution and form the particular solution.

dy
Example 2 - the general solution of  2y is y = Ce2x
dx

If y(0) = 4

then y = 4e2x which is a particular solution

SK/EUM111/ODE/09 6
Ordinary Differential Equations (ODE)

If the initial conditions (e.g. at t =0 or at initial displacement) are given, the problem is called an
initial value problem. If the conditions are given at different times, then the problem is called a
boundary value problem.

Explicit and Implicit Solutions

A solution of an ordinary differential equation that can be expressed in the form


y = f (x) is said to be an explicit solution.

A relation G(x, y) = 0 is said to be an implicit solution of an ordinary differential


equation on an interval I provided it defines one or more explicit solutions on I.

Example : For -1<x<1 the relation x2 + y2 -1 = 0 is an implicit solution of the differential equation

dy x

dx y

Differentiating the equation x2 + y2 – 1 =0 with respect to x (implicit differentiation), we have


d 2 d d
dx
 x    y 2   1  0
dx dx

dy x
=> 
dx y

Therefore x2 + y2 -1 = 0 satisfies the DE thus is an implicit solution of the DE.

Initial-Value Problem
An nth-order differential equation,
 dy dny 
F  x, y, ,..., n   0
 dx dx 
subject to the initial conditions
y(x0) = y0 , y(x1) = y1 , y(x2) = y2, …, y(xn-1) = yn-1

where y0 , y1 , y2, …, yn-1 are arbitrary constants, is called an initial-value problem

Exercise 1: Determine whether the equation

(a) y = 2e-x + xe-x and (b) y = 3e-x - 4xe-x

are solutions of the DE y’’ + 2y’ + y = 0

SK/EUM111/ODE/09 7
Ordinary Differential Equations (ODE)

x x d2y dy
Exercise 2: Show that y  Axe  Be is the general solution of 2
2  y 0
dx dx

dy
Hence, determine the particular solution satisfying y (0)  0, (0)  1
dx

Exercise 3: Obtain the solution of

dy
a)  cos x
dx

d2x
b) t with conditions x(0)  3 and x (2)  7
dt 2

Exercise 4: Determine the values of the constants C1 and C2 in y=C1sin x + C2cos x given

(a) the initial conditions y(0)=1, y’(0)=2

(b) the boundary conditions y(0) = 1, y' ( ) = 1

SK/EUM111/ODE/09 8
Ordinary Differential Equations (ODE)

First-Order Ordinary Differential Equations

First-order differential equation: F ( x, y , y )  0

-- involves a first but no higher derivatives

Example: y ( x)  2 cos x  4

y:function of x and x:independent variable

F ( x,  ( x ),  ( x))  0   ( x) : solution

When f is independent of the variable y, that is


f ‘(x, y) = g(x) ,
The differential equation
dy
 g ( x) can be solved by direct integration.
dx

Direction Field as a geometrical representation of first order DE

-- A set of line segments tangent to a curve

-- Give a rough outline of the shape of the curve

F ( x, y, y )  0

slope
Solve for y  f ( x, y ) 
direction field

SLOPE FIELDS

SK/EUM111/ODE/09 9
Ordinary Differential Equations (ODE)

Slope fields (also called vector fields or direction fields) are a tool to graphically obtain the solutions
to a first order differential equation.

Example 1: Draw a slop field for dy/dx = y

This is the FIELD in which we plot the SLOPES.

So we first tried it with the expression ( dy/dx = y ). This


means that the derivative of any point in the function is the
value of the function at that point (y-coordinate).
•Let's say we want to plot the point (1,1). The derivative
(SLOPE) of the function at that point is 1, so we draw a
small line with slope 1 at that point.

Next, take the point (3,2). The derivative at that point is 2,


so there's another small line, but with a slope 2 at the point
(3,2).).

Now, you understand how they are constructed, this is how


the SLOPE FIELD of the function(s) that have ( dy/dx = y)

SK/EUM111/ODE/09 10
Ordinary Differential Equations (ODE)

From here, you can solve for the point (1,1).

To do this, draw a curve that follows the slope of the line in


either direction until the next whole number is reached. At
that point, change the curve's slope to that of the new point
and continue until the next whole number and so on...
WHAT FUNCTION DOES THE CURVE LOOK LIKE?It
is easy to see that the function that has a derivative equal to
the value of the function and passes through the point (1,1)
is y=ex.

However, you can also see that there are many other functions with a similar shape that could have
been drawn, depending on the starting point.
This is because the slope fields shows the entire family of functions [ ∫ƒ(x)dx + C ].
So, by solving for a point, you can find the exact one function from that family.

Let say the slope fields for dy/dx = 2x and dy/dx = -x/y are

Can you guess by observation what functions they are?

SK/EUM111/ODE/09 11
Ordinary Differential Equations (ODE)

Example 2:

y’= -2xy

The slope, y'(x), of the solutions y(x), is determined once we know the values for x and y , e.g., if x=1
and y=-1, then the slope of the solution y(x) passing through the point (1,-1) will be (-2).1.(-1)=2. If
we graph y(x) in the x-y plane, it will have slope 2, given x=1 and y=-1. We indicate this graphically
by inserting a small line segment at the point (1,-1) of slope 2.

Thus, the solution of the differential equation with the initial condition y(1)=-1 will look similar to this
line segment as long as we stay close to x=-1.

Of course, doing this at just one point does not give much information about the solutions. We want to
do this simultaneously at many points in the x-y plane.

We can get an idea as to the form of the differential equation's solutions by " connecting the dots." So
far, we have graphed little pieces of the tangent lines of our solutions. The " true" solutions should not
differ very much from those tangent line pieces!

SK/EUM111/ODE/09 12
Ordinary Differential Equations (ODE)

Example 3: y   y
2
The slope: y2

1
General Solution: y  
xk

Direction field for y'= y² and integral curves through (0,1), (0,2), (0,3), - 1, (0, - 2), and (0, - 3).

Example 4: Let's consider the following differential equation:

y = e-y

SK/EUM111/ODE/09 13
Ordinary Differential Equations (ODE)

Here, the right-hand side of the differential equation depends only on the dependent variable y, not on
the independent variable x. Such a differential equation is called autonomous. Autonomous
differential equations are always separable.

Autonomous differential equations have a very special property; their slope fields are horizontal-
shift-invariant, i.e. along a horizontal line the slope does not vary.

SK/EUM111/ODE/09 14
Ordinary Differential Equations (ODE)

Directly Integrable Equations

Equation type: y’ = g(x)

Integrate on both sides of the equation will directly yield the solution.
y   g ( x)

Solve by integrating both sides directly.

Example 1: y’ = 2x + 5 yields y = x2 + 5x + C

Example 2: y’ = 6e3x + 2/x yields y = 2e3x + 2ln x + C

Separation of Variables

F ( x)G ( y )dx  f ( x) g ( y )dy  0

This type of DE is called separable because it can be written in the form (variables can be separated)

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

The first equation is usually not exact but multiplying it by the appropriate integrating factor will make
it exact, but use of an integrating factor may eliminate solutions or may lead to extraneous solutions.

1
After multiplying by the integrating factor the equation becomes:
f ( x ) G ( y)

F( x ) g( y)
dx  dy  0
f (x) G ( y)

F( x ) g ( y)
where M ( x )  and N ( y)  .
f (x) G( y )

Solutions are of the form  M(x )dx   N( y)dy  c where f (x )  0 & G ( y)  0 .

dy dy f(x)
Solve by separation of variables into = f(x)/g(y) ( or y' = = ) or Equation type: f(y)
dx dx g(y)
dy/dx = g(x)

Solve by separation of variables into f(y) dy = g(x) dx, and integrate each side.

SK/EUM111/ODE/09 15
Ordinary Differential Equations (ODE)

dy
 g (y) dx dx   f ( x)dx  c
=>  g ( y)dy   f ( x)dx  c
Example 1:

1. y '  xe( x  2 y ) is separable

2. y’ = 3x-y is not separable

Example 2: y’ = xy2

(1/y2) dy = x dx

–1/y = x2/2 + C

Example 3: y’ = y sin x with initial conditions y(0) = 1

General Solution: (1/y) dy = sin x dx

ln y = - cos x + C

Particular Solution: Solve to find C = 1 (ln 1 = -cos 0 + C => 0 = -1 + C)

ln y = - cos x + 1

Example 4: y’ = 4x (y-2)

1/(y-2) dy = 4x dx

ln (y-2) = 2x2 + C which is reducible to y = 2 + eC => y = 2 + C1

First Order DE. – Linear

A first order differential equation is said to be linear if:

(1) the dependent variable and its derivatives occur to the first order only,

(2) there are no products involving the dependent variable with its derivatives, and

(3) there are no non-linear functions of the dependent variable such as sine, exponential, etc.

SK/EUM111/ODE/09 16
Ordinary Differential Equations (ODE)

dy
A first order linear DE may be written in the standard form + P(x) y =Q(x).
dx
Exercise : What are P(x) and Q(x) referred to the standard form?

dy
(a) - 3x 2 y - 5x = 0
dx
dy
(b) x = 5y
dx
dy
(c) x 2 + 3x 3 y + 2x = 5y.
dx

Linear First Order Homogeneous Differential Equation


dy
If the DE given is a linear 1st order DE., i.e., + P(x) y =0 , the general solution of the DE can be
dx
solved as follows.

dy
 P ( x) y  0
dx
dy
   P ( x)dx
y
 ln y    P ( x)dx  C

 y  Ce 
 P ( x ) dx

The general solution of the DE can be found if the integral  P( x)dx exists.
Example : y'+3y=0 with initial condition y(1)=1

3 x
Solution : Since P( x)  3  3dx  3x  y  C e

3 3[1 x ]
and y (1)  1  C  e  y ( x)  e

First Order Linear Non-homogeneous DE

By definition, a linear first-order differential equation in y cannot contain products, powers or


other nonlinear combinations of y or y'. Have its most general form is

SK/EUM111/ODE/09 17
Ordinary Differential Equations (ODE)

dy
 P( x ) y  Q ( x )
dx
with f(x)0, we can obtain the general solution of above equation as follows:

[ y ' P( x) y ]exp[  P( x )dx]  Q ( x) exp[  P ( x) dx ]


d
Multiply both sides by exp[  a( x)dx] : 
dx
 
y exp[  P ( x) dx]  Q ( x) exp[  P ( x) dx]

 y exp   P( x )dx]   Q ( x) exp[  P( x )dx]  C


 

or y  exp    P ( x)dx 
   Q( x) exp  P( x)dx dx  C
Here exp[  a( x)dx] is called the integration factor. Using integration factor to find the solution of DE.
is a standard way in other form of DE. as well.

Integrating Factor

The linear DE in standard form has the integrating factor

 ( x) = e 
P(x)dx

Exercise : Find the integrating factor of the DE

dy
(a) = 5y
dx
dy
(b) x + 2y = 2x
dx
dy
(c) + y tan x = sin x
dx

General Solution

dy
The general solution of the DE + P(x)y = Q(x) is
dx

 (x) y =   (x) Q(x) dx + C

Example 1 Solve the differential equation

dy y
 1
dx x

SK/EUM111/ODE/09 18
Ordinary Differential Equations (ODE)

Solution

Here we have

1
P and Q  1
x

The integrating factor,

1
 x dx
 e  e ln x  x

We integrate with respect to x: We muptiply through the given equation with   x :

1 2 dy
xy   xdx  x C x yx
2 dx

1 C This is an exact equation because it can be written as


y x
2 x
d
( xy )  x
dx

Exercise :Find the general solution of the DE.

dy
(a) = 5y
dx
dy
(b) x + 2y = 2x
dx
dy
(c) + y tan x = sin x
dx
dy
(d) x -3y = x 4e x
dx

EXACT EQUATIONS AND INTEGRATING FACTORS

First-order Differential Equations for which we can find exact solutions

SK/EUM111/ODE/09 19
Ordinary Differential Equations (ODE)

Study the patterns carefully. The first step of any solution is correct identification of the type of
differential equation.

A Linear First Order DE with Variable Coefficients can be written in the following form.

dy
 P ( x ) y  Q( x )
dx

This equation is exact only when P(x) = 0.

Proof:

Write DE in the form M ( x, y)dx  N ( x, y)dy  0

dy
 P ( x ) y  Q( x )
dx

dy  P( x ) ydx  Q( x )dx

P( x ) ydx  Q(x )dx  dy  0

P(x )y  Q(x)dx  1dy  0


 
But M ( x, y )   P ( x) y  Q ( x )  P ( x )
y y

 
N( x, y)  (1)  0  P(x) must equal 0 for the DE to be exact.
x x

The equation P( x ) y  Q( x)dx  1dy  0 can be solved though by finding a proper integrating factor.
The factor depends only on x, so call it  ( x ) .

The new equation  ( x) P( x ) y   (x )Q( x)dx   ( x)dy  0 is exact so…


since  ( x )P( x ) y   ( x )Q(x )   ( x )P( x )
y


 ( x)  d  ( x)
x dx

d d
 ( x ) P ( x)   ( x) or P( x ) 
dx dx

1
P(x )dx  d

SK/EUM111/ODE/09 20
Ordinary Differential Equations (ODE)

1
 P( x)dx    d

 P(x)dx  ln 
  ( x)  e 
P ( x ) dx
assuming  (x)  0

The solution of the DE is therefore of the form

 P ( x ) dx   P( x ) dx Q( x)dx  c
ye   e 

Total Differential of a Function F(x,y)

F is a function of two variables which has continuous partial derivatives over a domain D. The total
differential of F is defined as :

F(x , y) F( x, y)
dF(x,y) = dx  dy ( x. y )  D
x y

Exact Differential

M(x,y)dx + N(x,y)dy is an exact differential over D if  F(x , y) such that

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

F(x , y) F( x, y)
dx  dy = dF(x,y)
x y

F( x , y)
In other words, M(x,y) =
x

F( x , y)
N(x,y) =
y

SK/EUM111/ODE/09 21
Ordinary Differential Equations (ODE)

M(x,y)dx + N(x,y)dy = 0 is an exact differential equation if

M(x,y)dx + N(x,y)dy is an exact differential.

Then

i.e. dF  x, y   0.

Integrating, we have F  x, y   c arbitrary constant

Given a DE that can be written in the form M(x,y)dx + N(x,y)dy = 0,

find F(x,y) such that dF( x, y)  M ( x , y)dx  N( x, y)dy.

The following theorem supplies a method for determining whether or not a DE is exact.

Theorem

M(x,y) and N(x,y) are functions with continuous first partial derivatives in the domain D.

M(x,y) and N(x,y) form the DE

M(x,y)dx + N(x,y)dy = 0

The above DE is exact in D if and only if

 
M ( x , y)  N ( x, y) ( x, y )  D
y x

SK/EUM111/ODE/09 22
Ordinary Differential Equations (ODE)

Solution Method for Exact Equations

 
1. Show M ( x , y )dx = N ( x , y ) dy
y x
F( x, y)
Set  M( x, y) . Integrate with respect to x to get F ( x, y )
x

F ( x, y ) =  M ( x , y )dx +  ( y)

2. Differentiate with respect to y to get N ( x , y)



y
[  M ( x , y )dx +  ( y) ] = N ( x , y )

3. Solve for  ( y)

4. The answer will be of the form : F ( x , y ) = g(x,y) +  ( y ) , if no boundary value


is given.

Example : Determine whether the following equations are exact and solve the ones that are exact.

e y dx  ( xe y  2 y)dy  0

Solution:

(a) M  e y , N  xe y  2 y

M N
so that  ey 
y x

Hence the given equation is exact and

f
 M ( x, y )  e y (1)
x

f
and  N ( x, y )  xe y  2 y (2)
y

We integrate (1) with respect to x:

SK/EUM111/ODE/09 23
Ordinary Differential Equations (ODE)

f ( x, y )   e y dx

 xe y  g ( y)

Differentiating with respect to y:

f dg
 xe y   N ( x, y )  xe y  2 y
y dy

dg
 2y
dy

Integrating, we have

g ( y )  y 2  c1

The desired solution

f ( x, y)  xe y  y 2  c1  c2

xe y  y 2  c

Exercise 1 : Which of these equations are exact ?

a. ( y 2  3)dx + ( 2 xy  4)dy = 0

b. (3x 2 y  2)dx  ( x 3  y)dy = 0

c. ( 2  1) cos rdr  2 sin rd  0

x x2
d. (  x ) dx  (  y)dy  0
y2 y3

2y3/ 2 1
e. ( )dx + (3x 1 / 2 y 1 / 2 1)dy =0
x1/ 2

SK/EUM111/ODE/09 24
Ordinary Differential Equations (ODE)

Exercise 2: Solve

a. (3x 2 y 2  y 3  2x)dx  (2x 3 y  3xy 2  1)dy  0 given y 2  1

b. ye x
  
 2e x  y 2 dx  e x  2xy dy  0

c. Find A so that this equation is exact. Ax y  2y dx  x


2 2 3

 4xy dy  0

Modified Exact First Order DE


Sometimes, a non-exact differential equation M ( x , y )dx  N ( x , y )dy  0 can be turned into an
exact differential equation by multiplying the whole equation by an appropriate factor, called an
integrating factor.

M ( x, y) N ( x , y)
What if 
y x

We may be able to rewrite the equation so that it is exact.

If M ( x, y)dx  N ( x, y)dy  0 is not exact, but  ( x, y)M ( x , y)dx   ( x, y) N( x , y)  0 is exact, then


 ( x, y) is called an integrating factor.

Example :  
Show that y 2  2xy dx  x 2 dy  0 is not exact, then find n such that yn
is an integrating factor.

 2 
i.
y
 
y  2xy  2 y  2x 
x
( x 2 )  2 x

therefore the DE is not exact.

ii. Multiply the DE by yn, then solve.

y n ( y 2  2xy)dx  y n x 2 dy  0

 n2
y
 
y  2xy n 1  n  2 y n 1  2n  1xy n must equal

SK/EUM111/ODE/09 25
Ordinary Differential Equations (ODE)


x
 
 y n x 2  2 y n x which means n  2y n 1 must equal 0 and

2n  1xy n must equal  2xy n for this to be so n must equal -2

iii. Now, solve the equation.

 
y 2 y 2  2xy dx  y 2 ( x 2 )dy  0

Solution:

1  2 xy  dx    x
1 2
y 2  dy  0

2 1
F ( x, y )  x  x y  c

1  M N 
Theorem (a) If 
N  y
  is a function of x only, say f(x), then exp
x 
  f ( x)dx is an integrating
factor of the equation M ( x , y )dx  N ( x , y )dy  0

1  N M 
(b) if  
M  x y 
 is a function of y only, say g(y), then exp   g( y )dy is an integrating factor
of the equation M ( x , y )dx  N ( x , y )dy  0

Proof

(a) By the hypothesis, if ( x) is the integrating factor which depends on variable x only. We see
that

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

is the exact differential. From theorem, we have the necessary condition

 
( M )  ( N )
y x
M N d
  N
y x dx

Eventually, we obtain

SK/EUM111/ODE/09 26
Ordinary Differential Equations (ODE)

  M N 
  
d   y x 
 f
dx  N 
 
 

which has a general solution ( x )  exp   f ( x )dx


The proof for (b) is similar and it is left for Exercise.

Example

Find the integration factor of the following ODE and solve the corresponding equation

3x 2
 
y  2 x y  y 3 dx  x 2  y 2 dy  0 
Solution

For this ODE,

M ( x , y )  3x 2 y  2 x y  y 3
M M
  3x 2  2 x  3 y 2 and  6x y  2 y
y x

N N
N ( x, y)  x 2  y 2   2 x and  2y
x y

1  M N 
We can see that     3 . Therefore the integration factor is given by
N  y x 
exp  3d x  e 3x
and the ODE is reduced into

  
e 3x 3x 2 y  2 x y  y 3 dx  e 3 x x 2  y 2 dy  0 
The differential function is f ( x , y )

f
x

 e 3x 3x 2 y  2 x y  y 3 

SK/EUM111/ODE/09 27
Ordinary Differential Equations (ODE)

f  y3 
y
 e3x x 2  y 2    f ( x, y)  e 3 x  x 2 y    C( x)
 3
f  y3 
  e 3x 2 x y   3e 3 x  x 2 y    C'( x )
x  3
f

x

 e 3x 2 x y  3x 2 y  y 3  C '( x ) 
By comparing the above equations, we have

C' ( x )  0 , and then C ( x )  constant

Therefore the general solution of the ODE is

 2 y3  3x
f ( x, y)  e  x y    k
 3 

Homogeneous DE

dy y
If M ( x, y)dx  N ( x, y)dy  0 can be written in the form  f (x , y) where f ( x , y)  g  then
dx x
the DE is homogeneous or is homogeneous if the function f(x,y) is homogeneous, that is-
f (tx, ty)  f ( x, y ) . If f (tx, ty )  t n f ( x, y) then f is homogeneous of degree n.

Check that the functions

xy
Example 1: f ( x, y ) 
x  y2
2

txty  xy  2
f (tx, ty )  2 2
2 2
 t2  2 2 
 t f ( x, y ) is homogeneous degree 2.
t x t y x y 

2x
3 3
Example 2: f ( x, y )  ( x  y )e y
 4 xy 2

2 tx
3 3
f (tx, ty )  ((tx )  (ty ) )e ty
 4tx(ty )2
2x
3 3 3
 t (( x)  ( y ) )e y
 t 3 (4 xy 2 )
 t 3 f ( x, y )

is homogeneous degree 3.

SK/EUM111/ODE/09 28
Ordinary Differential Equations (ODE)

A homogeneous equation can be transformed to a separable equation by a change of variable y  vx .


The new equation is separable in v and x, so it can be solved.

A homogeneous equation M ( x, y)dx  N ( x, y)dy  0 , is always transformed into a separable one by


letting y  vx .

dy dv
Then v x .
dx dx

dy y
Since the given DE is homogeneous, we know it can be written in the form  g  . Since y  vx
dx x
,

y  vx 
g    g    g v  .
x  x 

dy y
And since  g 
dx x

dv
vx  g (v) .
dx
1 1
Separating variables vdx  xdv  g ( v)dx : [ v  g (v)]dx  xdv  0 : dx  dv  0
x v  g( v)

1 1
To solve, integrate:  x dx   v  (g( x) dv  c
 y
ln x  F( v)  c or ln x  F   c
x

Let us summarize the steps to follow:

i) Recognize that your equation is an homogeneous equation; that is, you need to check that
f(tx,ty)= f(x,y), meaning that f(tx,ty) is independent of the variable t;

ii) Write out the substitution v=y/x;

iii) Through easy differentiation, find the new equation satisfied by the new function z.
You may want to remember the form of the new equation:

SK/EUM111/ODE/09 29
Ordinary Differential Equations (ODE)

dy dv
vx
dx dx

iv) Solve the new equation (which is always separable) to find v;

v) Go back to the old function y through the substitution y = x v;

vi) If you have an IVP, use the initial condition to find the particular solution.

vii) Since you have to solve a separable equation, you must be particularly careful about the
constant solutions.

dy 2 x  5 y
Example 3: Find all the solutions of 
dx 2x  y

Follow these steps:

2 x  5 y
i) It is easy to check that f ( x, y )  is homogeneous;
2x  y

ii) Consider v=y/x ;

iii) We have

2 x  5 xv 2  5 z
xv ' v  
2 x  yv 2 z

which can be rewritten as

1  2  5v 
v'    v .
x  2v 

This is a separable equation. If you don't get a separable equation at this point, then your
equation is not homogeneous, or something went wrong along the way.

iv) All solutions are given implicitly by

4 ln | v  2 |  3ln(| v  1|)  ln(| x |)  C



 v 1
 v2

v) Back to the function y, we get

SK/EUM111/ODE/09 30
Ordinary Differential Equations (ODE)

4 ln | y  2 x |  3ln(| y  x |)  C

 yx
 y  2x

Note that the implicit equation can be rewritten as

( y  x)3  C1 ( y  x) 4

y2
Example 4: xy  y
x

y2 y y y
y   2   ( )2   (A)
x x x x
y y  vx , y   v ' x  v
Let v  ,
x

(A)  v'x v  v v
2
 v'x  v
2

1 1 1
 2
dv  dx    ln | x | c
v x v

1 y x
 v   y
ln | x |  c x ln | x |  c

Non-Homogeneous DE Reducible to Homogeneous Form

Consider the non-homogeneous equation

dy a1 x  b1 y  c1

dx a2 x  b2 y  c2 (1)
where a1, b1,c1,... c2 are all constants.

Case1:
a1 b1 a b1
 , i.e., 1 0
If a2 b2 a2 b2 then the transformation (shift of origin)

SK/EUM111/ODE/09 31
Ordinary Differential Equations (ODE)

x  x1  h, y  y1  h

reduces the non-homogeneous equation (1) to the homogeneous equation of the form

dy a1 x1  b1 y1

dx a2 x1  b2 y1 (2)
here the unknown constants h,k are determined by solving the pair of equations

a1h  b1k  c1  0
a2 h  b2 k  c2  0
Now the equation (3) is homogenous in the new variables x1 and y1, it can be solve homogenous
.
equation method

Case 2:
a1 b1 a b1
 , i.e., 1 0
If a2 b2 a2 b2 then the transformation

z  a1 x1  b1 y

reduces the non-homogeneous equation (1) in the variables x and z which can be solved using
homogenous equation method

dy 10  2 x  2 y
Example 1: Solve the non-homogeneous equation 
dx 3x  y  9

SK/EUM111/ODE/09 32
Ordinary Differential Equations (ODE)

dy 7 x  3 y  7
Example 2: Solve the non-homogeneous equation 
dx 7 y  3x  3

SK/EUM111/ODE/09 33
Ordinary Differential Equations (ODE)

Bernoulli Equations as First Order Linear Non-homogeneous differential equation.

The Bernoulli differential equation has the form

dy
 P ( x ) y  Q( x ) y n
dx

n=0  y  P ( x) y  Q( x) linear

n=1  y  P( x) y  Q( x) y separable

 y   (Q ( x )  P ( x )) y  R ( x ) y
1 dy 1
 R ( x )  dy  R ( x ) dx
y dx y
If n  1 then Bernoulli equations can be transformed to linear equations by changing the dependent
variable v  y1n .

Proof:

dy
 P ( x ) y  Q( x ) y n
dx

SK/EUM111/ODE/09 34
Ordinary Differential Equations (ODE)

dy
(y-n) multiply => y n  P( x ) y1 n  Q( x )
dx

let v  y1n

dv dy 1 dx dv dy
 1  n y  n =>  P ( x ) v  Q( x )
dx dx (1  n ) dy dx dx

1 dx dv
y n 
1  n  dy dx
dv
(1-n) multiply =>  1  n P( x ) v  (1  n )Q( x )
dx

dv
let P1 (x )  (1  n)P( x) =>  P1 (x )v  Q1 ( x ) which is linear in v!
dx

Q1 ( x)  (1  n)Q( x)

dy
Example : x 2
1  dx  4 xy  3y

dy 4x 3 4x 3
change to Bernoulli  2 y 2 y where P( x )  2
& Q( x )  2
dx x  1 x 1 x 1 x 1

since yn = y1

dy 4x 3
y-1 multiply => y 1  2  2
dx x  1 x  1

Let v  y1n  y1( 1)  y 2 solving for y  v1 / 2

dv dy dy 1 dv
 2y solving for 
dx dx dx 2 y dx

1  dv 4x 3
v 1 / 2  v 1 / 2   2  2
2  dx x  1 x  1

1 dv 3  4x 1 3  4x
 separate and integrate  2v dv   x dx
2v dx x 2  1 2
1

SK/EUM111/ODE/09 35
Ordinary Differential Equations (ODE)

1 1 1/ 2 3  4x
 dv  ln v  ln y = x 2
dx
2 v 1

2x 1
=  2 2
 3 2 dx
x 1 x 1

ln y =  2 ln x 2  1  3 arctan x

e3arctan x
solving for y y 2
x 2
 1

Solving Second Order Differential Equation by Reduction of Order


Let us consider a second-order differential equation in the form

d 2y
 F  y , y 
d x2

where F  y, y  is a continuous function. To solve the differential equation of this type, we can at least
reduce its order by one

dy
Let p  , then
dx

d 2y d p d p d y dp
2
  p
dx dx dy dx dy

Therefore, the original differential equation Eq.(6.6) is reduced to a first-order differential equation

dp
p  F  y, p 
dy

The above method is known as the reduction of order.

Example

d2y dy
Solve the differential equations 2
y by reduction of order:
dx dx

SK/EUM111/ODE/09 36
Ordinary Differential Equations (ODE)

Solution

dy d2y dp
Let p  , we have 2
p and the ODE becomes
dx dx dy

dp
p  y p  d p  y dy   d p   y dy
dy
1 2 C2 dy 1 2
 p
2
y 
2

dx 2

 y  C2 
dy 1 1  y 1
 C 2 2
  dx  tan 1    x  C'
y 2 C  C 2
 y  c1 tan2c1 x  c2 

Riccati Equation

y  P( x) y 2  Q( x) y  R( x)

P ( x)  0  linear

Let S(x) be a solution and let y  S ( x )  1 / z

The Riccati equation is transformed into linear

1 2 1 2
○ Example: y  y  y  (A)
x x x

P ( x )  1 / x , Q ( x )  1 / x , R ( x )  2 / x

By inspection, y  S ( x)  1 is a solution of (A)

1 1 1
Let y  S ( x)   1  y   z
z z z2

1 1 1 1 1 2
(A)   2
z  (1  ) 2  (1  ) 
z x z x z x
1 1 1 2
 (1  )(1   1) 
x z z x
1 1 1 2
 (1  )(2  ) 
x z z x

SK/EUM111/ODE/09 37
Ordinary Differential Equations (ODE)

z2 1 1 2z 2
z  (1  )(2  ) 
x z z x
2
z 3 1 2z 2
 (2   2 ) 
x z z x
2 2
2 z 3z 1 2 z 3z 1
     
x x x x x x

3 1
 z 
x
z   (linear)
x

3
 ( ) dx
Integrating factor: e x
 x3
3 2 3 2
 x z  3 x z  ( x z )   x
1 1 c
Integrate  x 3 z   x 3  c and z    3
3 3 x

1 1 3c  2x3
Solution: y  1   1 
z 1/ 3  c / x3 3c  x3

SK/EUM111/ODE/09 38
Ordinary Differential Equations (ODE)

Application Problems

Exponential decay or increase


For radioactive decay, the decay rate is proportional to the number of the mother nuclei left. For
example, if the decay rate constant is  and the initial no. of mother nuclei is N0,then we have,

dN
 N and the initial condition is N(0)=N0.
dt
dN
  N
dt
 N (t )  Cet

Initial condition implies C=N0 and thus N(t)=N0 et

Note : Although the above two examples are very simple, it should be pointed this is not the usual
case. The remained sections in this chapter will try to illustrate some methods to solve some of the
standard form of DE.

Another example:

SK/EUM111/ODE/09 39
Ordinary Differential Equations (ODE)

Solution of this problem is:

Population Dynamics

The easiest mathematical model offered to govern the population dynamics of a certain species is
called the exponential model, that is, the rate of change of the population is proportional to the
existing population. In other words, if P(t) measures the population, we have

dP
 kP ,
dt

where the rate k is constant. It is fairly easy to see that if k > 0, we have growth, and if k <0, we have
decay. This is a linear equation which solves into

SK/EUM111/ODE/09 40
Ordinary Differential Equations (ODE)

P(t)=P0 ekt

where P0 is the initial population, i.e. P(0)=P0. Therefore, we conclude the following:

 if k>0, then the population grows and continues to expand to infinity, that is,

lim P  t   
x

 if k<0, then the population will shrink and tend to 0. In other words we are facing extinction.

Clearly, the first case, k>0, is not adequate and the model can be dropped. The main argument for this
has to do with environmental limitations. The complication is that population growth is eventually
limited by some factor, usually one from among many essential resources. When a population is far
from its limits of growth it can grow exponentially. However, when nearing its limits the population
size can fluctuate, even chaotically. Another model was proposed to remedy this flaw in the
exponential model. It is called the logistic model (also called Verhulst-Pearl model). The differential
equation for this model is

dP P
 kP(1  )
dt M

where M is a limiting size for the population (also called the carrying capacity). Clearly, when P is
small compared to M, the equation reduces to the exponential one. In order to solve this equation we
recognize a nonlinear equation which is separable. The constant solutions are P=0 and P=M. The non-
constant solutions may obtained by separating the variables

dP
 kdt
P
P(1  )
M

dP
and integration    kdt
P
P(1  )
M

 1 
dP 1 
The partial fraction techniques gives      M  dP
P P
P(1  )  P (1  ) 
M  M 

SK/EUM111/ODE/09 41
Ordinary Differential Equations (ODE)

P
which gives In P  In 1   kt  c |
M

P
Easy algebraic manipulations give  Cekt
P
(1  )
M

where C is a constant. Solving for P, we get

If we consider the initial condition P(0)=P0 (assuming that P0 is not equal to both 0 or M), we get

which, once substituted into the expression for P(t) and simplified, we find

It is easy to see that

lim P  t   
x

However, this is still not satisfactory because this model does not tell us when a population is facing
extinction since it never implies that. Even starting with a small population it will always tend to the
carrying capacity M.

SK/EUM111/ODE/09 42

Potrebbero piacerti anche