y - UniMAP Portal

Download Report

Transcript y - UniMAP Portal

CHAPTER 2 : First Order
Differential Equation
WHAT IS A DIFFERENTIAL
EQUATION?
EUT 102
1
ODE BASICS

“An ordinary differential equation (ODE) is an
equation that contains one or several derivatives of
an unknown function.” (Kreyzig). For example:
y '  cos x
y ''  4 y  0
x 2 y ''' y '  2e x y ''  ( x 2  2) y 2
2
EUT 102
Order of a Differential Equation


The order of a differential equation is the order of
the highest derivative that appears in the equation.
First order equations can be written as:
F ( x, y , y )  0
or
y '  f ( x, y )
'
3
EUT 102
Example 2.1
y '  cos x
y  4y  0
''
x 2 y ''' y '  2e x y ''  ( x 2  2) y 2
4
EUT 102
Solutions of an ODE
A solution of this equation is a function y that
satisfies the given equation.
5
EUT 102
FIRST ORDER DIFFERENTIAL EQUATIONS
6

Separable Equations

Homogeneous Equations

Linear Equations

Exact Equations

Applications in Engineering
EUT 102
2.1 : SEPARABLE EQUATIONS

The differential equation ;
y’ = f(x,y)
is said to be separable if the equation can be written
as the product of a function of x, u(x) and a function
of y,v(y) i.e.
y’ = u(x)v(y)
7
EUT 102
Example 2.2

y’ - xy = x can be written as
y’ = x(1+y)

i.e u(x) = x & v(y) = 1+y
y’ siny cosx – cosy sinx = 0 or can be written
as
y’ = tan x cot y
8
EUT 102
Exercise
Determine each of the following ODEs is
separable equations or not.
a) y’ = xey-x
b) y’x = x – 2y
9
EUT 102
Solution of Separable Equations

The equation y’ = u(x)v(y) can be written in the
form ;
dy
 u ( x )dx
v ( y)

Then, we integrate on both sides of the eqution:
dy
 v( y)   u(x )dx  A
where A is constant
10
EUT 102
Example 2.3
Solve the following differential equations :
a) (x + 2)y’ = y
b) y’ex + xy2 = 0
c) x2y’ = 1 + y
11
EUT 102
Solutions
y-1dy = (x+2)-1dx
a)
By integrating both sides :
ln |y| = ln |x+2| + A
ln |y| - ln |x+2| = A
and becomes y = B(x+2).
b)
12
1
 B  ( x  1)e x , B   A
y
1
c) ln 1  y    C
x
EUT 102
Example 2.4

13
Let θ be the temperature (in oC) for a mass in
a room with a constant room temperature at
18oC. The mass cools from 70oC to 57oC in 5
minutes, how much longer will be needed by
the mass to cool down to 40oC.
EUT 102
Solution

Hint…
d
 k (  18)
dt
14
40    70
EUT 102

 = 18 + Ae-kt
–
–
15
From the initial condition, we obtain A = 52 and
k = 0.05753.
Solve…
The mass will need approximately 9.952
minutes more to cool.
EUT 102
2.2 : HOMOGENEOUS EQUATIONS
Definition 2.2 :
A differential equation y’ = f(x,y) is said to
be homogeneous if
f(λx , λy) = f(x , y)
16
for any real number λ.
EUT 102
Example 2.5
Determine whether y’y = x(lny – lnx) is a
homogeneous equation.
17
EUT 102
Solution
f ( x , y) 

18
x  y
ln  
y x
Then, show that f(λx , λy) = f(x,y).
EUT 102
Example 2.6
xy
Show that y  2
is a homogeneous equation
2
x y
'
19
EUT 102
Solution of Homogeneous Equations

A homogeneous equation can be transformed into
separable equations by substituting
y = xv or v = y/x.
Hence,


20
y’ = v + x (dv/dx)
This will result in separable equations in variables x
and v.
Solve and resubstitute the value v=y/x.
EUT 102
Example 2.7
Solve the initial value problem.
xy
y'  2
,
2
x y
y(0) = 2.
21
EUT 102
Solution


Test the homogenity
Substitute y = xv
dx
 1 1
 3  dv  
v
x
v

Integrate
1
ln | xv | k  2
2v
22
EUT 102

Substitute v = y/x and determine the general
solution.
y  Ae

23
x 2 / 2 y2
The initial condition, y(0) = 2, so that A = 2.
EUT 102
Example 2.8
1. Solve the following differenti al equations
dy x  y

dx xy  x 2
2
a)
Answer : ( x  y )  Axe
2
24
2
y
x
EUT 102
b)
dy
2
x  y  2x y
dx
Answer : y  Bxe , B  e
x2
25
A
EUT 102
2.3 : LINEAR EQUATIONS
Definition 2.3 : (First OLDEs)
An equation is said to be first-order liner if it
has the form
a(x)y’ + b(x)y = c(x)
where a(x), b(x) & c(x) are continuous functions on
a given interval.(or a constant).
26
EUT 102
Example 2.9
a) xy’ – 2y = x + 1 is a linear equation with
a(x) = x, b(x) = -2 dan c(x) = x+1
b) 2x2y’ + xey = sin x is not a linear equation.
27
EUT 102
Example 2.10
Determine whether the following ODEs are
linear equations or not.
28
–
(1 - x2)y’ = x(y + sin-1x)
–
y’ + xy2 = ex
EUT 102
Solution of Linear Equations

