Вы находитесь на странице: 1из 20 2. Second-order Linear ODEs

1

2. Second-order Linear Ordinary Differential Equations

 2.1 Homogeneous linear ODEs 2.2 Homogeneous linear ODEs with constant coefficients 2.3 Differential operators 2.5 Euler-Cauchy equation 2.6 Existence and uniqueness theory 2.7 Nonhomogeneous ODEs 2.1 Solution by variation of parameters

Advanced Engineering Mathematics 2. Second-order Linear ODEs

2

2.1 Homogeneous linear ODEs

A linear second-order DE is formed of

y’’ + p(x)y’ + q(x)y = r (x)

If r (x) 0 (i.e., r (x) = 0 for all x considered), then the DE is called homogeneous.

If r (x) 0 , the DE is called nonhomogeneous.

/

The functions p, q and r are called the coefficients of the equation.

A solution of a second-order DE on some open interval a < x < b is a

function y(x) that satisfies the DE, for all x in that interval. 2. Second-order Linear ODEs

3

At first we discuss the properties of solutions of second-order linear DE, then we consider the solving strategies.

Theorem 1 (Fundamental Theorem for homogeneous linear 2nd-order DE)

For a homogeneous linear 2nd-order DE, any linear combination of two solutions on an open interval I is again a solution on I. In particular, for such an equation, sums and constant multiples of solutions are again solutions.

Proof.

Let y 1 and y 2 be solutions of y’’ + py’ + qy = 0 on I.

Substituting y = c 1 y 1 + c 2 y 2 into the DE, we get

y’’ + py’ + qy = (c 1 y 1 + c 2 y 2 )’’ + p(c 1 y 1 + c 2 y 2 )’ + q(c 1 y 1 + c 2 y 2 )

= c 1 y 1 ’’ + c 2 y 2 ’’ + c 1 py 1 ’ + c 2 py 2 ’ + c 1 qy 1 + c 2 qy 2

= c 1 (y 1 ’’ + py 1 ’ + qy 1 ) + c 2 (y 2 ’’ + py 2 ’ + qy 2 )

= 0.

Advanced Engineering Mathematics 2. Second-order Linear ODEs

4

Ex.1. y 1 = e x

and y 2 = e -x are two solutions of

y’’ – y = 0

y = -3y 1 + 8y 2 = -3e x + 8e -x is a solution of y’’ – y = 0

since (-3e x + 8e -x ) – ( -3e x + 8e -x ) = 0.

Caution!

The linear combination solutions does not hold for nonhomogeneous or nonlinear DE.

Ex.2. y 1 = 1 + cosx and y 2 = 1 + sinx y’’ + y = 1.

are solutions of nonhomogeneous DE

but 2(1 + cosx) and (1 + cosx) + (1 + sinx) are not solutions of y’’ + y = 1.

Ex.3. y 1 = x 2 and y 2 = 1 are solutions of nonlinear DE y’’y xy’ = 0,

but -x 2

and

x 2 + 1 are not solution of y’’y xy’ = 0. 2. Second-order Linear ODEs

5

A general solution of a 1st-order DE involved one arbitrary constant, a general solution of a 2nd-order DE will involve two arbitrary constant, and is of the form

y = c 1 y 1 + c 2 y 2 ,

where y 1 and y 2 are linear independent and called a basis of the DE.

A particular solution is obtained by specifying c 1 and c 2 .

Two function y 1 (x) and y 2 (x) are linear independent, if

c 1 y 1 (x) + c 2 y 2 (x) = 0

implies

c 1 = c 2 = 0 .

Advanced Engineering Mathematics 2. Second-order Linear ODEs

6

Wronskian test for linear independent

Let y 1 (x) and y 2 (x) be solutions of y’’ + py’ + qy = 0 on an interval I

Let W [y 1 ,y 2 ] = y
y
1
2
y
'
y
'
1
2

= y 1 y 2 ’ – y 1 y 2

for x in I.

Then 1.

Either W [ y 1 ,y 2 ] = 0

or

W [y 1 ,y 2 ] 0

for all x in I

for all x in I .

