school of mathematics and statistics math1002 mathematical ... · math1002 mathematical methods 2...

21
MATH1002 Mathematical Methods 2 | Enrichment Session 1 1 School of Mathematics and Statistics MATH1002 MATHEMATICAL METHODS 2 ENRICHMENT SESSION 1 First-order differential equations A general first-order differential equation (1 st -order DE) may be written in the form dy dx = f (x, y ), or alternatively M (x, y ) dx + N (x, y ) dy =0, where f (x, y ), M (x, y ) and N (x, y ) are arbitrary (but known!) functions of x and y , and we wish to find a solution y (x) that satisfies the DE.

Upload: others

Post on 25-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 1

School of Mathematics and Statistics

MATH1002 MATHEMATICAL METHODS 2

ENRICHMENT SESSION 1

First-order differential equations

A general first-order differential equation (1st-order DE) may be writtenin the form

dy

dx= f (x, y),

or alternativelyM(x, y) dx + N(x, y) dy = 0,

where f (x, y), M(x, y) and N(x, y) are arbitrary (but known!) functionsof x and y, and we wish to find a solution y(x) that satisfies the DE.

Page 2: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 2

There are seven main types of 1st-order differential equations, namely:

• Separable DE’s;

• Linear DE’s;

• Exact DE’s;

• Bernoulli DE’s;

• Homogeneous DE’s;

• Ricatti DE’s; and

• Abel DE’s.

General solution strategies for separable and linear DE’s were covered inMATH1001 Mathematical Methods 1 – here I will discuss solution strate-gies for exact, Bernoulli and homogeneous DE’s.

Unfortunately, there are no general solution strategies for Ricatti and AbelDE’s, only specific solution strategies.

Page 3: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 3

Review – Separable DE’s

A 1st-order DE is called separable provided that the function f (x, y) maybe written as the product of a function of x and a function of y, that isf (x, y) = F (x)G(y).

Thus the variables x and y can be “separated” and placed on oppositesides of the equation; that is, given

dy

dx= F (x)G(y),

then by thinking of the derivative dy/dx as a fraction we have1

G(y)dy = F (x) dx,

and then each side can be integrated, so that∫1

G(y)dy =

∫F (x) dx + C,

Page 4: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 4

where the arbitrary integration constant C includes the constants fromboth integrals.

We then solve this equation (if possible) for y, which yields the generalsolution of the differential equation.

If we can uniquely solve for y, then the solution is called the explicitsolution of the differential equation, but if we cannot uniquely solve for y,then the solution is called the implicit solution of the differential equation.

Example

Consider the DEdy

dx=√xy.

Page 5: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 5

Notice thatdy

dx=√xy

=√x√y

= x12y

12,

so the DE is separable – separating x and y we have

y−12 dy = x

12 dx,

and integrating both sides we have

2y12 = 2

3x32 + C,

which is the implicit solution. This can be uniquely solved for y, so theexplicit solution is

y =(

13x

32 + C

)2,

where we have arbitrarily re-named the integration constant C.

Page 6: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 6

Review – Linear DE’s

A 1st-order linear DE in one that may be written in the following standardform

dy

dx+ f (x)y = g(x),

where f (x) and g(x) are arbitrary functions of x only. Note that ifg(x) 6= 0, the DE is not separable.

To solve such a DE, we multiply both sides by a function I(x) such thatthe L.H.S. may be written

I

(dy

dx+ fy

)=

d

dx(Iy),

thus allowing the L.H.S. to be integrated – hence the function I(x) is calledan integrating factor.

Page 7: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 7

If an integrating factor I(x) can be found, then the genral solution is

d

dx(Iy) = Ig ⇒ Iy =

∫Ig dx+C ⇒ y(x) =

1

I(x)

∫I(x)g(x) dx+

C

I(x).

How to we find the function I(x)? Since

I

(dy

dx+ fy

)=

d

dx(Iy),

we have by expanding the L.H.S. and using the product rule on the R.H.S,that

Idy

dx+ Ify = y

dI

dx+ I

dy

dx⇒ Ify = y

dI

dx⇒ dI

dx= If.

This is a separable DE for I(x), with solution

1

IdI = f dx⇒ ln(I) =

∫f dx + C ⇒ I = exp

(∫f dx + C

).

