ma 1506 mathematics ii tutorial 3 - second order ... · ma 1506 mathematics ii tutorials ngo quoc...

15
MA 1506 Mathematics II Tutorials Ngo Quoc Anh Question 1 Question 2 Question 3 Question 4 1/15 MA 1506 Mathematics II Tutorial 3 Second order differential equations Groups: B03 & B08 February 8, 2012 Ngo Quoc Anh Department of Mathematics National University of Singapore

Upload: dinhcong

Post on 16-Apr-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

1/15

MA 1506 Mathematics II

Tutorial 3Second order differential equations

Groups: B03 & B08February 8, 2012

Ngo Quoc AnhDepartment of Mathematics

National University of Singapore

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

2/15

Question 1: General solution of homogeneous secondorder linear DE with constant coefficients y′′+ ay′+ by = 0

General solution can be found using the so-calledcharacteristic equation. Following is the method of solving.

Method of solving

By solving the characteristic equation λ2 + aλ+ b = 0, thereare three cases depending on the sign of a2 − 4b.

. If a2 − 4b > 0, then the characteristic equation has twodistinct real roots, say λ1 and λ2. The general solutionof the associated ODE is

yh = c1eλ1x + c2e

λ2x.

. If a2 − 4b = 0, then the characteristic equation has areal double root λ1 = λ2 = −a

2 . The general solution ofthe associated ODE is

yh = (c1 + c2x)e−a

2x.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

3/15

Question 1: General solution of homogeneous secondorder linear DE with constant coefficients y′′+ ay′+ by = 0

Method of solving (cont’)

. If a2 − 4b < 0, then the characteristic equation has twocomplex roots, say λ1 and λ2, where

λ1,2 =−a±

√a2 − 4b

2= −a

2±√4b− a22︸ ︷︷ ︸w

i.

The general solution of the associated ODE is

yh =(c1 cos(wx) + c2 sin(wx)

)e−

a2x.

As you may see that general solution y of a 2nd order ODEbasically depends on two parameters (c1 and c2 as shownabove). (What happens to the 1st order ODEs?)

In order to specify these numbers, we need two initialconditions involving, for example, y(x0) and y′(x0).

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

4/15

Question 1: General solution of homogeneous secondorder linear DE with constant coefficients y′′+ ay′+ by = 0

(a) The characteristic equation λ2 + 6λ+ 9 = 0 admits adouble real root λ = −3. Thus, the general solution of theassociated ODE is given as follows

yh = (c1 + c2x)e−3x.

Since 1 = y(0) = c1 and

