Direction Fields

69
1 Math 220, Differential Equations • Professor Charles S.C. Lin • Office: 528 SEO, Phone: 413- 3741 • Office Hours: MWF 2:00 p.m. & by appointments • E-mail address: [email protected]

Transcript of Direction Fields

Page 1: Direction Fields

1

Math 220, Differential Equations

• Professor Charles S.C. Lin• Office: 528 SEO, Phone: 413-3741• Office Hours: MWF 2:00 p.m. & by

appointments• E-mail address: [email protected]

Page 2: Direction Fields

2

Teaching Assistant

• Mr. Diego Dominici• Office: 607 SEO• Office Hours: ?• Phone: 996-4814• e-mail: [email protected]

Page 3: Direction Fields

3

Please check:

• www.math.uic.edu/~berger/M220/index.html for Syllabus, assignments, etc...

• www.awlonline.com/nagle for interactive CD

Page 4: Direction Fields

4

Differential Equation: Classifications

• Ordinary differential equations, order!• Partial differential equations• Linear equations: i.e. linear in the dependent

variable(s).• Nonlinear differential equations: not linear • For example:

cs.aerodynami analysis, stressin appears eq. This

0'" xyyxy

Page 5: Direction Fields

5

Explicit solution and Implicit solution

• If a function satisfies a differential equation, for example:

• Such a function, defined explicitly as a function of independent variable x is called an explicit solution. On the other hand, the equation

easily. verifiedbecan which 23

D.E. esatisfy th ,82

3

yx

dxdy

xy

D.E. the satisfies , 0 xye y x

Page 6: Direction Fields

6

Given by

• the following:

• The equation

• is said to defined an implicit solution of the equation (*) above.