Page 8: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 8

We want the simplest possible solution for I(x), so we set C = 0.

Hence the integrating factor I(x) = exp

(∫f (x) dx

).

Example

Consider the DE

xdy

dx− y − x2ex.

In standard form we havedy

dx− 1

xy = xex,

so f (x) = −1

xand g(x) = xex. Then∫f (x) dx =

∫−1

xdx = − lnx = ln

(x−1

),

Page 9: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 9

and hence

I(x) = exp

(∫f (x) dx

)= eln(x−1) = x−1.

Then ∫I(x)g(x) dx =

∫ (x−1

)(xex) dx =

∫ex dx = ex,

and the general solution is therefore

y(x) =1

I(x)

∫I(x)g(x) dx +

C

I(x)

=

(1

x−1

)(ex) +

C

x−1

= xex + Cx.

Page 10: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 10

Exact DE’s

Consider a 1st-order DE

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

where M(x, y) and N(x, y) are arbitrary functions of x and y.

A 1st-order DE that can be written in this form is called an exact DEif there exists a function f (x, y) of x and y such that

∂f

∂x= M(x, y) and

∂f

∂y= N(x, y).

If such a function f exists, then M(x, y) dx+N(x, y) dy may be written

df =∂f

∂xdx +

∂f

∂ydy = 0 since M(x, y) dx + N(x, y) dy = 0,

where df is called the total differential of the function f .

Page 11: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 11

By integrating both sides the solution of df = 0 is simply

f (x, y) = C,

where C is our constant of integration.

This equation gives us the general solution y(x) implicitly, just like withsome of the separable DE’s.

To check of a DE is exact, we compare∂M

∂yand

∂N

∂x. If these partial

derivatives are exactly equal, then the given DE is exact.

Why is this so? Recall that for a function f (x, y) the first partial deriva-tives are

∂f

∂xand

∂f

∂y.

Page 12: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 12

Since these are functions of x and y in their own right, they also havepartial derivatives:

∂x

(∂f

∂x

)=∂2f

∂x2,

∂y

(∂f

∂x

)=

∂2f

∂y∂x,

and∂

∂x

(∂f

∂y

)=

∂2f

∂x∂y,

∂y

(∂f

∂y

)=∂2f

∂y2.

The first and last partial derivatives in the above list are the second partialderivatives with respect to x and y respectively, while the middle two aremixed second partial derivatives.

It turns out that the mixed partial derivatives are equal, that is

∂2f

∂x∂y=

∂2f

∂y∂x.

Page 13: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 13

This is known as Clairaut’s theorem (or equivalently Schwarz’ theorem) –this property is called “the symmetry of second derivatives” or “the equal-ity of mixed partial derivatves”.

Now, recall that for an exact differential equation there exists a functionf of x and y such that

∂f

∂x= M(x, y) and

∂f

∂y= N(x, y).

Differentiating the first w.r.t. x and the second w.r.t. y we have

∂2f

∂y∂x=∂M

∂yand

∂2f

∂x∂y=∂N

∂x,

therefore since the mixed partial derivatives are equal we must have∂M

∂y=∂N

∂x.

Page 14: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 14

Example

Consider the DE(3x2y + 3y2 − 1

)dx +

(x3 + 6xy

)dy = 0.

Here we have

M(x, y) = 3x2y + 3y2 − 1 , N(x, y) = x3 + 6xy,

and∂M

∂y= 3x2 + 6y ,

∂N

∂x= 3x2 + 6y,

therefore∂M

∂y=∂N

∂xand the DE is exact. Now let

∂f

∂x= M(x, y) = 3x2y + 3y2 − 1 and

∂f

∂y= N(x, y) = x3 + 6xy.

Page 15: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 15

So we have

∂f

∂x= 3x2y + 3y2 − 1

∂f

∂y= x3 + 6xy

f =

∫3x2y + 3y2 − 1 dx

= x3y + 3xy2 − x + g(y)

∴ ∂f

∂y= x3 + 6xy + g′(y)

∴ g′(y) = 0⇒ g(y) = 0

∴ f (x, y) = x3y + 3xy2 − x

and therefore the implicit solution of the DE is x3y + 3xy2 − x = C.

Page 16: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 16

Alternatively, we have

∂f

∂x= 3x2y + 3y2 − 1

