Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

D2-03

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

MA108 ODE: Exact ODE’s and Integrating Factors

Lecture 3 (D2)

Prachi Mahajan
IIT Bombay

Prachi Mahajan, IITB MA108: D2-03


Warm up!

1 The DE e x y 0 + 3y = x 2 y is linear & separable.


TRUE OR FALSE?
2 The DE yy 0 + 3x = 0 is linear & separable. TRUE OR
FALSE?
3 Is the DE dx
dt =
x+2xt+cos t
1+t 2
linear/non-linear & separable/ not
separable?

Prachi Mahajan, IITB MA108: D2-03


Recall: Exact ODE’s
Definition
A first order ODE M(x, y ) + N(x, y )y 1 = 0 is called exact if there
is a function u(x, y ) such that

∂u ∂u
=M & = N.
∂x ∂y

Recall from calculus that given a function u(x, y ) with continuous


first partial derivatives, its differential is
∂u ∂u
du = dx + dy .
∂x ∂y
If the ODE given above is exact, then the differential form
∂u ∂u
M(x, y )dx + N(x, y )dy = dx + dy = du = 0.
∂x ∂y
Integrating du = 0, we get u(x, y ) = c as an implicit solution to
the given ODE.
Prachi Mahajan, IITB MA108: D2-03
Solving Exact ODE’s
Given an exact ODE as above, the function u(x, y ) can be found
either by inspection or by the following method:
Step I: Integrate ∂u
∂x = M(x, y ) with respect to x to get
Z
u(x, y ) = M(x, y )dx + k(y ),

where k(y ) is a constant of integration.


Step II: To determine k(y ) differentiate the above equation in Step
I with respect to y , to get:
Z 
∂u 0 ∂
= k (y ) + M(x, y )dx .
∂y ∂y
As the given ODE is exact, we get
Z 

N(x, y ) = k 0 (y ) + M(x, y )dx .
∂y
We use this to determine k(y ) and hence u.
Prachi Mahajan, IITB MA108: D2-03
Closed Forms

Definition
The differential form

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

is called closed if
∂M ∂N
= ,
∂y ∂x
i.e.,
My = Nx .

Prachi Mahajan, IITB MA108: D2-03


Closed Forms
Proposition
Let M, N and their first order partial derivatives exist and be
continuous in a region D ⊆ R2 .
(i) If M(x, y )dx + N(x, y )dy is an exact differential form, then it
is closed.
(ii) If D is convex, then any closed form is exact.

Proof: ∂u ∂u
(i) Let M = ∂x and N = ∂y . Then,
∂2u ∂2u
My = & Nx = .
∂y ∂x ∂x∂y
By the theorem on mixed partials, (what’s this?), My = Nx
and hence M(x, y )dx + N(x, y )dy is closed. Recall from MA
105 that this proof is same as that of “curl of grad is zero”.
Recall: A convex set is a set of points such that, given any two
points A, B in that set, the line segment AB joining them lies
entirely within that set.
Prachi Mahajan, IITB MA108: D2-03
Closed Forms
(ii) Now, let D be convex, and Mdx + Ndy be a closed form.
Consider the vector field
H(x, y ) = (M(x, y ), N(x, y )).
By our assumptions, H is continuously differentiable
throughout D. What’s its curl? The curl of H is given by

i j k
∂ ∂ ∂
∇ × H = ∂x ∂y ∂z = (Nx − My )k = 0.
M N 0

As D is convex, “curl free is grad”; i.e., there is a function


φ(x, y ) such that
H = ∇φ = (φx , φy ).
Hence φx = M, φy = N and thus Mdx + Ndy is exact.
Question: “curl free is grad” is true on more general regions? What
are they called? Examples? How did you prove this in MA 105?
Prachi Mahajan, IITB MA108: D2-03
Example

Example: Solve the ODE:

(y cos x + 2xe y ) + (sin x + x 2 e y − 1)y 1 = 0.

Let M = y cos x + 2xe y and N = sin x + x 2 e y − 1. Check:


My = Nx . Thus,
Mdx + Ndy
is closed. Can we conclude that it is exact? Yes (why?). Thus, we
have an exact ODE. Need to find u(x, y ) such that ux = M and
uy = N.

Prachi Mahajan, IITB MA108: D2-03


Example continued

Step I:
Z
u(x, y ) = (y cos x + 2xe y )dx + k(y ) = y sin x + x 2 e y + k(y ).

Step II:

uy = sin x + x 2 e y + k 0 (y ) = sin x + x 2 e y − 1.

Thus, k 0 (y ) = −1. Choosing k(y ) = −y , we get:

u(x, y ) = y sin x + x 2 e y − y = c

as an implicit solution to the given DE.

Prachi Mahajan, IITB MA108: D2-03


Integrating Factors
Suppose the first order ODE
dy
M(x, y ) + N(x, y ) =0
dx
is not exact; i.e., My 6= Nx . In this situation, we sometimes find a
function µ(x, y ) such that