. )1()1( (*) xy

xy

xeye

dxdy

0 xyeyx

Page 7: Direction Fields

7

In fact, there are many solutions to a D.E such as (*) above.

• To find a solution passing through a specific point in xy-plane, we need to impose a condition, known as : initial value, i.e. y(x0) = y0. This is known as the initial value problem. We shall assume that the function f(x,y) is sufficiently smooth, that a solution always exists. Namely:

• Theorem (Existence and uniqueness): The I.V.P.

• always has a unique solution in a rectangle containing the point (x0, y0), if f and f x are continuous there.

00 )( , ),(' yxyyxfy

Page 8: Direction Fields

8

• Consider the first order D. E.

• the equation specifies a slope at each point in the xy-plane where f is defined.

• It gives the direction that a solution to the equation must have at each point.

Direction Fields

dydx

f x y ( , )

Page 9: Direction Fields

9

A plot of short line segments drawn at various points in the xy-plane showing the slope of the solution curve this is called a “ direction field ” for the differential equation.• The direction field gives us the “ flow of

solutions ”.

Page 10: Direction Fields

10

Example• For the equation

• Using Maple • with(DEtools);• eq:=diff(y(t),t)=t^2-y(t);• DEplot(eq,y(t),t=-5..5,y=-5..5,arrows=slim)

dydx

x y 2 .

Page 11: Direction Fields

11

Using Maple program, we have the following

• graph:

Page 12: Direction Fields

12

Another example:• Consider the logistic equation for the

population of a certain species:

• using maple, we write in commands: • eq:=diff(p(t),t)=3*p(t)-2*p(t)^2;• DEplot(eq,p(t), t=0..5,p=0..5,arrows=slim);• and get

. 2)0( with , 23 2 pppdtdp

Page 13: Direction Fields

13

• like this:

Its direction field

Page 14: Direction Fields

14

• Consider the differential equation • (*) dy/dx = f(x,y).• The set of points in the xy-plane where all

the solutions have the same slope dy/dx; i.e. the level curves for the function f(x,y) are called the isoclines for the D. E. (*).

• This is the family of curves f(x,y) = C.• This gives us a way to draw direction field.

The Method of Isoclines

Page 15: Direction Fields

15

Example

• For the differential equation

• f(x,y) = x + y, and the set of points where: • x + y = c, are straight lines with slope (-1).• We can now draw the isoclines for the D. E.• and the solution passing through a given

initial point can also be drawn.

y x y'

Page 16: Direction Fields

16

Let us graph the isoclines of f(x,y) = x + y.

• and compare it to the direction field of it, we see

Page 17: Direction Fields

17

Maple example• Let us consider the IVP for y’ = x^2 - y,

with three sets of initial points: [0,-1], [0,0] and [0,2]. What will be the corresponding solutions?

Page 18: Direction Fields

18

Separable Equation

• Given a differential equation

• If the function f(x,y) can be written as a product of two functions g(x) and h(y), i.e.

• f(x,y) = g(x) h(y), then the differential eq. is called separable.

dydx

f x y ( , )

Page 19: Direction Fields

19

Example

• The equation

• is separable, since

dydx

x xyy

31 2

31

312 2

x xyy

xyy

g x h y

( ) ( ) ( )

Page 20: Direction Fields

20

Method for solving separable equation

• Separable equation can be solved easily, • Rewrite the equation:dydx

g x h y

dyh y

g x dx

dyh y

g x dx C

( ) ( )

( )( )

( )( ) .

in the form

then find

antiderivatives on both sides. i.e.

Page 21: Direction Fields

21

Example

• Consider the initial value problem

dydx

yx

y

13

1 0( )

Page 22: Direction Fields

22

Using Maple:

• we can solve the IVP with the following Maple commands.

• ODE:=diff(y(x),x)=(y(x)-1)/(x-3);• IC:=y(-1)=0;• IVP:={ODE,IC};• GSOLN:=dsolve(ODE,y(x));• Then use the IC to find the arbitrary

constant.

Page 23: Direction Fields

23

Linear Equations• We shall study how one can solve a first order

linear differential equation of the form:

• We first rewrite the above equation in the so called “standard form”:

a xdydx

a x y b x1 0( ) ( ) ( ),

yPxyQx '()().

Page 24: Direction Fields

24

Integration Factor • Suppose we multiply a function (x) to the

above equation, we get:

• Is it possible for us to find (x) such that the left hand side

• ?

( ) ' ( ) ( ) ( ) ( )x y x P x y x Q x

LHSddx

x y [ ( ) ]

Page 25: Direction Fields

25

• Since

• We see that this can be done, if

ddx

x y xdydx

x y[ ( ) ] ( ) ' ( )

which implies

by integration, we get

ln| Hence

' ( ) ( ) ( ),

( ) ,

( )| ( ) .

( ) .( )

x x P xd

P x dx

x P x dx

x e P x dx

Page 26: Direction Fields

26

In this case,• we can solve it by integration.• Note that:

[ ( ) ]' ( ) ( ),

( ) ( ) ( ) ,

( )( )

( ) ( ) .

implies

consequently

we have

x y x Q x

x y x Q x dx c

y xx

x Q x dx c

1

Page 27: Direction Fields

27

Examples:• Consider the D.E.

• Solution:• Another example: solve the following initial

value problem:

y y e x' . 3

tdxdt

t x t x3 23 2 0 , ( ) .

Page 28: Direction Fields

28

• Consider a large tank holding 1000 L of water into which a brine solution of salt begins to flow at a constant rate of 6 L/min. The solution inside the tank is kept well stirred and is flowing out of the tank at a rate of 6 L/min. If the concentration of salt in the brine entering the tank is 1 kg/L, determine when the concentration of salt in the tank will reach 0.5 kg/L

Application: Mixing Problems (Compartmental Analysis)

Page 29: Direction Fields

29

• Let x(t) be the mass of salt in the tank at time t. The rate at which salt enters the tank is equal to “input rate - output rate”. Thus

00x

)( with , 50036

:have or we

)/1000

)(min)(/ 6()/1min)(/ 6(

xdtdx

lkgtxllkgldtdx

Page 30: Direction Fields

30

The equation is separable

• We can solve it easily, using the initial condition, we get

x t e

x te

Set e

t

t

t

( ) ( ).

( )

,

1000 1

10001

112

3500

3500

3500

Thus, the concentrationof salt in the tank at time t is:

kg / L. When will this = 12

?

we find t = 115.52 min.

Page 31: Direction Fields

31

• Suppose P(x) and Q(x) are continuous on the interval (a,b) that contains the point x0. Then the initial value problem:

• y + P(x)y = Q(x), y(x0)=y0

• for any given y0.

• has a unique solution on (a,b).

Existence and Uniqueness Theorem

Page 32: Direction Fields

32

Application to Population Growth

• If we assume that the growth rate of a population is proportional to the population present, then it leads to a D.E.:

• Let p(t) be the population at time t. Let k > 0 be the proportionality constant for the growth rate and let p0 be the population at time t = 0. Then a

• mathematical model for a population could be:dpdt

kp p p , ( ) 0 0

Page 33: Direction Fields

33

This can be solved easily.

• Example: In 1790 the population of the United States was 3.93 million, and in 1890 it was 62.95 million. Estimate the U.S. population as a function of time.

Page 34: Direction Fields

34

• The study of motion of objects and the effect of forces acting on those objects is called Mechanics. A model for Newtonian mechanics is based on Newton’s laws of motion: Let us consider an example: An object of mass m is given an initial velocity of v0 and allowed to fall under the influence of gravity. Assuming the gravitational force is constant and the force due to air resistance is proportional to the velocity of the object . Determine the equation of motion for this object.

Application to Newtonian Mechanics

Page 35: Direction Fields

35

• Since the total force acting on the object is • F = FG - FA = mg - k v(t). And according to

Newton’s 2nd law of motion, F = m a, we see that

• m a = mg - k v.

• Let x(t) be the position function of the object at time t, and

• v(t) = dx/dt, a = dv/dt.

Solution

Page 36: Direction Fields

36

Equation of motion can be rewritten as:

• The following separable initial value problem.

• We can solve the equation easily, and obtain:

where,)0( , 0vvvmkg

dtdv

. )()( 0mkt

ekmgv

kmgtv

Page 37: Direction Fields

37

• Suppose that at t = 0, the object is x0 units above the ground, i.e. x(0) = x0 . Then for the position function x(t), we have the following I.V.P.

• This can be solved easily.

Now, to find the position function x(t)

.)0( with , )( 00 xxekmgv

kmg

dtdx m

kt

Page 38: Direction Fields

38

We obtain:

• The equation of motion:

. )1)(()( 00 xekmgv

km

kmgttx m

kt

Page 39: Direction Fields

39

• We shall now consider linear 2nd order equations of the form:

Linear Differential Operators (4.2)

form". Standard" called so The

),()()( )(

form in theput becan (*) thusI,on zeronever is)( that assumegenerally WeI. interval some

onin x continuous are )( and ),( Where

),()()()( (*)

2

2

2

012

2

2

xgyxqdxdyxp

dxyd

xaxbxa

xbyxadxdyxa

dxydxa

i

Page 40: Direction Fields

40

• is the equation

Homogeneous equation associated with ()

2.order ofoperator aldifferenti a called is L.q(x)yp(x)y'y" :L[y]

i.e. equation, thisof LHSL[y] define shall wesimplicityFor algebra".linear " of sence in the

,0)()(2

2

yxqdxdyxp

dxyd

Page 41: Direction Fields

41

• We have L[y1+y2]= L[ y1]+ L[y2],• for any constants and , and any twice

differentiable functions y1 and y2 .

• Theroem1. If y1 and y2 are solutions of the homogeneous equation

• (HE): y+py+qy=0, then any linear combination y1+y2 of y1 and y2 is also a solution of (HE).

Remark on linearity of the operator L, and linear combinations of solutions to

homogeneous equation.

Page 42: Direction Fields

42

• L[y] = y + 4y + 3y, We use the convention Dy = y , D2y = y , Dny = y(n) ,

• and rewrite L[y] = D2y + 4Dy +3y, or symbolically, L = D2 + 4D +3. Since formerly D2 + 4D +3 = (D + 3)(D + 1), we see that:

• L[y] = (D + 3)(D + 1)[y]. The solutions for • L[y] = 0 are y1 = e-x , and y2 = e -3x.

Consider an example

Page 43: Direction Fields

43

• Theorem 2. Let p(x), q(x) and g(x) be continuous on an interval (a,b), and x0 (a,b). Then the I.V.P.

Existence and Uniqueness of 2nd order equation

. and valuesinitial theof choiceany for b)(a,

interval wholeon thesolution unique a has, )(' ,)(

; )()(')("

10

1000

yy

yxyyxyxgyxqyxpy

Page 44: Direction Fields

44

• Let us first define the notion of the Wronskian of two differentiable functions y1 and y2. The function

Fundamental Solutions of Homogeneous Equations

t.determinan 2x2 a as viewedbecan this:Remark

1853). - 1778 Wronski,H. ofhonor (in . and of Wronskian thecalled is

)()(')(')(:)](,[

21

212121

yyxyxyxyxyxyyW

Page 45: Direction Fields

45

Fundamental solution set• A pair of solutions [y1, y2] of L[y] = 0, on (a,b) where

L[y] = y+py+qy is called a fundamental solution set, if W[y1, y2](x0) 0 for some x0 (a,b) . A simple example: Consider

• L[y] = y+9y. It is easily checked that y1 = cos 3x and y2 = sin 3x are solutions of L[y] = 0. Since the corresponding Wronskian W[y1, y2](x) = 3 0 , thus {cos 3x, sin 3x} forms a fundamental solution set to the homogenenous eq: y + 9y = 0. We see that any linear combination c1 y1 + c2 y2 also satisfies L[y] = 0. This is known as a general solution

Page 46: Direction Fields

46

Linear Independence, Fundamental set and Wronskian

• Theorem. Let y1 and y2 be solutions to the equation y + py + qy = 0 on (a,b). Then the following statements are equivalent:

• (A) {y1, y2} is a fundamental solution set on (a,b).

• (B) y1 and y2 are linearly independent on (a,b).

• (C) The W[y1, y2](x) is never zero on (a,b).

• For the proof, we need some linear algebra, i.e. • Linearly dependent vectors,uniqueness theorem etc...

Page 47: Direction Fields

47

Reminder

• First Hour Exam:• Date: June 15 (Friday)• Room: TBA

Page 48: Direction Fields

48

Homogeneous Linear Equations With Constant Coefficients

• Recall: For equations of the form• ay + by + cy = 0,• by subsituting y = e r x, we obtain the • auxiliary eq: ar2 + br + c = 0. If r1 and r2

• are two distinct roots, then a general solution is of the form y = c1exp(r1x)+ c2exp(r2x), where c1 and c2 are arbitrary constants.

Page 49: Direction Fields

49

Repeated Roots• If in the above equation, r1 = r2 = r, then a• general solution is of the form• y = c1exp(rx) + c2x exp(rx),• Example: consider the D.E. : y + 4y´ + 4 = 0. • Its auxiliary equation is: r2 + 4r + 4 = 0, hence • r = -2 is a double root, the general solution is• y = c1e -2x + c2x e -2x,

Page 50: Direction Fields

50

Cauchy-Euler Equations

• If an equation is of the form: ax2y + bxy´ + cy = h(x), a, b, c are constants, then by letting x = e t, we transform the original equation into:(with t as the independent variable), ay + (b-a)y´ + cy = h(e t). An equation with constant coefficients. Hence can be solved by the method of constant coefficients. The equation above is known as a Cauchy-Euler Equation.

Page 51: Direction Fields

51

Reduction of order• We know ,in general, a second order linear

differential equation has two linearly independent solutions. If we already have one solution, how can we find the other one?

• Let f(x) be a solution to y + p(x)y´ + q(x)y = 0.• We will try to find another solution of the form• y(x) = v(x)f(x), with v(x) a non-constant function.• Formerly, we have y ´ = v´f + vf ´, and y = …• set w = v ´, etc…, we obtain a separable eq. in w.• Finally find v from w by integration.

Page 52: Direction Fields

52

Example• Given f(x) = x-1 is a solution to • x2 y - 2xy´ -4y = 0, x > 0;• find a second linearly independent solution.• First write the D.E. in standard form.• Next compute v.• Finally, 2nd independent solution is y = v f.

Page 53: Direction Fields

53

Auxiliary Eq. With Complex Roots• If the auxiliary equation of a linear 2nd order D. E.

with constant coefficents: ar2 + br + c = 0, has complex roots, (when b2 - 4ac < 0 ). i.e.

• r1 = + i and r2 = - i, where and are real numbers, then the solutions are

• y1 = e ( + i)x , and y2 = e ( - i)x. Since we know that e i x = cos x + i sin x , we simply take

• y1 = e x cos x , and y2 = e x sin x as the two linearly independent solutions.

Page 54: Direction Fields

54

And the general solution is of the form

• y(x) = c1 e x cos x + c2 e x sin x, where c1

and c2 are arbitrary constants.• Remark about complex solution:• z(x) = u(x) + iv(x) to L[z] = 0 and the fact that

in this case, we also have L[u] = 0 and L[v] = 0. Thus the real part and the imaginary part of a complex solution to L[y] = 0 are also solutions of L[y] = 0.

Page 55: Direction Fields

55

Example• Consider the D.E.

.sincos issolution general the

and .siny and ,cos Hence

.32

46 are roots that the

see we,04)10)(1(4)6(4

Since .0106 :isequation

auxiliary eClearly th .010'6"

32

31

32

31

22

2

xecxecy

xexey

ir

acb

rr

zzz

xx

xx

Page 56: Direction Fields

56

Nonhomogeneous Equation And the the method of Superposition

• Let L be a linear operator of 2nd order, i.e. L= D2 + pD + q, and g 0. The equation:

• L[y] = g, is called a Nonhomogeneous eq.• We wish to solve the equation L[y] = g ,

using a particular solution to L[y] = g , and a fundamental solution set to L[y] = 0. First let me introduce the concept of the method of superposition.

Page 57: Direction Fields

57

Theorem: Let y1 be a solution to the equation L[y] = g1, and let y2 be a solution to the equation L[y] = g2, where g1 and g2 are two functions. Then for any two constants c1 and c2, the linear combination c1 y1 + c2 y2

is a solution to the equationL[y] = c1 g1 + c2 g2 . (This is known as the Superposition principle).

Page 58: Direction Fields

58

Proof

Page 59: Direction Fields

59

Representation Theorem of L[y] = g.• Theorem: Let yp(x) be a particular solution to the

nonhomogeneous equation (*) L[y] = g(x), where L[y]= y + p(x) y + q(x) y , on the interval (a,b) and let y1(x) and y2(x) be a fundamental solution set of L[y] = 0 on the interval (a,b). Then every solution of (*) can be written in the form

• (**) y(x) = yp(x) + c1 y1(x) +c2 y2(x) . This is known as the general solution to (*).

Page 60: Direction Fields

60

Example

• Given that yp(x) = x2 is a particular solution of the equation:

• (*) y - y = 2 - x2, • find a general solution of (*).• Note the auxiliary equation is r 2 - 1 = 0. It

follows that a general solution of (*) is of the form y = x2 + c1e-x + c2e x.

Page 61: Direction Fields

61

Superposition Principle & the Method of Undetermined

coefficients.• Example: Find a general solution to the D.E.

• Step 1: We first consider the associated homogenous equation:

y y x ex" . 3 2

y y" 3 0

Page 62: Direction Fields

62

Step 2: Find particular solution to the Non-homogenous equation

using the Superposition Principle• There are “2” equations:

y y x

y y ex"

" .

3

3

2

Page 63: Direction Fields

63

To find a particular solution to each of the above equations

• We use the method of undetermined coefficients, that is: for the first equation, we try yp = ax2 + bx + c, and

• For the second equation, we try yp = Aex.

• If any term in the trial expression for yp is a solution to the corresponding homogeneous equation, then we replace yp by x yp, etc…. See table 4.1 on Page 208 of your book.

Page 64: Direction Fields

64

Next we present a more general method, known as:

• The method of variation of parameters,

Page 65: Direction Fields

65

• Consider the non-homogenous linear second order differential equation :

The Method of Variation of Parameters

y p x y q x y g xy x y x

y p x y q x y

y v x y x v x y xp

" ( ) ' ( ) ( ).{ ( ), ( )}

" ( ) ' ( ) .

( ) ( ) ( ) ( ).

..........(1)Let be a fundamental solution set for the corresponding homogeneous equation

We try particular solution of the equation (1) in the form:

1 2

1 1 2 2

0

Page 66: Direction Fields

66

• two equations (by avoiding 2nd order derivatives for the unknows and from L[yp]=g):

Where v1 and v2 are functions to be determined. We obtain:

v y v yv y v y g

v xg x y x

W y y xv x

g x y xW y y x

1 1 2 2

1 1 2 2

12

1 22

1

1 2

0' ' ,' ' ' ' .

' ( )( ) ( )

[ , ]( ), ' ( )

( ) ( )[ , ]( )

.

and solving these two

equations simultaneuously, we get

Page 67: Direction Fields

67

• two equations (by avoiding 2nd order derivatives for the unknows and from L[yp]=g):

Where v1 and v2 are functions to be determined. We obtain:

v y v yv y v y g

v xg x y x

W y y xv x

g x y xW y y x

1 1 2 2

1 1 2 2

12

1 22

1

1 2

0' ' ,' ' ' ' .

' ( )( ) ( )

[ , ]( ), ' ( )

( ) ( )[ , ]( )

.

and solving these two

equations simultaneuously, we get

Page 68: Direction Fields

68

Finally, solution is found by integration.

• Example:

. ln4' 4"

D.E. theosolution t general a Find2 xeyyy x

Page 69: Direction Fields

69