2. y 1 (x) and y 2 (x) are linear independent on I

W[y 1 ,y 2 ] 0

for some x in I.

The proof will be given later. 2. Second-order Linear ODEs

7

An initial value problem now consists of y’’ + py’ + qy = 0 and two initial conditions y(x 0 ) = k 0 , y’(x 0 ) = k 1 .

Ex.4.

Solve the initial value problem

y’’ – y = 0,

y(0) = 4 ,

y = c 1 e x + c 2 e -x

y’ = c 1 e x c 2 e -x

y(0) = c 1 + c 2 = 4

y’(0) = c 1 c 2 = -2

y’(0) = -2

c 1 = 1

c 2 = 3

solution y = e x + 3e x .

Problems of Section 2.1.

Advanced Engineering Mathematics 2. Second-order Linear ODEs

8

2.2 Homogeneous linear ODEs with constant coefficients

y’’ + ay’ + by = 0,

where coefficients a and b are constant.

Solution.

Assume y = e λx and substituting it into the original DE to get

(λ 2 + a λ + b) e λx = 0

The equation λ 2 + a λ + b = 0 is called the characteristic equation of the

DE. Its roots are

λ

1

=

Then the solutions are

Consider three cases: 1
2
− a +
a
− 4b ⎟
2 ⎝
e λ
1 x and
e λ
2 x
.

and

λ

2

= 1
2
− a −
a
− 4b ⎟
2 ⎝

.

 case 1. two distinct real roots if a 2 – 4b > 0. case 2. a real double root if a 2 – 4b = 0. case 3. complex conjugate roots if a 2 – 4b < 0. 2. Second-order Linear ODEs

9

Case 1

(Two distinct real roots λ 1 and λ 2 )

e

λ

1

x

y 1 =

The solution is just

and

y

2

=

e

λ

2

x

y =

are linear independent.

c e

1

λ

1

x

+

c e

2

λ

2

x

.

Ex.2. Solving

y’’ + y’–2y = 0 with y(0) = 4 and y’(0) = -5.

Solution.

The characteristic equation λ 2 + λ - 2 = 0, it’s roots are 1
(
9)
λ
=
1
+
=
1
and
1
2
Then
y = c 1 e x + c 2 e -2x
Since
y(0) = 4 =
c 1 + c 2
y’(0) = -5 = c 1 - 2c 2
c 1 = 1
and
c 2 = 3
y = e x + 3e -2x .

λ

2

= 1
( −
9)
1
2

= − 2

Advanced Engineering Mathematics 2. Second-order Linear ODEs

10

Case 2

a

(Real double root

λ = −

a 2

x

)

x 3 -6x 2 +11x-6 = 0, x 1 = 1.

Assume

Use the “method of reduction of order” to find another solution.

step 1. Set y 2 = uy 1 , and try to determine the function u such that y 2 is an independent solution.

y

1

e 2

=

y 2 ’ = uy 1 + uy 1

and

y 2 ’’ = u’’y 1 + 2uy 1 ’ + uy 1 ’’

step 2. Substituting y 2 in the original DE (u’’y 1 + 2uy 1 ’ + uy 1 ’’) + a (uy 1 + uy 1 ’) + buy 1 = 0

u’’y 1 + u’(2y 1 ’ + ay 1 ) + u(y 1 ’’ + ay 1 ’ + by 1 ) = 0

Since y 1 is a solution,

y 1 ’’ + ay 1 ’ + by 1 = 0

Since

2

y

1

'

=

2 (

a

2

)

a a

e

x

2

= −

a e

2

x

= −

a y

1

2y 1 ’ + ay 1 = 0

u’’y 1 = 0 2. Second-order Linear ODEs

11

u” = 0

(This is the order reduced equation.)

u = c 1 x + c 2

Simply taking c 1 = 1 and

We get y 2 = xy 1 , y 1 and y 2 are linear independent.

Thus the general solution

u’ = c

c 2 = 0

y = (c 1 + c 2 x)

a

x

e 2

.

Warning.

If λ is a simple root of

y’’ + py’ + qy = 0 ,

