Activity 2-unit 2-update 2024. English translation
Week 4 [compatibility mode]
1. KNF1023
Engineering
Mathematics II
First Order ODEs
Prepared By
Annie ak Joseph
Prepared By
Annie ak Joseph Session 2007/2008
2. Learning Objectives
Demonstrate how to find integrating
factor for non-exact differential equation
Demonstrate the solution of
Homogeneous 1st order ODE in linear form
Demonstrate the solution of
inhomogeneous 1st order ODE in linear form
3. Integrating Factor
The idea of the method in this section is quite
simple. If given an equation
P(x, y)dx + Q(x, y)dy = 0 −−− (1)
that is not exact, but if multiply it by a suitable
function F ( x, y) , the new equation
FPdx + FQdy = 0 − − − (2)
is exact, so that it can be solved, the function F ( x, y )
is then called an integrating factor of equation (1).
4. How to Find Integrating Factors
Equation (2) with M=FP, N=FQ is exact by
the definition of an integrating factor. Hence
∂M ∂N ∂ ∂
= now is (FP) = (FQ) −−− (3)
∂y ∂x ∂y ∂x
That is F y P + FPy = Fx Q + FQ x (subscripts
denoting partial derivatives) which is
complicated and useless. So we follow the
Golden Rule: If you cannot solve your
problem, try to solve a simpler one—the
result may be useful (and may also help you
later on). Hence we look for an integrating
factor depending only on one variable;
5. How to Find Integrating Factors
fortunately, in many practical cases, there are
such factors, as we shall see. Thus, let F = F (x).
Then F y = 0 and F x = F ' =
dF so that (3)
becomes dx
'
FP = F Q + FQ
y x
Dividing by F and reshuffling terms, we have
FPy = F ' Q + FQ x
'
F Q FQ x
Py = +
F F
6. How to Find Integrating Factors
1 dF
Py = Q + Qx
F dx
1 dF
Py − Q x = Q
F dx
1 1 dF
( Py − Q x ) =
Q F dx
1 dF 1 ∂P ∂Q
= −
∂y ∂x
F dx Q
7. How to Find Integrating Factors
Thus, we can write it as
1 dF 1 ∂P ∂Q
=R R = − −−− (4)
F dx Q ∂y ∂x
This prove the following theorem.
8. How to Find Integrating Factors
dF
* If we assume F = F ( y ). Then Fx = 0 and F y = F ' =
so that (3) becomes dy
'
F P + FPy = FQ x
Dividing by F and reshuffling terms, we have
9. How to Find Integrating Factors
F ' P FPy
Qx = +
F F
1 dF
Qx = P + Py
F dy
1 dF
Qx − Py = P − − − (4*)
F dy
1 1 dF
P
( Qx − Py ) = F dy
1 dF 1
= R, R = ( Qx − Py )
F dy P
10. Theorem 1 (Integrating factor F(x))
If (1) is such that the right side of (4), call it R
depends only on x, then (1) has an integrating
factor F=F(x), which is obtained by integrating
(4) and taking exponents on both sides,
F ( x ) = exp ∫ R ( x ) dx − − − ( 5 )
Similarly, if F=F(y), then instead of (4) we get
1 dF 1 ∂Q ∂P
= − − − − (6 )
F dy P ∂x ∂y
Here 1 ∂Q ∂ P And have the
R =
∂ x − ∂ y companion
p
11. THEOREM 2 [Integrating factor F(y)]
If (1) is such that the right side R of (6)
depends only on y, then (1) has an
integrating factor F=F(y), which is
obtained from (4*) in the form
F ( y) = exp ∫ R( y)dy − − − ( 7 )
12. Example 1 (Integrating factor F(x))
Solve 2 sin( y 2 )dx + xy cos( y 2 )dy = 0 by Theorem 1.
We have P = 2 sin( y 2 ), Q = xy cos( y 2 ) hence (4) on
the right,
1 3
R= 2
xy cos( y )
[ 2 2
4 y cos( y ) − y cos( y ) =
x
]
And thus
F ( x) = exp ∫ (3 / x )dx = x 3
13. Example 2
Solve the initial value problem
2 xydx + (4 y + 3 x 2 )dy = 0,
y (0.2) = −1.5
2
Here P = 2xy , Q = 4 y + 3 x , the equation is not
exact, the right side of (4) depends on both x
and y (verify!), but the right side of (6) is
1 2
R= (6 x − 2 x ) =
2 xy y
ThusF ( y ) = y 2
14. Continue...
Is an integrating factor by (7). Multiplication
2
by y gives the exact equation
3 3 2 2
2xy dx + (4 y + 3x y )dy = 0
Which we can write as
3
M = 2 xy
3 2 2
N = 4y + 3x y
15. Continue...
As we know that
u ( x, y ) = c
So to get u (x, y ) = c , we use u = ∫ Mdx + k ( y )
u = ∫ 2 xy dx + k ( y )
3
u = x y + k(y)
2 3
16. Continue...
( )
To get k y , we differential u with respect to
y
,from there we get
∂u 2 2 dk 3 2 2
= 3x y + = N = 4 y + 3x y
∂y dy
dk
so = 4y3 k = y4 + c *
dy
2 3 4 *
u=x y + y +c =c
2 3 4
u=x y +y =c
17. Continue...
x = 0.2, y = −1.5
4 2 3
y + x y = 4.9275
18. 1st Order ODEs In Linear Form
A first order differential equation is linear if it
has the form
dy
+ f ( x) y = r ( x)
dx
If the right side r(x) is zero for all x in the
interval in which we consider the equation
(written r(x)≡0), the equation is said to be
homogeneous other it is said to be
nonhomogeous.
19. Homogeneous 1st Order ODEs In Linear Form
Linear ODE is said to be homogeneous if the
function r(x) is given by r(x)=0 for all x. That
is, a homogeneous 1st order ODE is given by
dy
+ f ( x) y = 0
dx
dy
= − f ( x) y
dx
1
dy = − f ( x)dx
y
20. Homogeneous 1st Order ODEs In Linear Form
1
∫ y dy = −∫ f ( x)dx
Gives us the general solution of the homogeneous 1st order
ODE above.
ln( y ) = − ∫ f ( x)dx
y = exp(− ∫ f ( x)dx)
21. Inhomogeneous 1st Order ODEs in Linear
Form (Method 1:use of integrating factor)
dy
1. + f ( x ) y = r ( x ) is a general form of the
dx
linear DE.
2. Here f and r are function of x or constants
3. ∫ fdx
e ∫ fdx
4. Integrating factor =I.f=
5. Solution is y (I . f ) = ∫ r (I . f )dx + C
22. Example
dy 2x
+ 5y = e
dx
dy
The above DE is of the form + f (x ) y = r (x )
dx
2x
f = 5, r = e
I. f = e ∫ fdx
=e 5x
y (I . f ) = ∫ r (I . f )dx + C
23. Continue...
( )= ∫ e
ye 5x 2x 5x
e dx + C
ye 5x
= ∫ e dx + C
7x
7x
e
5x
ye = +C
7
1 2x −5 x
y = e + Ce
7
24. Method 2: Variation Parameter
In the 1st step, we solve the corresponding
homogeneous ODE, i.e
dy
+ f ( x) y = 0
dx
Let us say that we obtain y = y h (x) as particular
solution for the above homogeneous ODE. We
will use it in the 2nd step below to construct a
general solution for the original inhomogeneous
ODE.
25. Method 2: Variation Parameter
In the 2nd step, for the general solution of the
()
inhomogeneous ODE, we let y ( x) = y h x . v(x)
and substitute it into ODE to obtain a 1st
order separable ODE in v(x).
26. Example
dy 2x
+ 5y = e
dx
dy
+ 5y = 0
dx
dy
= −5 y
dx
dy
∫ y = −5∫ dx
27. Continue...
ln y = −5 x
−5 x
y=e
y=e −5 x
.v ( x )
dy
= e .v − 5e .v ( x )
−5 x ' −5 x
dx
28. Continue…
e −5 x '
.v − 5e −5 x
.v ( x ) + 5.e −5 x
.v = e 2x
−5 x ' 2x
e v =e
dv −5 x 2x
e =e
dx
2x
dv e
= −5 x
dx e
29. Continue…
dv 7x
=e
dx
7x
e
v= +c
7
7x
−5 x e
y=e ( + c)
7
2x
e −5 x
y= + ce
7
30. Prepared By
Annie ak Joseph
Prepared By
Annie ak Joseph Session 2007/2008