dy
µ·M +µ·N =0
dx
is exact; i.e.,
(µ · M)y = (µ · N)x .
Thus,
µy M + µMy = µx N + µNx .
Such a function µ(x, y ) is called an integrating factor of the given
ODE.
Prachi Mahajan, IITB MA108: D2-03
Integrating Factors
Note: In practice, we start by looking for an IF which depends only
on one variable x or y . Suppose µ is a function of x. Then,
µy M + µMy = µx N + µNx becomes
µMy = µx N + µNx ;
i.e.,
−Nµx + (My − Nx )µ = 0.
Thus,  
dµ My − Nx
= µ.
dx N
M −N
If further, y N x is a function of x then the above is a separable
ODE which we try to solve to find µ.
Note: In the above discussion, if we assume µ to be a function of
y then we get an analogous equation:
 
dµ Nx − My
= µ.
dy M
Prachi Mahajan, IITB MA108: D2-03
Examples
Example: Solve the ODE:
dy
(8xy − 9y 2 ) + (2x 2 − 6xy ) = 0.
dx
Let M = 8xy − 9y 2 and N = 2x 2 − 6xy . Thus, My = 8x − 18y
and Nx = 4x − 6y . As My 6= Nx , the given ODE is not exact.
We first try to find an IF depending only upon one variable. Note
that
My − Nx 4x − 12y 2
= = .
N 2x(x − 3y ) x
Hence by the earlier discussion, we have:
dµ 2
= µ.
dx x
Solving this separable ODE, we get ln |µ| = ln x 2 . Hence,
µ(x) = x 2
can be chosen as an IF for the given ODE.
Prachi Mahajan, IITB MA108: D2-03
Example continued
Multiplying the given ODE by µ(x) = x 2 , we get:

dy
(8x 3 y − 9x 2 y 2 ) + (2x 4 − 6x 3 y ) = 0.
dx
Check that this is an exact ODE. To solve this exact ODE, we
need to find u(x, y ) such that

8x 3 y − 9x 2 y 2 = ux & 2x 4 − 6x 3 y = uy .

To find u(x, y ):
Step I: u(x, y ) = 2x 4 y − 3x 3 y 2 + k(y ).
Step II: uy = 2x 4 − 6x 3 y + k 0 (y ) = 2x 4 − 6x 3 y .
Thus, k 0 (y ) = 0. Hence,

u(x, y ) = 2x 4 y − 3x 3 y 2 = c

is an implicit solution of the given ODE.


Prachi Mahajan, IITB MA108: D2-03
Examples
Example: Solve the ODE: −y + x dy
dx = 0.

Check that this is not an exact DE.


Let M(x, y ) = −y and N(x, y ) = x.
N −M
To find an IF µ: note that x M y = − y2 . By the earlier discussion,
we get:
dµ 2
= − µ.
dy y
Thus, ln |µ| = −2 ln |y |. So we choose
1
µ(y ) =
y2
x dy
as an IF. Then, − y1 + y 2 dx
= 0 is exact. Thus,
 
x
d − = 0.
y
x
Therefore, a solution is given by y = c.
Prachi Mahajan, IITB MA108: D2-03
Linear DE’s

Definition
A first order linear DE of the type
dy
+ p(x)y = g (x)
dx
is called a linear DE in standard form.
Here we assume p(x) and g (x) are continuous on an interval I .

When is this exact? If and only if p(x) ≡ 0.


R
Is there an integrating factor? Check: e pdx is an integrating
factor for the given DE.

Prachi Mahajan, IITB MA108: D2-03


Linear DE’s

R
pdx dy
e is an integrating factor for + p(x)y = g (x), i.e.,
dx
R
pdx
R
pdx dy
e (py − g ) + e =0
dx
or equivalently,
d  R pdx  R
e · y = e pdx · g
dx
is exact. Solving this, we get:
R
Z R 
− pdx pdx
y =e e · g dx + c .

Prachi Mahajan, IITB MA108: D2-03


Example
Example: Solve the IVP:

ty 1 + 2y = 4t 2 ; y (1) = 2.

The standard form of the given DE is:


2y
y1 + = 4t.
t
An integrating factor is
2 2
R
µ(t) = e t
dt
= e 2 ln |t| = e ln t = t 2 .

Multiplying the given DE by t 2 , we get:

t 2 y 1 + 2yt = 4t 3 ;

i.e.,
d 2
(t y ) = 4t 3 .
dt

Prachi Mahajan, IITB MA108: D2-03


Example continued

Integrating
d 2
(t y ) = 4t 3 ,
dt
we get:
c
y = t2 + .
t2
1
The initial condition y (1) = 2 gives c = 1. Hence y = t 2 + t2
is a
solution of the IVP.

Prachi Mahajan, IITB MA108: D2-03

You might also like