then (c 1 + c 2 x)e λx is not a solution of the DE.

(Explanation on page 17)

Ex.

(omitted)

Advanced Engineering Mathematics 2. Second-order Linear ODEs

12

Case 3 Complex exponential function 2
3
4
5
(
ix
)
(
ix
)
(
ix
)
(
ix
)
e ix
=
1
+
ix
+
+
+
+
+
2!
3!
4!
5!
2
4
3
5
x
x
x
x
=
(1
+
+
)
+
i
(
x
+
+
)
2!
4!
3!
5!
=
cos
x
+
i
sin
x
Euler formula
e ±ix = cos x ± i sin x
1
2
2
λ = −
±
a
4
b
, where
a
4
b
<
0
2 1 a
2
1
2
⇒ λ
= −
±
i
ω
where
ω
=
b
>
0
2 1 a
4 a
x
Then
e λ
1 x and
e λ
2
are complex solutions of the original DE.

The solution can be derived further.

z 1 =

z 2 =

e

e

λ x

1

λ

2

x

=

=

e

e

a

2

a

2

x

x

i

x

ω

i

e

e ω

=

x

=

a

e 2

x

a

e 2

(cos ωx + i sin ωx) and

x (cos ωx - i sin ωx). 2. Second-order Linear ODEs

13

A basis of real solution of the DE is a
a
+
x
x
z
z
z
− z
1
1
2
y
= 2
e
2 cos
ωx
and
y
= e
2
sin
ωx
.
1 =
2 =
2
2 i
Testing for linear independence of
y
and
y
1
2
1 ax
− 1
ax
e
2
cos
ω
x
e
2
sin
ω
x
− 1
1 ax
1 ax
1 ax
ax
1
a e
2
cos
ω
x
− ω
e
2
sin
ω
x
1 a e
2
sin
ω
x
+ ω
e
2
cos
ω
x
2
2
ax
2
ax
2
ax
= 2
e
(cos
ω
x
)
+ ω
e
(sin
ω
x
)
= ω
e
0.

Then the general solution becomes

a

x

y = e 2

(A cos ωx + B sin ωx).

Advanced Engineering Mathematics 2. Second-order Linear ODEs

14

Summary of cases 1, 2, and 3

case

1.

real λ 1 ≠ λ 2

case 2. double real

y =

λ

1

= λ

2

c e

1

= −

λ x

1

1

2

a

+

c e

2

λ

2

y

x

.

=

(

c

1

case 3. complex conjugate 1
λ 1 = −
+ ω ,
i
2 a
1
2
λ
= −
− ω
i
, ω =
b
a
2
2 1 a
4
2 1 ax
y
=
e
(
A
cos
ω
x
+
B
sin

ω x ).

+

c x

2

)

e

ax

2

. 2. Second-order Linear ODEs

15

Initial value problem = a DE + initial conditions.

For example, y” + 2y’ + 5y = 0,

y(0) = 1,

y’(0) = 5.

Ex.4. (Boundary value problem) A boundary value problem = a DE + boundary conditions

y” + y = 0 y(0) = 3

and two boundary conditions

y(π) = -3. Characteristic function λ 2 +1 = 0, λ = ± i y = c 1 cos x + c 2 sin x.

 Since y(0) = 3 = c 1 ⇒ c 1 = 3 Thus y(π) = -3 = -c 1 ⇒ c 1 = 3 y = 3cos x +c 2 sin x.

Problems of Section 2.2.

Advanced Engineering Mathematics 2. Second-order Linear ODEs

16

2.3 Differential operator

Introduce a method for solving DE, say operational method. Let D denote differentiation with respect to x, write Dy = y’ . D is an operator, it transforms y into its derivative y’. For example,

 D (x 2 ) = 2x , D (sin x) = cos x D (Dy) = Dy’ = y”,

D 3 y = y”’, …….

Define another operator L, L = P (D) = D 2 + aD +b , call a 2nd-order differential operator. Here a and b are constant, P means polynomial, and L means linear.

L [y] = P(D) [y] = (D 2 + aD +b) y = y” + ay’ + by. 2. Second-order Linear ODEs

17

