02 first order differential equations

Preview:

DESCRIPTION

first order differential equation

Citation preview

FIRST ORDER DIFFERENTIAL EQUATIONS

In this lecture we discuss various methods of solving first order differential equations.

These include:

• Variables separable

• Homogeneous equations

• Exact equations

• Equations that can be made exact by multiplying by an integrating factor

( , )y f x y

Linear Non-linear

Integrating Factor

Separable Homogeneous Exact

IntegratingFactor

Transform to ExactTransform to separable

The first-order differential equation

,dy

f x ydx

is called separable provided that f(x,y) can be written as the product of a function of x and a function of y.

(1)

Variables Separable

Suppose we can write the above equation as

)()( yhxgdx

dy

We then say we have “ separated ” the variables. By taking h(y) to the LHS, the equation becomes

1( )

( )dy g x dx

h y

Integrating, we get the solution as

1( )

( )dy g x dx c

h y

where c is an arbitrary constant.

Example 1. Consider the DE ydx

dy

Separating the variables, we get

dxdyy

1

Integrating we get the solution as

kxy ||ln

or ccey x , an arbitrary constant.

Example 2. Consider the DE3

23 ln 0x

x y dx dyy

Separating the variables, we get

dxx

dyyy

3

ln

1

Integrating we get the solution askxy ln3|ln|ln

or cx

cy ,ln

3 an arbitrary constant.

Homogeneous equations

Definition A function f(x, y) is said to be homogeneous of degree n in x, y if

),(),( yxfttytxf n for all t, x, y

Examples 22 2),( yxyxyxf is homogeneous of degree

)sin(),(x

xy

x

yyxf

is homogeneous of degree

2.

0.

A first order DE 0),(),( dyyxNdxyxM

is called homogeneous if ),(,),( yxNyxM

are homogeneous functions of x and y of the same degree.

This DE can be written in the form

),( yxfdx

dy

where ),(/),(),( yxNyxMyxf is

clearly homogeneous of degree 0.

The substitution y = z x converts the given equation into “variables separable” form and hence can be solved. (Note that z is also a (new) variable,) We illustrate by means of examples.

Example 3. Solve the DE

02)3( 22 dxxydyyx

Let y = z x. Hence we get

That is )3(

222 yx

xy

dx

dy

)3(

2

)3(

22222

2

z

z

xzx

xz

dx

dzxz

)3()3(

22

3

2 z

zzz

z

z

dx

dzx

or

Separating the variables, we get

x

dxdz

zz

z

3

2 )3(

Integrating we get

x

dxdz

zz

z3

2 )3(

We express the LHS integral by partial fractions. We get

cx

dxdz

zzzln

1

1

1

13

or ccxzzz ,)1)(1(3 an arbitrary constant.

Noting z = y/x, the solution is:

,))(( 3ycxyxy c an arbitrary constant

or ,322 ycyx c an arbitrary constant

Working Rule to solve a HDE:

1. Put the given equation in the form

.Let .3 zxy

)1(0),(),( dyyxNdxyxM

2. Check M and N are Homogeneous function of the same degree.

5. Put this value of dy/dx into (1) and solve the equation for z by separating the variables.

6. Replace z by y/x and simplify.

dx

dzxz

dx

dy

4. Differentiate y = z x to get

Example 4. Solve the DE

)sin(x

xy

x

yy

Let y = z x. Hence we get

zzdx

dzxz sin or z

dx

dzx sin

Separating the variables, we getx

dxdz

z

sin

1

Integrating we get

where

cosec z – cot z = c x

and c an arbitrary constant.y

zx

We shall now see that some equations can be brought to homogeneous form by appropriate substitution.

Non-homogeneous equations

Example 5 Solve the DE

0)23()12( dyyxdxyx

That is )23(

)12(

yx

yx

dx

dy

We shall now put x = u+h, y = v+k

where h, k are constants ( to be chosen).

Hence the given DE becomes

)233(

)122(

khvu

khvu

du

dv

We now choose h, k such that

023

012

kh

kh Hence

5

3,

5

1 kh

Hence the DE becomes

)3(

)2(

vu

vu

du

dv

which is homogeneous in u and v.

Let v = z u. Hence we get

)31(

)2(

z

z

du

dzuz

)31(

)322(

)31(

)2( 2

z

zzz

z

z

du

dzu

or

Separating the variables, we get

u

dudz

zz

z

2322

)31(

Integrating we get czzu )322( 22

cvuvu 22 322i.e.

or 2 21 3 32( 1/ 5) 2( )( ) 3( )

5 5 5x x y y c

Example 6 Solve the DE

0)223()346( dyyxdxyx

)223(

)346(

yx

yx

dx

dyThat is

Now the previous method does not work as the lines

0223

0346

yx

yx

are parallel. We now put u = 3x + 2y.

The given DE becomes

)2(

)32()3(

2

1

u

u

dx

du

or2)2(

)64(3

u

u

u

u

dx

du

Separating the variables, we get

dxduu

u

2

Integrating, we get

dxduu

u

2

cxuu 2ln

i.e.

cxyxyx 2)23(ln23

EXACT DIFFERENTIAL EQUATIONS

A first order DE 0),(),( dyyxNdxyxM

is called an exact DE if there exits a function f(x, y) such that

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

Here df is the ‘total differential’ of f(x, y) and equals f f

dx dyx y

Hence the given DE becomes df = 0

Integrating, we get the solution as

f(x, y) = c, c an arbitrary constant

Thus the solution curves of the given DE are the ‘level curves’ of the function f(x, y) .

Example 8 The DE 0y dx x dy is exact as it is d (xy) = 0

Hence the solution is: x y = c

Example 7 The DE 0x dx y dy

is exact as it is d (x2+ y2) = 0

Hence the solution is: x2+ y2 = c

Example 9 The DE 2

1sin( ) sin( ) 0

x x xdx dy

y y y y

is exact as it is (cos( ) ) 0x

dy

Hence the solution is: cos( )x

cy

Test for exactnessSuppose 0),(),( dyyxNdxyxM

is exact. Hence there exists a function f(x, y)

such that

( , ) ( , )f f

M x y dx N x y dy df dx dyx y

Hence ,

f fM N

x y

Assuming all the 2nd order mixed derivatives of f(x, y) are continuous, we get

2 2M f f N

y y x x y x

Thus a necessary condition for exactness is

M N

y x

We saw a necessary condition for exactness is

M N

y x

We now show that the above condition is also sufficient for M dx + N dy = 0 to be exact. That is, if

,f f

M Nx y

then there exists a function f(x, y) such that

M N

y x

Integrating f

Mx

partially w.r.t. x, we get

( , ) ( )x

f x y M dx g y where g(y) is a function of y alone

We know that for this f(x, y), f

Ny

……. (*)

Differentiating (*) partially w.r.t. y, we get

( )x

fM dx g y

y y

= N gives

or ( )x

g y N M dxy

… (**)

We now show that the R.H.S. of (**) is independent of x and thus g(y) (and so f(x, y)) can be found by integrating (**) w.r.t. y.

x

N M dxx y

x

NM dx

x x y

x

NM dx

x y x

NM

x y

= 0

Q.E.D.

Note (1) The solution of the exact DE d f = 0 is f(x, y) = c.

Note (2) When the given DE is exact, the solution f(x, y) = c is found as we did in the previous theorem. That is, we integrate M partially w.r.t. x to get ( , ) ( )

x

f x y M dx g y

The following examples will help you in understanding this.

We now differentiate this partially w.r.t. y and equating to N, find g (y) and hence g(y).

Example 8 Test whether the following DE is exact. If exact, solve it. 2

( ) 0x dy y dxy

Here 2, ( )M y N x

y

1M N

y x

Hence exact.

Now ( , ) ( )x x

f x y M dx y dx xy g y

Differentiating partially w.r.t. y, we get2

( )f

x g y N xy y

Hence 2( )g y

y

Integrating, we get ( ) 2ln | |g y y

(Note that we have NOT put the arb constant )

Hence ( , ) ( ) 2ln | |f x y xy g y xy y Thus the solution of the given d.e. is

( , )f x y c 2ln | | ,xy y c or c an arb const.

Example 9 Test whether the following DE is exact. If exact, solve it.

4 2 3(2 sin ) (4 cos ) 0x y y dx x y x y dy

Here 4 2 32 sin , 4 cosM xy y N x y x y

38 cosM N

xy yy x

Hence exact.

Now 4( , ) (2 sin )x x

f x y M dx xy y dx 2 4 sin ( )x y x y g y

Differentiating partially w.r.t. y, we get2 34 cos ( )

fx y x y g y

y

Hence ( ) 0g y

Integrating, we get ( ) 0g y (Note that we have NOT put the arb constant )Hence

2 4 2 4( , ) sin ( ) sinf x y x y x y g y x y x y Thus the solution of the given d.e. is

( , )f x y c 2 4 sin ,x y x y c or c an arb const.

2 34 cosN x y x y

In the above problems, we found f(x, y) by integrating M partially w.r.t. x and then

.f

to Ny

We can reverse the roles of x and y. That is we can find f(x, y) by integrating N partially

.f

to Mx

The following problem illustrates this.

w.r.t. y and then equate

equated

Example 10 Test whether the following DE is exact. If exact, solve it.

2 2(1 sin 2 ) 2 cos 0y x dx y x dy

Here M

2 sin 2 ;M

y xy

Hence exact.Now 2( , ) 2 cos

y y

f x y N dy y x dy 2 2cos ( )y x g x

N 21 sin 2 ,y x 22 cosy x

4 cos sin 2 sin 2N

y x x y xx

Differentiating partially w.r.t. x, we get

22 cos sin ( )f

y x x g xx

gives ( ) 1g x

Integrating, we get ( )g x x(Note that we have NOT put the arb constant )Hence

2 2 2 2( , ) cos ( ) cosf x y y x g x y x x Thus the solution of the given d.e. is

( , )f x y c 2 2cos ,x y x c or c an arb const.

21 sin 2M y x

2 sin 2 ( )y x g x

The DE 2( 1) ( ) 0x y dx x xy dy

is NOT exact but becomes exact when

multiplied by 1

x 1( ) ( ) 0y dx x y dy

x

i.e. 21ln 0

2d xy x y

We say1

x

as it becomes

is an Integrating Factor of the given DE

Integrating Factors

Definition If on multiplying by (x, y), the DE

0M dx N dy

becomes an exact DE, we say that (x, y) is an Integrating Factor of the above DE

2 2

1 1 1, ,

xy x yare all integrating factors of

the non-exact DE 0y dx x dy

We give some methods of finding integrating factors of an non-exact DE

Problem Under what conditions will the DE

0M dx N dy have an integrating factor that is a function of x alone ?

Solution. Suppose = h(x) is an I.F.

Multiplying by h(x) the above d.e. becomes

( ) ( ) 0 .......(*)h x M dx h x N dy Since (*) is an exact DE, we have

( ( ) ) ( ( ) )h x M h x Ny x

i.e. ( ) ( ) ( ) ( )M N

h x M h x h x N h xy y x x

( ) 0 ( ) ( )M N

h x M h x N h xy x

or

( )( ) ( )M N

h x N h xy x

( )

( )

M Nh xy x

N h x

or

or

( )

M Ny x

g xN

Hence if

is a function of x alone, then

( )g x dxe

is an integrating factor of the given DE

0M dx N dy

Rule 2: Consider the DE 0M dx N dy

If ( )

M Ny x

h yM

, a function of y alone,

then( )h y dy

e is an integrating factor of the given DE

Problem Under what conditions will the DE

0M dx N dy have an integrating factor that is a function of the product z = x y ?

Solution. Suppose = h(z) is an I.F.

Multiplying by h(z) the above d.e. becomes

( ) ( ) 0 .......(*)h z M dx h z N dy Since (*) is an exact DE, we have

( ( ) ) ( ( ) )h z M h z Ny x

i.e. ( ) ( ) ( ) ( )M N

h z M h z h z N h zy y x x

( ) ( ) ( ) ( )M N

h z M h z x h z N h z yy x

or

( )( ) ( )( )M N

h z h z Ny Mxy x

( )

( )

M Nh zy x

Ny Mx h z

or

or

( )

M Ny x

g zNy Mx

Hence if

is a function of z = x y alone, then

( )g z dze

is an integrating factor of the given DE

0M dx N dy

Example 11 Find an I.F. for the following DE and hence solve it.

2( 3 ) 2 0x y dx xy dy Here

6 2M N

y yy x

2( 3 ); 2M x y N xy

Hence the given DE is not exact.

M Ny x

N

Now

6 2

2

y y

xy

2( ),g x

x

a function of x alone. Hence

( )g x dxe

22dx

xe x is an integrating factor of the given DE

Multiplying by x2, the given DE becomes

3 2 2 3( 3 ) 2 0x x y dx x y dy

which is of the form 0M dx N dy

Note that now 3 2 2 3( 3 ); 2M x x y N x y

Integrating, we easily see that the solution is4

3 2 ,4

xx y c c an arbitrary constant.

Example 12 Find an I.F. for the following DE and hence solve it.

( cot 2 csc ) 0x xe dx e y y y dy Here

0 cotxM Ne y

y x

; cot 2 cscx xM e N e y y y

Hence the given DE is not exact.

M Ny x

M

Now0 cotx

x

e y

e

cot ( ),y h y

a function of y alone. Hence

( )h y dye

cotsin

y dye y

is an integrating factor of the given DE

Multiplying by sin y, the given DE becomes

sin ( cos 2 ) 0x xe y dx e y y dy

which is of the form 0M dx N dy

Note that now sin ; cos 2x xM e y N e y y

Integrating, we easily see that the solution is

c an arbitrary constant.2sin ,xe y y c

Example 13 Find an I.F. for the following DE and hence solve it.

2 3( 2 ) 0y dx x x y dy Here

31 1 4M N

xyy x

2 3; 2M y N x x y

Hence the given DE is not exact.

M Ny x

Ny Mx

Now 3

2 4

1 (1 4 )

( 2 )

xy

xy x y xy

2 2

( ),g zxy z

a function of z =x y alone. Hence

( )g z dze

2

2 2 2

1 1dzze

z x y

is an integrating factor of the given DE

2 2

1 1( 2 ) 0d x y d y

x y xy

which is of the form 0M dx N dy

Integrating, we easily see that the solution is

c an arbitrary constant.21,y c

xy

Multiplying by2 2

1,

x y the given DE becomes

Problem Under what conditions will the DE

0M dx N dy have an integrating factor that is a function of the sum z = x + y ?

Solution. Suppose = h(z) is an I.F.

Multiplying by h(z) the above DE becomes

( ) ( ) 0 .......(*)h z M dx h z N dy Since (*) is an exact DE, we have

( ( ) ) ( ( ) )h z M h z Ny x

i.e. ( ) ( ) ( ) ( )M N

h z M h z h z N h zy y x x

( ) ( ) ( ) ( )M N

h z M h z h z N h zy x

or

( )( ) ( )( )M N

h z h z N My x

( )

( )

M Nh zy x

N M h z

or

or

( )

M Ny x

g zN M

Hence if

is a function of z = x + y alone, then ( )g z dz

e

is an integrating factor of the given DE

0M dx N dy

Linear EquationsLinear Equations

A linear first order equation is an equation that A linear first order equation is an equation that can be expressed in the formcan be expressed in the form

1 0( ) ( ) ( ), (1)dy

a x a x y b xdx

where a1(x), a0(x), and b(x) depend only on the independent variable x, not on y.

We assume that the function a1(x), a0(x), and b(x) are continuous on an interval and that a1(x) 0on that interval. Then, on dividing by a1(x), we can rewrite equation (1) in the standard form

( ) ( ) (2)dy

P x y Q xdx

where P(x), Q(x) are continuous functions on the interval.

Let’s express equation (2) in the differential form ( ) ( ) 0 (3)P x y Q x dx dy

If we test this equation for exactness, we find

( ) 0M N

P x andy x

Consequently, equation(3) is exact only when P(x) = 0. It turns out that an integrating factor , which depends only on x, can easily obtained the general solution of (3).

Multiply (3) by a function (x) and try to determine (x) so that the resulting equation

( ) ( ) ( ) ( ) ( ) 0 (4)x P x y x Q x dx x dy

is exact. ( ) ( ) ( )M N d

x P x and xy x dx

We see that (4) is exact if satisfies the DE

( ) ( ) ( ) (5)d

x P x xdx

( ) exp ( ) (6)x P x dx Which is our desired IF

In (2), we multiply by (x) defined in (6) to obtain

( ) ( ) ( ) ( ) ( ) (7)dy

x P x x y x Q xdx

We know from (5) ( ) ( )d

P x xdx

and so (7) can be written in the form

( ) ( ) ( ) (8)

( ) ( ) ( ) ( )

dx y x Q x

dx

dy dx x y x Q x

dx dx

Integrating (8) w.r.t. x gives

( ) ( ) ( )x y x Q x dx C and solving for y yields

exp ( ) ( ) ( )y P x dx x Q x dx C

Working Rule to solve a LDE:

1. Write the equation in the standard form

( ) ( )dy

P x y Q xdx

2. Calculate the IF (x) by the formula

( ) exp ( )x P x dx 3. Multiply the equation in standard form

by (x) and recalling that the LHS is just ( ) ,

dx y

dx obtain

( ) ( ) ( )d

x y x Q xdx

4. Integrate the last equation and solve for y by dividing by (x).

Ex 1. Solve

1cossincos

xxxydx

dyxx

Solution :- Dividing by x cos x, throughout, we get

x

xy

xx

dx

dy sec1tan

1tan( )( )

x dxP x dx xx e e

log sec log loglog sec( ) sece e ex x xxx e e e x x

secsec sec

d x

dx xy x x x x

2sec sec tany x x dx C x C

Multiply by secx x yields

Integrate both side we get

Problem (2g p. 62): Find the general solution of the equation

.0'cot xyxxyxy

Ans.: .cossinsin cxxxxxy

The usual notation implies that x is independent variable & y the dependent variable. Sometimes it is helpful to replace x by y and y by x & work on the resulting equation.

* When diff equation is of the form

dx

dy

yQxyPdy

dx .

&

P y dyIF e solution is x IF Q IF dy c

Q. 4 (b) Solve

dx

dyeyxy y2

yeyxdy

dxy 2

yeyxydy

dx 1

2' ' yy xy y y e

yeeIF y

dyy 1ln

1

dyedyy

eyy

x yy 11

cey

x y

cyeyx y

Recommended