∂f

∂y= x3 + 6xy

f =

∫x3 + 6xy dy

= x3y + 3xy2 + g(x)

∴ ∂f

∂x= 3x2y + 3y2 + g′(x)

∴ g′(x) = −1⇒ g(x) = −x∴ f (x, y) = x3y + 3xy2 − x

and therefore the implicit solution of the DE is again x3y+ 3xy2−x = C.

Page 17: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 17

Exact DE’s via integrating factors

Consider the DE(3xy + 2y2 + 2

)dx +

(x2 + 2xy

)dy = 0.

Notice that the DE is not “quite” exact since

M(x, y) = 3xy + 2y2 + 2 , N(x, y) = x2 + 2xy,∂M

∂y= 3x + 4y ,

∂N

∂x= 2x + 2y,

and therefore∂M

∂y6= ∂N

∂x, but it is “almost” exact.

Sometimes 1st-order DE’s can be turned into an exact DE by first multi-plying the DE by an appropriate function µ(x, y) of both x and y, calledan integrating factor (as it enables one to integrate and hence solve theDE, just like the integrating factor for 1st-order linear DE’s).

Page 18: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 18

By multiplying the DE by µ so we have

µ(

3xy + 2y2 + 2)dx + µ

(x2 + 2xy

)dy = 0,

all we have to do is find a function µ so that

∂y

[µ(

3xy + 2y2 + 2)]

=∂

∂x

[µ(x2 + 2xy

)],

and then the DE will be exact.

By using the product rule we find that(

3xy + 2y2 + 2) ∂µ∂y

+ µ (3x + 4y) =(x2 + 2xy

) ∂µ∂x

+ µ (2x + 2y) .

This is called a partial differential equation (PDE) for the unknownfunction µ(x, y), and they are notoriously difficult to solve. However, anysolution of the PDE will serve our purpose, so we start with the simplestpossible guesses and see if they lead anywhere.

Page 19: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 19

If we assume that µ is only a function of y, then the PDE becomes the1st-order DE(3xy + 2y2 + 2

) dµdy

+µ (3x + 4y) = µ (2x + 2y)⇒ dµ

dy= − µ(x + 2y)

3xy + 2y2 + 2,

which does not make sense since the x is still present, hence µ cannot bea function of y only.

If instead we assume that µ is only a function of x, then the PDE be-comes the 1st-order DE

µ (3x + 4y) =(x2 + 2xy

) dµdx

+ µ (2x + 2y)⇒ dµ

dx=µ

x,

which does make sense now that the y is gone, hence we can solve for µ(x):dµ

dx=µ

x⇒ 1

µdµ =

1

xdx⇒ lnµ = lnx + C.

Since any solution will work, we take the simplest one with C = 0, soµ = x.

Page 20: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 20

Hence, returning to the original DE and multiplying through by µ = x wehave

x(

3xy + 2y2 + 2)dx + x

(x2 + 2xy

)dy = 0,

or (3x2y + 2xy2 + 2x

)dx +

(x3 + 2x2y

)dy = 0,

and then

M(x, y) = 3x2y + 2xy2 + 2x , N(x, y) = x3 + 2x2y,

∂M

∂y= 3x2 + 4xy ,

∂N

∂x= 3x2 + 4xy,

and therefore∂M

∂y=∂N

∂xand the DE is now exact.

Then the implicit solution of the DE is

x3y + x2y2 + x2 = C.

Page 21: School of Mathematics and Statistics MATH1002 MATHEMATICAL ... · MATH1002 Mathematical Methods 2 jEnrichment Session 1 6 Review { Linear DE’s A 1st-order linear DE in one that

MATH1002 Mathematical Methods 2 | Enrichment Session 1 21

Problems

1. Verify the implicit solution above by first integrating∂f

∂x, and then confirm your answer by integrating

∂f

∂y.

2. Find the general solution of the DE[exp(yx

)− y

xexp(yx

)− 2x

]dx +

[exp(yx

)]dy = 0.

Note that this problem can only be done one way!

Solution: y = x ln

(x2 + C

x

).

3. Find the general solution of the DE

y dx +

(2x +

ey

y

)dy = 0,

by finding an appropriate integrating factor so that the DE is exact.

Solution: xy2 + ey = C.