−1 = y′(0 = −3c1e−3x + c2e−3x − 3c2xe

−3x∣∣x=0

= −3c1 + c2,

we get that c1 = 1 and c2 = 2, thus, yh = (1 + 2x)e−3x.

(b) The characteristic equation has two complex rootsλ1,2 = 1± 2πi. Hence, we find that

yh =(c1 cos(2πx) + c2 sin(2πx)

)ex.

Using y(0) = −2 and y′(0) = 2(3π − 1) we obtain c1 = −2and c2 = 3, thus, yh =

(− 2 cos(2πx) + 3 sin(2πx)

)ex.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

5/15

Question 2: Finding yp: The method of undeterminedcoefficients

This is also known as the lucky guess method. In order tofind the particular integral, we need to guess its form, withsome coefficients left as variables to be solved for.

Below is a table of some typical functions r(x) and thesolution yp to guess for them.

Form of r(x) Form for ypkeax Ceax

kxn, n > 0 Knxn + · · ·+K1x+K0

k cos(ax) or k sin(ax) K cos(ax) +M sin(ax)keax cos(bx) or keax sin(bx) eax(K cos(bx) +M sin(bx))

More generally, with either(∑n

i=1 kixi)eax cos(bx) or(∑n

i=1 kixi)eax sin(bx), the function yp can be found using

yp = eax(P cos(bx) +Q sin(bx))

where P and Q are usually two polynomials of order n.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

6/15

Question 2: Finding yp: The method of undeterminedcoefficients

(a) Consider y′′ + 2y′ + 10y = 25x2 + 3. Sincer(x) = 25x2 + 3 is a polynomial of order 2, we find

yp = Ax2 +Bx+ C.

Since yp satisfies the ODE, there holds

(Ax2 +Bx+ C)′ + 2(Ax2 +Bx+ C)′

+ 10(Ax2 +Bx+ C) = 25x2 + 3.

By equalizing coefficients, we get A = 52 , B = −1, C = 0.

(b) Consider y′′ − 6y′ + 8y = x2e3x. In this case, we find

yp = (Ax2 +Bx+ C)e3x.

By computing derivatives y′′p, y′p and y′′p−6y′p+8yp = x2e3x,9A− 18A+ 8A = 1, A = −1;6A+ 6A+ 9B − 12A− 18B + 8B = 0, B = 0;

2A+ 3B + 3B + 9C − 6B − 18C + 8C = 0, C = −2.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

7/15

Question 2: Finding yp: The method of undeterminedcoefficients

(c) Consider y′′ − y = 2x sinx. Since r(x) = 2x sinx, wefind yp of the form

yp = (Ax+B) sinx+ (Cx+D) cosx.

Then, it is easy to find that

y′p = (A− Cx−D) sinx+ (Ax+B + C) cosx,

y′′p = −(Ax+B + 2C) sinx+ (2A− Cx−D) cosx.

By using the ODE, we get that

−(Ax+B + C) sinx+ (A− Cx−D) cosx = x sinx.

By equalizing coefficients of sin and cos, we arrive at

Ax+B + C = −x, A− Cx−D = 0.

Again, by equalizing coefficients of polynomials, we haveA = −1, B + C = 0, −C = 0, and A−D = 0. Hence,A = −1, B = 0, C = 0, and D = −1.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

8/15

Question 2: Finding yp: The method of undeterminedcoefficients

(d) Consider y′′ + 4y = sin2 x. Since r(x) = sin2 x, we haveto lower the order of r(x). To this purpose, we writesin2 x = 1

2(1− cos(2x)). Therefore (and why?), we find ypof the following form

yp = A+ x(B sin(2x) + C cos(2x)

).

Then, we immediately have

y′′p = −4(C + xB) sin(2x) + 4(B − xC) cos(2x).

Using the ODE, we arrive at

−4C sin(2x) + 4(B − 2xC) cos(2x) + 4A =1

2(1− cos(2x))

which implies that A = 18 , B = −1

8 , C = 0. Thus, aparticular solution is

yp =1

8− 1

8cos(2x).

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

9/15

Question 3: Finding yp: The method of variationparameters

Suppose we have already solved the homogeneous equationy′′+ py′+ q = 0 and written the solution as yh = c1y1+ c2y2where y1 and y2 are linearly independent solutions.

In view of the method of variation parameters, we look foryp of the nonhomogeneous equation y′′ + py′ + q = r of theform

yp(x) = u1(x)y1(x) + u2(x)y2(x).

Method of solving

We first have

y′p = u′1y1 + u′2y2 + u1y′1 + u2y

′2.

Since we have two arbitrary functions u1 and u2, we imposetwo conditions in order to find u1 and u2. While onecondition is that yp verifies the ODE, we can choose theother condition so as to simplify our calculations

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

10/15

Question 3: Finding yp: The method of variationparameters

Method of solving (cont’)

u′1y1 + u′2y2 = 0.

Then we can calculate y′′p as follows

y′′p = u′1y′1 + u′2y

′2 + u1y

′′1 + u2y

′′2 .

Substituting in the ODE, we get

u1(y′′1 + py

′1+ qy1)+u2(y

′′2 + py

′2+ qy2)+ (u′1y

′1+u

′2y′2) = r,

that is,u′1y′1 + u′2y

′2 = r.

The problem is equivalent to solving a 2× 2 linear system

u′1y1 + u′2y2 = 0, u′1y′1 + u′2y

′2 = r.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

11/15

Question 3: Finding yp: The method of variationparameters

(a) Consider y′′ + 4y = sin2 x. Since the characteristicequation λ2 + 4 = 0 admits λ = ±2i as complex roots, thegeneral solution of y′′ + 4y = 0 is just

yh =(c1 cos(2x) + c2 sin(2x)

)e0·x = c1 cos(2x) + c2 sin(2x).

Having the form of yh, we shall find yp of the following form

yp = u1(x) cos(2x) + u2(x) sin(2x).

We then immediately reach to

u′1 cos(2x)+u′2 sin(2x) = 0,−2 sin(2x)u′1+2 cos(2x)u′2 = sin2 x.

By solving, we get that

u′1 = −1

2sin2x sin(2x), u′2 =

1

2sin2x cos(2x).

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

12/15

Question 3: Finding yp: The method of variationparameters

(b) Consider y′′ + y = secx. Since the characteristicequation λ2 + 1 = 0 admits λ = ±i as complex roots, thegeneral solution of y′′ + y′ = 0 is just

yh = c1 cosx+ c2 sinx.

We shall find yp of the following form

yp = u1(x) cosx) + u2(x) sinx.

We then arrive at

u′1 cosx+ u′2 sinx = 0, −u′1 sinx+ u′2 cosx = secx.

By solving, we get that u′1 = − tanx and u′2 = 1. Byintegrating, we obtain

u1 = −∫

sinx

cosxdx =

∫d(cosx)

cosx= ln | cosx|+C, u2 =

∫dx.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

13/15

Question 4

Recall that the ODE y′′ = F (y) can be solved using twosteps. In the first step, we write it as

d

dy

(1

2y′

2)

= F (y)

and then integrate both sides w.r.t. y to have

y′ = ±

√2

∫F (y)dy.

In the second step, since the preceding ODE is separable, wecan solve it to get y. It is important to note that generallyyou have to keep the constant C after calculating

∫F (y)dy.

Why? In addtion, the sign of y′ is also important.

For simplicity, we denote R = 150× 109. We now considerthe given ODE, see for a background,

r′′ = −GMr2

.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

14/15

Question 4

By solving, we first have

r′ = ±

√−2∫GM

r2dr = ±

√2GM

(1

r+ C

).

Since r denotes the distance,r′ is clearly the speed of theEarth. Therefore, we initiallyhave r′(0) = 0. Besides, thereholds r(0) = R.

R

2R/3

Using these conditions, we find that C = − 1R . In order to

clarify the sign of r′, we observe that r′ < 0. Why? (This isbased on the fact that the speed is increasing and thedistance r is decreasing.) Our separable ODE is now just

dr√2GM

(1r −

1R

) = −dt.

MA 1506Mathematics II

Tutorials

Ngo Quoc Anh

Question 1

Question 2

Question 3

Question 4

15/15

Question 4

Thus, we arrive at

t = −∫

dr√2GM

(1r −

1R

)= − 1√

2GM

∫Rd(rR

)√1R

√Rr − 1

= − R32

√2GM

∫dx√1x − 1

.

Since x = rR we find that ”the departure” is x = 1 and ”the

arrival” is x = 23 . Hence, the time we need is

t[initial,meeting] = −R

32

√2GM

∫ 23

1

dx√1x − 1

≈ 3865692.129 (sec.)

Notice that the integral∫

dx√1x−1

can be calculated, see my

blog for the answer. For a better explanation of the universe,please follow a movie via this link from 14:23 to 19:05.