L is linear operator; i.e., L [α y + β z] = α L[y] + β L[z] , P (D) [e λ 1 x ] = (λ 1 2 + aλ 1 + b) e λ 1 x = P (λ 1 ) e λ 1 x = 0

e λ 1 x is a solution of y”+ay’ +by = 0

c

P (λ 1 ) = 0

( λ 1 is a root of λ 2 + aλ +b = 0)

If P (λ) has two different roots, we obtain a basis. If P (λ) has a double root, we need a second independent solution. Differentiate both sides of P (D) [e λx ] = P (λ) e λx w.r.t. λ to get P(D)[xe λx ] = P’ (λ) e λx + P(λ)xe λx

P(D)[xe λ 1 x ] = P’ (λ 1 )e λ 1 x + P(λ 1 )xe λ 1 x = 0

xe λ 1 x is a solution of y”+ay’ +by = 0

c

P’ (λ 1 ) = 0

(That is, λ 1 is a double root of λ 2 + aλ +b = 0)

P (λ) / (λ - λ 1 ) = P’ (λ)

and

P (λ 1 ) = 0

(reduction of order)

Advanced Engineering Mathematics 2. Second-order Linear ODEs

18

How to use differential operator to solve DE ?

Ex.1.

 Solving y " + y ' − 6 y = 0 ⇒ ( D 2 + D − 6) y = 0 ⇒ ( D + 3)( D − 2) y = 0 ⎧ ⇒ ⎩ ⎨ ( ( D + 3) y = 0 D − 2) y = 0 ⎧ ⇒ ⎩ ⎨ y y ' ' + − 3 2 y = 0 y = 0 ⇒ ⎧ ⎨ λ λ + − 3 2 = = 0 ⎩ 0 ⇒ ⎧ ⎨ λ 1 = − 3 ⎩ ⎧ λ 2 y = 2 = e ⇒ 1 − 3 x 2 x ⎨ ⎩ y 2 = e

y

=

c

1

e

3

x

+

c

2

e

2

x

.

Problems of Section 2.3. 2. Second-order Linear ODEs

19

2.5 Euler-Cauchy equation

x 2 y” + axy’ + by = 0 …………………………………………… (1)

Solution. Substituting y = x m into Eq.(1), to get

2

x m

m

m

(

(

2

m

+

m

1)

+

1)

( 1)

a

x

m

2

+

axmx

am

+

b

=

0

if

m

1

x

+

0

bx

m

=

0

m

+

b

=

0

(auxiliary equation)

Consider three cases

case 1. Distinct real roots

m =

1

2

⎡ ⎢ ⎣