We rewrite the linear the equation as
y’ + p(x)y = q(x)
•
29
a(x) = 1

find ∫p(x)dx

An integrating factor is ρ = e∫p(x)dx
EUT 102
Cont.....


multiplying both sides of the linear equation by ρ
we get, ρy’ + ρp(x)y = ρq(x)
Or can be rewrite into the form;
d
(y)  q ( x )
dx

30
The solution to the linear equation is by integrating
both sides with respect to x.
EUT 102
Example 2.11
Solve the following linear equations.
a)
b)
31
y’ + y = x
y’ +y tan x = kos x,
given that y = 1 when x = 0.
EUT 102
Solutions
a) y’ + y = x
we know that p(x) = 1 and q(x) = x.
Answer :
y = (x – 1) + Ae-x
b) Answer :
y = (x + 1) kos x
32
EUT 102
Example 2.12: Linear Equations
Application
A tank containing 50 liters of liquid with composition,
90% water and 10% alcohol. A second liquid with
composition, 50% water and 50% alcohol is poured
into the tank at the rate of 4 liters per minute. While
the second liquid is poured into the tank, the liquid in
the tank is drained out at the rate of 5 liters per
minute. Assuming that the liquid in the tank mix
uniformly, how much alcohol left in the tank 10
minutes later?
33
EUT 102
Answer

34
13.45 liter
EUT 102
2.4 : EXACT EQUATIONS
Definition 2.4
A first order differential equation of the form
M(x,y)dx + N(x,y)dy = 0
is called an exact diffrential equation if the
differential form M(x,y)dx + N(x,y)dy is exact,that
is,
du = M(x,y)dx + N(x,y)dy.
of some function u(x,y).
35
EUT 102
Theorem 2.1 : (Condition of an exact equation)
* The equation
M(x,y)dx + N(x,y)dy = 0
is an exact equation if and only if :
M N

y
x
36
EUT 102
Example 2.13
Show that
(6xy+2y)y’ = –(2x + 3y2)
is an exact equation.
37
EUT 102
Solution

We rewrite in the form
(2x + 3y2)dx + (6xy + 2y)dy = 0
i.e. M = (2x + 3y2) and N = (6xy + 2y)

Then, we test for exactness
M N

y
x
38
EUT 102
Example 2.14
Solve the following differential equation;
(1- kos2x) dy + (y sin 2x) dx = 0.
Solution :
39
EUT 102
Solution of An Exact Equations
1)
Write in the form of exact equation
M(x,y)dx + N(x,y)dy = 0.
Test for Exactness :
M N

y
x
40
EUT 102
Cont…
2)
Write
u
M
x
(I)
u
N
y
(II)
and
41
EUT 102
Cont....
3)
4)
5)
6)
42
By integrating Equation (I) with respect to x, we have
u(x,y) = ∫ M dx + Φ(y).
Differentiate u with respect to y, and equating the result
with equation (II) to determine the function Φ(y).
Write the solution in the form of u(x,y) = A, where A is a
constant.
By substituting the initial condition, we will get the
particular solution of the initial value problem
EUT 102
Example 2.14
Show the the following ODE is an exact
equation and solve the differential equation.
(6x2 - 10xy + 3y2)dx + (-5x2 + 6xy -3y2)dy = 0
43
EUT 102
Solution

Test for Exactness
(6x2 - 10xy + 3y2) = M and
(-5x2 + 6xy -3y2) = N
Show that
M N

y
x
44
EUT 102
Cont …

Let u(x,y) be the solution, then
u = ∫Mdx +Φ(y)
u = ∫(6x2 - 10xy + 3y2)dx + Φ(y)
= 2x3 – 5x2y +3xy2 + Φ(y)

45
differentiate u with respect to y, we obtain
∂u/∂y = -5x2 +6xy + Φ’(y)
EUT 102
Cont .....


46
By equating with N we obtain,
-5x2 +6xy + Φ’(y) = (-5x2 + 6xy -3y2)
hence; Φ’(y) = -3y2 and we obtain
Φ(y) = -y3 + B
The general solution is u(x,y) = A, where
u(x,y) = 2x3 – 5x2y +3xy2 - y3 + B = A
u(x,y) = 2x3 – 5x2y +3xy2 - y3 = C, C = A - B
EUT 102
Example 2.15

Solve the following differential equations
1) xy’ + y + 4 = 0
2) sin x dy + (y kos x – x sin x) dx = 0
47
EUT 102
Answer
48
1)
u(x,y) = (y + 4)x = C , C = A – B
2)
u(x,y) = y sin x + x kos x – sin x
=C, C=A–B
EUT 102
Exercise 2
Show that the following differential equation
2y dx + x dy = 0
is not an exact equation.
If the integrand,
1
 ( x, y )  ,
xy
solve the differential equation.
49
EUT 102
Answer

50
x2y = A , A is a constant
EUT 102