(

1a

a 1

2 4b

)(

±

Then the general solution is

y = c x

1

m

1

+ c x

2

m

2

.

Advanced Engineering Mathematics 2. Second-order Linear ODEs

20

case 2. Double root

m

=

1

2

(

1

a

)

y

1

=

x

1 a

2

using the method of reduction of order to find another solution. Substituting y 2 = uy 1 into Eq.(1). We obtain

x 2 (uy 1 + 2uy 1 ’ + uy 1 ”) + ax(uy 1 + uy 1 ’) + buy 1 = 0

ux 2 y 1 + ux(2xy 1 ’ + ay 1 ) + u(x 2 y 1 ” + axy 1 ’ + by 1 ) = 0

Since y 1 is a solution, x 2 y 1 ” + axy 1 ’ + by 1 = 0

Since

y

1

=

1 a

x

2

,

2

xy

1

'

+

ay

1

ux 2 y 1 + uxy 1 = 0 ux + u’ = 0.

=

=

=

2

x

(

1 a

2

)

1

a

2

1

a

x

2

+

a x

2

(

1

x

 1 − a 1 − a − 2 a + x a x 2 1 − a 2 = y 1 2. Second-order Linear ODEs

21 u
"
1
= −
u
'
x
ln
u '
= −
ln
x
,
for
x
>
0
1
u
'
=
x
u
= ln
x
m
1-
a
y
=
ln
x x
,
m
=
.
2
2
Thus the general solution

y

=

(

c

1

+

c

2

ln

x

)

x

1 a

2

. The following derivation is wrong,
since
ln
x ,
x <
0
is not defined.
ln
u '
= ln
x ,
if
x <
0
u
'
=
x
2
x
u =
2
m +
y
x
2 It is wrong.
2 =

Advanced Engineering Mathematics 2. Second-order Linear ODEs

22

case 3. Complex conjugate roots 2
1 − a
a
1
4
b
m =
±
2
2 ,
(
)
2
1 − a
4
b
a
1
m =
± i
2
2
⎧ m
μ
+
i
ν
1 =
⇒ ⎨
m
μ
i
ν
2 =

where

(

a

⇒ ⎨

z 1 =

x

m

1 =

x

μ

x

i

ν

=

x

μ

μ

[ cos

x

cos

[

cos( ln

()

ν

μ

x

i ν

=

()

ν

ln

x

ln

x

+

i

x

i

ν

ν

ln

x

)

x

)

= x

z

2 =

x

m

2

y

y

1

2

= x

μ

=

=

x

μ

x

μ

=

sin(

i

ν

e

sin

e

sin

μ

ln

x

()]

ν

ln

x

i

ν

ln

x

()]

ν

ln

x

The general solution Problems of Section 2.5.

y =

(

a

cos( ln

ν

x

)

1

)

2

+ b

4

b

<

0

sin(

ν

ln

x

))

x

μ

. 2. Second-order Linear ODEs

23

2.6 Existence and uniqueness theory

Theorem 1 (Existence and uniqueness theory for initial value problems) For an initial values problem y” + py’ +qy = 0 y(x 0 ) = k 0 , y’(x 0 )= k 1 , if p(x) and q(x) are continues functions on some open interval I and x 0 is in I, then the initial value problem has a unique solution y(x) on the interval I.

We will discuss the existence of a general solution for a DE.

For a 2nd-order DE, existing a general solution c 1 y 1 + c 2 y 2 means y 1 and

y 2 are linear independent; that is, k 1 y 1 + k 2 y 2 = 0 k 1 = k 2 = 0.

We know that the Wronskian independent. y
y
1
2
y
'
y
'
1
2

0

y

1

and

y

2

are linear

Advanced Engineering Mathematics 2. Second-order Linear ODEs

24

Now we want to prove the statement

Theorem 2 (Wronskian test for linear independent) Let y 1 (x) and y 2 (x) be solution of y” + py’ + qy = 0 on an interval I

[

W y

1

,

y

2

]

= y
y
1
2
y
y
1
2

=

y y

1

′ −

2

y y

1

2

for all

Then (a) Either W [y 1 ,y 2 ] = 0 for all x in I,

W [y 1 ,y 2 ] 0 for all x in I,

or

x

in

I

(b) y 1 and y 2 are linear independent on I W[y 1 ,y 2 ] 0 for some x in I .

Proof

(a) Calculate W’ = y 1 ’ y 2 ’ + y 1 y 2 ”-y 1 ” y 2 - y 1 ’ y 2

Since

= y 1 y 2 ”-y 1 ” y 2

y 1 ” + py 1 ’ + qy 1 = 0 y 2 ” + py 2 ’ + qy 2 = 0 2. Second-order Linear ODEs

25

-y 2 y 1 ” - py 2 y 1 ’ - qy 2 y 1 = 0

y 1 y 2 ” + py 1 y 2 ’ + qy 1 y 2 = 0

-y 2 y 1 ” + y 1 y 2 ” + p (-y 2 y 1 ’ + y 1 y 2 ) = 0

W’ + p W = 0

W = ce -pdx

(A linear 1st-order DE)

for all x in I, for all x in I

if c = 0 W = 0 if c 0 W 0

(b) “ “ (independent W 0)

Prove by showing

If y 1 and y 2 are linear dependent, then y 2 = ky 1 for

some constant k. Thus W[y 1 ,y 2 ] = y 1 y 2 ’-y 1 ’y 2 = ky 1 y 1 ’ - ky 1 y 1 ’ = 0 .

“dependent W = 0”.

Advanced Engineering Mathematics 2. Second-order Linear ODEs

26

“ (independent W 0) prove by showing “W = 0 dependent”. Assume y 1 0 , y 2 0. Consider the linear system of equations k 1 y 1 (x 0 ) + k 2 y 2 (x 0 ) = 0 k 1 y 1 (x 0 ) + k 2 y 2 (x 0 ) = 0, where k 1 and k 2 are unknown.

y

y

(

1 0

x

(

1 0

x

)

)

y

y

2

2

(

(

x ) ⎤ ⎡ k

⎦ ⎣ ⎢

x

0

0

)

1

k

2

= 0

By Cramer’s theorem,

if y
y
1
2
y
y
1
2

=

0

(

i.e

.,

W

=

0),

then the system has a non-trivial solution; that is, k 1 and k 2 are not both zero. Using these k 1 and k 2 to construct a function y(x) = k 1 y 1 (x) + k 2 y 2 (x), then y(x) = k 1 y 1 + k 2 y 2 is a solution of y” + py’ + qy = 0, and y satisfies the initial conditions y(x 0 ) = 0 and y’(x 0 ) = 0 2. Second-order Linear ODEs

27

By the existence and uniqueness theorem, we known that the solution is unique such that k 1 y 1 + k 2 y 2 = 0 on I. Since k 1 and k 2 are not both zero, y 1 and y 2 are linear dependent.

A general solution of y” + py’ + qy = 0 includes all solutions; that is, exist a solution of form c 1 y 1 + c 2 y 2 .

Theorem 3 (Existence of a gereral solution) If the coefficients p(x) and q(x) of y” + py’ + qy = 0 are continuous on some open interval I, then the DE has a general solution on I.

Theorem 4 (General solution) If the coefficients p(x) and q(x) of y” + py’ + qy = 0 are continuous on some open interval, then every solution y = y(x) on I is of the form y(x) = c 1 y 1 (x) + c 2 y 2 (x).

Advanced Engineering Mathematics 2. Second-order Linear ODEs

28

How to obtain a solution basis when only one solution is known ? Let y 1 be a solution of y” + py’ + qy = 0 on some interval I. Substitute

y 2 = uy 1 into the DE to get

Then uy 1 + 2uy 1 ’ + uy 1 ” + p(uy 1 + uy 1 ’) + quy 1 = 0

y 2 ’ = uy 1 + uy 1

and

y 2 ” = uy 1 + 2uy 1 ’ + uy 1 ”.

uy 1 + u’(2y 1 ’ + py 1 ) + u(y 1 ” + py 1 ’ + qy 1 ) = 0

uy 1 + u’(2y 1 ’ + py 1 ) = 0

Let v = u

v

'

+

v

(

2

y

1

'

+

p )

=

0

y

2

1

v '

v

ln

v

y

1

y

1

'

= −

p

0 v = − 2ln
y
1
1 −
∫ pdx
=
e

2

pdx

y 1

y

2

=

uy

1

=

y

1

vdx

Since v dx = u can’t be a constant, y 1 and y 2 form a basis of solution. 2. Second-order Linear ODEs

29

Ex. Find a basis of solution for the DE x 2 y” – xy’ + y = 0

Solution.

One solution is y 1 = x 1
( −
) dx
1
1
1
x
ln x
v =
e
=
e
=
2
2
x
x
x
1
y
=
x
dx
=
x
ln
x
,
x
>
0.
2
x

Problems of Section 2.6.

Advanced Engineering Mathematics 2. Second-order Linear ODEs

30

2.7 Nonhomogeneous ODEs

Given a nonhomogeneous equation y” + p(x)y’ + q(x)y = r(x) , r(x)0 …………………………………

Consider the corresponding homogenous equation y” + p(x)y’ + q(x)y = 0 ……………………………………………

(1)

(2)

Theorem 1 (Relation between solutions of Eqs.(1) and (2))

 (a) The difference of two solutions of Eq.(1) on some open interval I is a solution of Eq.(2) on I. (b) The sum of a solution of Eq.(1) on I and a solution of Eq.(2) on I is a solution of Eq.(1) on I. 