0% found this document useful (0 votes)
958 views34 pages

Chapter 02

This document provides an overview of chapter 2 which covers second-order linear ordinary differential equations (ODEs). It defines homogeneous and nonhomogeneous linear ODEs of second order and provides examples. It discusses the superposition principle for homogeneous linear ODEs and how linear combinations of solutions are also solutions. It introduces initial value problems and defines general, particular, and basis solutions. It provides examples of solving initial value problems and finding a basis when one solution is known using reduction of order.

Uploaded by

許博翔
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
958 views34 pages

Chapter 02

This document provides an overview of chapter 2 which covers second-order linear ordinary differential equations (ODEs). It defines homogeneous and nonhomogeneous linear ODEs of second order and provides examples. It discusses the superposition principle for homogeneous linear ODEs and how linear combinations of solutions are also solutions. It introduces initial value problems and defines general, particular, and basis solutions. It provides examples of solving initial value problems and finding a basis when one solution is known using reduction of order.

Uploaded by

許博翔
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter 2

S
Second-Order
d O d Linear
Li ODE
ODEs

Contents
2.1 Homogeneous Linear ODEs of Second Order
2.2 Homogeneous Linear ODEs with Constant Coefficients
2.3 Differential Operators. Optional
(Mass-Spring
2.4 Modeling: Free Oscillations. (Mass Spring System)
2.5 Euler-Cauchy Equations
2 6 Existence and Uniqueness of Solutions
2.6 Solutions. Wronskian
2.7 Nonhomogeneous ODEs
2 8 Modeling: Forced Oscillations.
2.8 Oscillations Resonance
2.9 Modeling: Electric Circuits
2 10 Solution by Variation of Parameters
2.10

2
2.1 Homogeneous Linear ODEs of Second
Order
A linear second-order
second order ODE is defined as
y" + p(x)y' + q(x)y = r(x)
If r(x)
( ) = 0 for
f all ll x considered,
id d th then th
the ODE is
i called
ll d
homogeneous. If r(x) ≠ 0, the ODE is called
nonhomogeneous.
nonhomogeneous
For instance, y" + 25y = e– x cos x is nonhomogeneous
and xy
xy" + yy' + xy = 0 is homogeneous.
homogeneous
An example of nonlinear ODE is: y"y + y' 2 = 0.

continued
3

The functions p(x) and q(x) in y" + p(x)y' + q(x)y =


( ) are called
r(x) ll d the
th coefficients
ffi i t off the
th ODEs.
ODE
Solutions are defined similarly as for the first-order
ODE iin Chap.
ODEs Ch 1. 1
 A function y = h(x) is called a solution of a (linear or
nonlinear) second-order ODE on some open interval I if
 h is defined and
 twice differentiable throughout that interval and is
such that the ODE becomes an identity if we replace the
unknown y by h, the derivative y' by h', and the second
derivative y" by h".
h"

continued
4
Homogeneous Linear ODEs: Superposition Principle
EXAMPLE 1: Homogeneous Linear ODEs: Superposition
(Linearity) of Solutions
The functions y1 = cos x and y2 = sin x are solutions of the
homogeneous linear ODE: y" + y = 0, for all x. We verify this
by differentiation and substitution.
substitution
Similarly we can verify for y2 = sin x.
A linear combination (superposition) of two functions: y1
and y2 is defined as
y = c1 y1 + c2 y2
If we take the linear combination (superposition) of cos x and
sin x, say, (4.7 cos x – 2 sin x), then we can verify that this
li
linear combination
bi ti is i also
l a solution
l ti off the
th given
i ODE:
ODE
(4.7 cos x – 2 sin x)" + (4.7 cos x – 2 sin x)
= – 4.7
4 7 cos x + 2 sin x + 4.7
4 7 cos x – 2 sin x = 0.
0

THEOREM 1
Fundamental Theorem for the
Homogeneous Linear ODE
For a homogeneous linear ODE: y" + p(x)y' + q(x)y = 0, any
li
linear combination
bi ti off twot solutions
l ti on an open interval
i t l I is
i
again a solution of the given ODE on I. In particular, for such
an equation,
equation sums and constant multiples of solutions are again
solutions.

6
PROOF

Let y1 and y2 be solutions of the ODE: y" + p(x)y' +


( ) = 0 on I.
q(x)y I
By substituting the linear combination of y1 and y2:
y = c1y1 + c2y2 and its derivatives into the ODE, we
get
y" + py' + qy
= (c1y1 + c2y2)" + p(c1y1 + c2y2)' + q(c1y1 + c2y2)
= c1y1" + c2y2" + p(c1y1' + c2y2') + q(c1y1 + c2y2)
= c1(y1" + py1' + qy1) + c2(y2" + py2' + qy2)
= c1·0 + c2·0 = 0,
This shows that y is a solution of the g
given ODE on I.

Superposition solutions for Nonhomogeneous Linear


ODE and
ODEs d Nonlinear
N li ODEs
ODE
EXAMPLE 2: A Nonhomogeneous Linear ODE
We
W can verifyif that
th t y = 1 + cos x andd y = 1 + sin
i x are solutions
l ti
of the nonhomogeneous linear ODE: y" + y = 1.
But their sum is not a solution
solution. Neither is 2(1 + cos x) or 5(1 +
sin x).
EXAMPLE 3: A Nonlinear ODE
We can also verify that the functions: y = x2 and y = 1, are
solutions of the nonlinear ODE: y"y – xy' = 0,
But their sum is not a solution. Neither is –x2!

Theorem 1 only holds for Homogeneous Linear ODE


and is not good for nonhomogeneous and nonlinear
ODEs!

8
Initial Value Problem. Basis. General Solution
For a second-order homogeneous linear ODE, an initial value
problem should consist of two initial conditions: y(x0) = K0
and y '(x0) = K1.
 These conditions prescribe given values K0 and K1 of the solution and
its first derivative (the slope of its curve) at the same given x = x0 in the
open interval considered.
The initial value conditions are used to determine the two
arbitrary constants c1 and c2 in a general solution:
y = c1 y 1 + c 2 y 2
of the ODE; here, y1 and y2 are suitable solutions of the ODE.
The resulting
Th lti y, withith specific
ifi c1 andd c2 determined
d t i d by
b the
th
initial values, is the particular solution of the ODE.

EXAMPLE 4 Initial Value Problem

Solve the initial value problem


y" + y = 0, y(0) = 3.0, y'(0) = –0.5.
Solution. Step 1. General solution.
 The functions cos x and sin x are solutions of the, so we take
y = c1 cos x + c2 sin x.
as a general solution.
Step 2. Particular solution.
 We need the derivative y' = –c1 sin x + c2 cos x.
 From this and the initial values, we obtain,
( ) = c1 = 3.0 andd y'(0)
y(0) ( ) = c2 = –0.5.
∴ the particular solution: y = 3.0 cos x – 0.5 sin x.

10
DEFINITION
General Solution,, Basis,, Particular Solution
A general solution of a homogeneous linear ODE on an
p interval I is y = c1y1 + c2y2, in which y1 and y2 ((not
open
constantly proportional to each other) are solutions of the
given ODE on I, and c1 and c2 are arbitrary constants. These
y1, y2 are called a basis (or a fundamental system) of the
solutions on I.
A particular solution of the given ODE on I is obtained if
we assign specific values to c1 and c2 in y = c1y1 + c2y2.

Definition: Two functions y1 and y2, where they are defined on an interval
I, are called linearly independent if and only if both k1 and k2 for k1y1(x) +
k2y2(x) = 0 are trivial everywhere on I.

11

DEFINITION
Basis ((Reformulated))
A basis of solutions of a homogeneous ODE on an open
interval I is a pair of linearly independent solutions of the
ODE on I.

EXAMPLE 5 Basis,
Basis General Solution
Solution, Particular Solution
in Example 4: y" + y = 0
cos x and sin x form a basis of solutions for all x because
their quotient is cot x ≠ const (or tan x ≠ const).
y = c1 cos x + c2 sin x is a ggeneral solution.
The solution y = 3.0 cos x – 0.5 sin x of the initial value
problem is a particular solution.

12
Find a Basis if One Solution Is Known. Reduction of
Order
EXAMPLE 7 Reduction of Order if a Solution Is
Known Basis
Known.
Find a basis of solutions of the ODE
(x2 – x)y
x)y" – xy 0
xy' + y = 0.
Solution.
 Inspection shows that y1 = x is a solution because yy'1 = 1 and
y"1 = 0,
 The idea of the method is to substitute
y = uy1 = ux, y' = u'x + u, y" = u"x + 2u'
into the ODE. This gives
( 2 – x)(u"x
(x )( " + 2u')
2 ') – x(u'x
( ' + u)) + ux = 0.
0
 Then the ODE becomes:
(x2 – x)(u 2u')) – x2uu' = 0,  (x2 – x)u
x)(u"xx + 2u x)u" + (x – 2)u
2)u' = 0.
continued
13

 This ODE is of first order in v = u',


( 2 – x)v'+
(x ) '+ (x
( – 2)v
2) = 0.
0
 Separation of variables and integration gives
ddv x2  1 2  x 1 
 2 dx     dx, ln v  ln x  1  2ln x  ln  2 
v x x  x 1 x   x 
 Taking exponents and integrating again,
again we obtain
x 1 1 1 1
v   2,  u   vdx  ln x 
x2 x x x
hence y2  ux  x ln x  1

 Since y1 = x and y2  ux  x ln x  1 are linearlyy independent,


p ,
y1 and y2 form a basis of solutions, for all positive x.

14
Reduction of Order. (General Case)
Let y1 be a solution of a homogeneous linear ODE y" + p(x)y'
+ q(x)y = 0, to find y2, let y = y2 = uy1. Then applying
y '  y2 '  u ' y1  uy1 ' y ''  y2 ''  u '' y1  2u ' y1 ' uy1 ''
into the equation:
q
u '' y1  2u ' y1 ' uy1 '' p (u ' y1  uy1 ')  quy1 =0
Collecting terms in u u",, u
u' and u:
u '' y1  u '(2 y1 ' py1 )  u ( y1 '' py1 ' qy1 )=0
∵y1 is the solution of the given ODE: y1 '' py1 ' qy1 =0 0
2 y ' py1
Thus u '' u ' 1  0. Let u' = U and u" = U ', then
y1
 2y ' 
U '  1  p  U  0 a first-order ODE
 y1 
continued
15

dU  2y ' 
Then    1  p  dx and ln U  2 ln y1   pdx
U  y1 
By taking exponents, we obtain:
1  ppdx
U 2e 
y1
Hence, ∵U = uu'  u   Udx and y2 = uy1, the second
Hence
solution y2:
y2  uy1  y1  Udx

16
2.2 Homogeneous Linear ODEs with Constant
Coefficients
Consider a 2nd-order homogeneous linear ODE whose
coefficients a and b are constant:
y" + ay' + by = 0
How to solve this ODE?
 Remember: the solution of the first-order linear ODE with a
constant coefficient k: y' + ky = 0, is an exponential function
k .
y = ce–kx
 Assume: y = e
x and substituting it and its derivatives: y' =
ex and yy'' = 2ex into the ODE, we obtain
(2 + a + b)ex = 0
Hence if  is a solution of the important characteristic
ti (or
equation ( auxiliary
ili i )
equation
2 + a + b = 0

continued
17

 From elementary algebra we get the roots of this quadratic


equation are:
  
1  12 a  a 2  4b and 2  12 a  a 2  4b 
 So y1  e1x and y2  e2 x are solutions of the given ODE.
x x
 The general solution is y  c1 y1  c2 y2  c1e 1  c2 e 2 .
 We can verify this by substituting this general solution into
the ODE.
From algebra, there are three kinds of for the quadratic
i 2 + a
equation  + b = 0,
0 ddepending
di on the h sign
i off theh
2
discriminant a – 4b:
(Case I) Two real roots if a2 – 4b > 0, 0
(Case II) A real double root if a2 – 4b = 0,
(Case III) Complex conjugate roots if a2 – 4b < 0. 0

18
EXAMPLE 2 Initial Value Problem
Solve the initial value problem
yy" + yy' – 2y = 0, y(0) = 4, (0) = –5.
yy'(0) 5.
Solution.
 Step 1. General solution. The characteristic equation is
2 +  – 2 = 0.
 Its roots are  = 1 and  –2,, so the ggeneral solution:
y = c1ex + c2e-2x.
 Stepp 2. Particular solution. Since yy'(x) = c1ex – 2c2e-2x, we
obtain from the general solution and the initial conditions
y(0) = c1 + c2 = 4, c1 = 1

y'(0) = c1 – 2c2 = –5 c2 = 3.
 The particular solution: y = ex + 3e-2x

19

Case II. Real Double Root  = – a/2


If the discriminant a2 – 4b is zero, we see directly
from the characteristic equation that we get only one
root,  = 1 = 2 = – a/2, hence only one solution,
y1 = e –(a/2)x.
To obtain the 2nd solution, follow the method of
reduction order:
y2 = xe–ax/2
Then the corresponding general solution is
y = (c1 + c2x)e–ax/2.

20
EXAMPLE 4 Initial Value Problem in the Case of a
Double Root
Solve the initial value problem
y" + y' + 0.25y = 0, y(0) = 3.0, y'(0) = –3.5.
Solution.
 The characteristic equation is 2 +  + 0.25 = (+ 0.5)2 = 0.
It has the double root:  = –0.5. This gives the general
solution y = (c1 + c2x)e–0.5x.
 We need its derivative
y' = c2e-0.5x – 0.5(c1 + c2x)e–0.5x
 From this and the initial conditions we obtain
y(0) = c1 = 3.0, y'(0) = c2 – 0.5c1 = 3.5, hence c2 = –2.
 The particular solution of the initial value problem is
y = (3 – 2x)e–0.5x. continued
21

Case III. Complex Roots – 1/2a + i and – 1/2a – i

This case occurs if the discriminant a2 – 4b of the


characteristic
h t i ti equation
ti isi negative
ti suchh that
th t its
it
solution  is a complex.

 
  12 a  a 2  4b   a 2  i where   b  14 a
2

We can obtain
b i a basis
b i off reall solutions
l i
y1 = e-ax/2 cos x, y2 = e-ax/2 sin x ( > 0)
It can be verified that these are solutions by
substitution. They form a basis on any interval since
their
h i quotient
i cot x is i not a constant. Hence
H a reall
general solution in Case III is
ax/2 (A cos x + B sin
y = e-ax/2 i x)) (A,
(A B arbitrary).
bit )
22
Derivation in Case III.
Complex Exponential Function
For a complex variable z = r + it, the complex
exponential function ez can be expressed in terms of
the real functions er, cos t, and sin t:
ez = er + it = ereit = er(cos t + i sin t).
where eit = cos t + i sin t is the Euler formula.

For case III,   12 a  a  4b   a 2  i where
2

  b  14 a 2 then
e1x  e  ( a / 2) x i x  e  ( a / 2) x (cos  x  i sin  x)
e2 x  e  ( a / 2)) x i x  e  ( a / 2)) x (cos  x  i sin  x)
1 x 2 x
By adding (subtracting) e and e and multiplied by
1/2 (1/2i),
(1/2i) we can obtain
b i y1 (y ( 2).
)
23

EXAMPLE 5 Complex Roots. Initial Value Problem


Solve the initial value problem
yy" + 0.4y
0 4y' + 9.04y
9 04y = 0,
0 y(0) = 0, (0) = 3.
0 yy'(0) 3
Solution.
 Step1. solution The characteristic equation is 2 +
Step1 General solution.
0.4+ 9.04 = 0. It has the roots –0.2 ± 3i. Hence  = 3, and a
general solution is
y = e–0.2x (A cos 3x + B sin 3x).
 Step 2. Particular solution. The first initial condition gives
(0) = A = 0.
y(0) 0 The
Th remaining
i i expression
i is B –0.2x
i y = Be 0 2 sin
i 3x.
3
By taking the chain rule:
B(–0 2e–0.2x sin 3x + 3e–0.2x cos 3x)
yy' = B(–0.2e 3x).
 By the second initial condition: y'(0) = 3, we obtain y'(0) =
3B = 3. Hence B = 1. Our solution is: y = e–0.2x sin 3x.

24
The solution curve shows y and the curves of e–0.2x
and –ee–0.2x (dashed), between which the curve of y
oscillates. Such “damped vibrations” have important
mechanical and electrical applications.
pp

25

Summary of Cases I–III


A 2nd-order homogeneous linear ODE whose coefficients a and b
are constant:
y" + ay' + by = 0
with characteristic equation (or auxiliary equation)
2 + a
+b=0

26
2.5 Euler–Cauchy
y Equations
q
Euler–Cauchy equations are ODEs of the form
x2y" + axy' + by = 0
with given constants a and b and unknown y(x). We substitute
y = xm andd its
i derivatives
d i i y'' = mxm-11 and
d y'''' = m(m 1) m-22 into
( – 1)x i
the given ODE. This gives
x2m(m
( – 1)x m 2 + axmxm-1
1) m-2 m 1 + bx
b m
= m(m – 1)xm + amxm + bxm
[ 2 + (a
= [m ( – 1)m1) + b] xm = 0. 0
We obtained a common factor xm. Dropping it, we have the
auxiliary equation m2 + (a – 1)m + b = 0. 0
Hence y = xm is a solution if and only if m is a root of the
equation
quadratic equation.
continued
31

Case I. If the roots m1 and m2 are real and different, then


solutions are
y1 ( x)  x m1 and y2 ( x)  x m2
They are linearly independent and constitute a basis of
solutions of x2y" + axy' + by = 0 for all x for which they are
real. The corresponding general solution is
y ( x)  c1 x m1  c2 x m2 (c1, c2 arbitrary).
EXAMPLE 1 General Solution in the Case of Different
R l Roots
Real R t
Solve the Euler–Cauchy equation: x2y" + 1.5xy' – 0.5y = 0
 It has the auxiliary equation: m2 + 0.5m
0 5m – 0.5
0 5 = 0.
0
 The roots are 0.5 and –1. Hence a basis of solutions for all positive x is
y1 = x0.5 and y2 = 1/x and gives the general solution
c (x > 0).
y ( x)  c1 x  2
x
32
Case II. If the auxiliary equation m2 + (a – 1)m + b = 0 has a
d bl roott m1 = 1/2(1 – a).
double ) Th
The Euler–Cauchy
E l C h equation ti
becomes: x y '' axy ' 14 (1  a ) y  0  (a  1)  4b  0
2 2 2

 The first solution: y1 = x((1 – a)/2


) .

 Let the second solution y2 = uy1, then we can obtain u by (Sec. 2.1)
1
 
u   Udx   2 exp   pdx dx where y1  x ((1 a ) / 2 and p 
y1
a
x
1  a  1
  1 a exp p   a ln x  dx
p    dx  dx   1 a exp
x  x  x
xa 1
  1 a dx   dx  ln x  c *
x x
The general solution is:
y  c1 y1  c2 y2  c1 y1  c2 uy1  (c1  c2 u ) y1
 (c1  c2 ln x) x m  (c1  c2 ln x) x (1 a ) / 2

33

EXAMPLE 2 General Solution in the Case of a


Double Root
The Euler–Cauchy equation x2y" – 5xy' + 9y = 0 has the
auxiliary
ili ti m2 – 6m
equation 6 + 9 = 00. It has
h the
th double
d bl roott m =
3, so that a general solution for all positive x is
y = (c1 + c2 ln x) x3.
Case III. The roots of the auxiliary equation m2 +
( – 1)m
(a 1) + b = 0 are complex.l

EXAMPLE 3 Real General Solution in the Case of


Complex Roots
Solve the Euler Cauchy equation: x2yy" + 0.6xy
Euler–Cauchy 0.6xy' + 16.04y = 0
Solution.
 The auxiliary
y equation
q m2 – 0.4m + 16.04 = 0 with complex
p
roots are complex conjugate, m1 = 0.2 + 4i and m2 = 0.2 – 4i.
34
 By using the trick of writing x = eln x,
x m1  x 0.2 4i  x 0.2 x 4i  x 0.2 (eln x ) 4i  x 0.2 ei (4ln x )
 x 0.2  cos(4 ln x)  i sin(4 ln x) 
x m2  x 0.2 4i  x 0.2 x 4i  x 0.2 (eln x ) 4i  x 0.2 e  i (4ln x )
 x 0.2  cos(4 ln x)  i sin(4 ln x) 
 Following the same arguments before, the two linearly
independent bases of the “real” sol solutiontion are:
x0.2cos(4 ln x) and x0.2sin(4 ln x).
 The “real”
real general solution of the given Euler-Cauchy Euler Cauchy
equation is:
y = x0.2[[A cos ((4 ln x)) + B ssin ((4 ln x)]. )].

35

Fig.47.
g Euler–Cauchy
y equations
q

36
Linear Independence of Solutions

Two functions, y1 and y2, on I are linearly dependent


if y1 and
d y2 are proportional
ti l on I,
I that
th t is
i
y1 = ky2(x) or y2 = ly1(x) for all x on I
A general solution on an open interval I is made up
from a basis y1, y2 on I, which are linearly
i d d t that
independent, th t is
i
k1y1(x) + k2y2(x) = 0 on I implies k1 = 0 and k2 = 0

38

Linear Independence of Solutions


THEOREM 2
Linear Dependence and Independence
of Solutions
Let the ODE y" + p(x)y' + q(x)y = 0 have continuous
coefficients p(x) and q(x) on an open interval I. Then two
solutions y1 and y2 of the given ODE on I are linearly dependent
on I if and only if their “Wronskian”
W(y1, y2) = y1yy'2 – y2yy'1 = 0
at some x0 in I.
Furthermore,, if W = 0 at an x = x0 in I,, then W ≡ 0 on I;; hence if
there is an x1 in I at which W is not 0, then y1, y2 are linearly
independent on I.

39
Proof of Wronskian
() If y1 and y2 are linearly dependent on I, then y1 = ky2. The
Wronskian: W(y1, y2) = y1y'2 – y2y'1 = ky2y'2 – y2ky'2 = 0.
() We wish to show that if W(y1, y2) = 0 for some x = x0, then y1
and y2 are linear dependent.
p
 Let k1y1 + k2y2 = 0, then k1y'1 + k2y'2 = 0.
 To eliminate k2, we can multiply k1y1 + k2y2 = 0 by y'2, k1y'1 + k2y'2 = 0 by –
y2 andd add
dd them
h together: h
k1y1 y'2 + k2y2 y'2 – k1y'1y2 – k2y'2y2 = k1(y1 y'2 – y'1y2) = k1W = 0
 To eliminate k1, we can multiply k1y1 + k2y2 = 0 by – y'1, k1y'1 + k2y'2 = 0 by
y1 and add them together:
– k1y1 y'1 – k2y2 y'1 + k1y'1y1 + k2y'2y1 = k2(y'2 y1 – y'1y2) = k2W = 0
 If W(y1, y2)  0, then k1 and k2 are both 0, which means y1 and y2 are
linearly independent.

40

 Since W(y1, y2) = 0, then k1 and k2 can be any arbitrary number. So k1 and k2
are not necessary to be trivial to make k1y1 + k2y2 = 0 which implies y1 and y2
are linearly dependent.
To p
prove the last statement, if W(x ( 0) = 0 at an x0 on I, then we have
W = y1y'2 – y2y'1 and W' = y1y2" + y'1y'2 – y'2y'1 – y2y1" = y1y2" – y2y1"
Since y1" + p( )y1' + q(
p(x)y q(x)y )y1 = 0 and y2" + p( )y2' + q(
p(x)y )y2 = 0,,
q(x)y
multiply the former equation by –y2 and the latter one by y1 to get
–y2 y1" – p(x)y2 y1' – q(x)y2 y1 = 0
y1 y2" + p(x)y1 y2' + q(x)y2 y1 = 0
Add these equations: y1y2" – y2y1" + p(x)(y1 y2' – y2 y1') = 0
This is W' + p(x)W = 0. The solution of this 1st-order ODE is:
W ( y1 , y2 )  Ce 
 p ( x ) dx
for all x on I. where C: any y constant

41
Since e 
 p ( x ) dx
can not be 0, if C = 0, then W(y1, y2) = 0 for all x on
I. However,, if C ≠ 0,, then W(y
(y1, y2) ≠ 0 for all x on I. That is,, if W
= 0 at an x = x0 in I, then W ≡ 0 on I; hence if there is an x1 in I at
which W is not 0, then y1, y2 are linearly independent on I.

Remark. Wronskian can be written as a determinant (Wronski


d t
determinant)
i t) as:
y y2
W ( y1 , y2 )  1  y1 y2 ' y2 y1 '
y1 ' y2 '

42

EXAMPLE 1 Illustration of Theorem 2

The functions y1 = cosx and y2 = sinx are solutions of y"


+2y = 0.
0 Their Wronskian is
cos  x sin  x
W (cos  x,sin  x) 
 sin  x  cos  x
  cos 2  x   sin 2  x  
Theorem 2 shows that these solutions are linearly independent
if and only if  ≠ 0.
Of course, we can see this directly from the quotient y2/y1 =
tanx. For  = 0 we have y2 ≡ 0, which implies linear
dependence (why?).

43
EXAMPLE 2 Illustration of Theorem 2 for a Double
Root
Ag general solution of yy" – 2y'
y + y = 0 on any
y interval
is y = (c1 + c2x)ex. The corresponding Wronskian is
not 0, which shows linear independence of ex and xex
on any interval. Namely,
ex xe x
W (e , xe )  x
x x
 ( x  1) e 2x
 xe 2x
 e 2x
0
e ( x  1)e x

44

A General Solution of y" + p(x)y' + q(x)y = 0 Includes All


S l ti
Solutions

THEOREM 4

A General Solution Includes All Solutions


If the ODE y" + p(x)y' + q(x)y = 0 has continuous coefficients
p(x) and q(x) on some open interval I, then every solution y =
Y( ) off the
Y(x) h given
i ODE on I is
i off the
h form
f
Y(x) = C1y1(x) + C2y2(x)
where y1, y2 is any basis of solutions of the given ODE on I and
C1, C2 are suitable constants.
H
Hence y"" + p(x)y'
( ) ' + q(x)y
( ) = 0 does
d nott have
h singular
i l solutions
l ti
(that is, solutions are not obtainable from a general solution).

47
Proof of Theorem 4
Let y = Y(x) be any solution of the given ODE. From theorem
3, we know there’s a general solution y(x) = c1y1(x) + c2y2(x)
exists
i on I.
Assume x0 in I, then the initial conditions: y(x0) = Y(x0) and
'( 0) = Y'(x
y'(x Y'( 0),
) then
th
Y ( x0 )  c1 y1 ( x0 )  c2 y2 ( x0 ) (a)

Y '(( x0 )  c1 y '1 ( x0 )  c2 y '2 ( x0 ) (b)
Multiplying (a) by y2'(x0) and (b) by –y2(x0) and adding the
resulting equations:
c1 ( y1 y2 ' y2 y1 ')  c1W ( y1 , y2 )  Yy2 ' y2Y '
a : c2 ( y1 y2 ' y2 y1 '))  c2W ( y1 , y2 )  y1Y ' Yy1 '
Same way:
Since y1, y2 are linearly independent, W  0, then c1 and c2 can
be solved .

48

We define the solution c1 = C1 and c2 = C2. Then the


particular solution is:
y *( x)  C1 y1 ( x)  C2 y2 ( x)

Since C1 and C2 is a solution of (a) and (b), then


y *( x0 )  Y ( x0 ) and y *'( x0 )  Y '( x0 )
From the uniqueness in theorem 1, it implies y* and Y are
identical everywhere
y on I.

49
2.7 Nonhomogeneous
g ODEs
DEFINITION
General Solution
Solution, Particular Solution
A general solution of the nonhomogeneous ODE y" + p(x)y'
+ q(x)y = r(x) on an open interval I is a solution of the form
y(x) = yh(x) + yp(x);
here yh = c1y1 + c2y2 is a general solution of the
here,
homogeneous ODE y" + p(x)y' + q(x)y = 0 on I and yp is any
solution of the given nonhomogeneous ODE solution on I
containing no arbitrary constants.
A particular solution of the given nonhomogeneous ODE
on I is a solution obtained from y(x) = yh(x) + yp(x) by
assigning specific values to the arbitrary constants c1 and c2
in yh.

50

THEOREM 1

Relations of solutions of the nonhomogeneous ODE


to those of the corresponding homogeneous ODE
a) The sum of a solution y of y" + p(x)y' + q(x)y = r(x) on some
open interval I and a solution y of y" + p(x)y' + q(x)y = 0 on
I is a solution of y" + p(x)y' + q(x)y = r(x) on I. In particular,
y(x) = yh(x) + yp(x) is a solution of y" + p(x)y' + q(x)y = r(x)
on I.
I
b) The difference of two solutions of y" + p(x)y' + q(x)y = r(x)
on I is a solution of yy" + p(x)y
p(x)y' + q(x)y = 0 on I.
I

51
Proof of Theorem 1
(a) Let L[y] denotes the left hand side of the given nonhomo-
geneous ODE y" + p(x)y' + q(x)y = r(x) and y and y are the
solutions of the given ODE and its corresponding homogeneous
ODE on I, respectively. Then
L[ y  y ]  L[ y ]  L[ y ]  r ( x)  0  r ( x)
So y + y is also a solution of the given ODE on I.
(b) Let y and y* be any solution of y" + p(x)y' + q(x)y = r(x). We
can write them as L[y]= r(x) and L[y*] = r(x). Since L is a linear
operator,
L[y – y*] = L[y] – L[y*] = r(x) – r(x) = 0.
So y – y* is a solution of the corresponding homogeneous ODE.

52

THEOREM 2

A General Solution of a Nonhomogeneous


ODE Includes All Solutions
If the coefficients p(x), q(x), and the function r(x) in y" +
p(x)y' + q(x)y = r(x) are continuous on some open interval
I, then every solution of y" + p(x)y' + q(x)y = r(x) on I is
obtained by assigning suitable values to the arbitrary
constants c1 and c2 in a general solution y(x) = yh(x) + yp(x)
of y" + p(x)y' + q(x)y = r(x) on I.

53
Proof of Theorem 2
Let y* be any solution of the given ODE on I and x0 any x in I.
Also let y(x) = yh(x) + yp(x) be any general solution of the
Also,
given ODE.
By Thm. 3 in Sec. 2.6, yh = c1y1 + c2y2 exists because p(x) and
q(x) are continuous.
Since yp can satisfies the g given ODE,, by y Thm 1(b), ( ), let Y = yy* –
yp is a solution of the corresponding homogeneous ODE. At
x0, we have
Y ( x0 )  y *( x0 )  y p ( x0 ) Y '( x0 )  y *'( x0 )  y ' p ( x0 )
By Thm. 1 in Sec. 2.6, for any initial conditions in I, there
exists a unique particular solution for the corresponding
homogeneous ODE obtained by assigning suitable values to
c1, c2 in yh.

54

Finding yp: Method of Undetermined Coefficients

The method of undetermined coefficients is suitable for linear


ODE with
ODEs ith constant
t t coefficients
ffi i t a andd b
y" + ay' + by = r(x)
when
h r(x)( ) iis an exponential
i l function,
f i a power off x, a cosine
i or
sine, or sums or products of such functions (Table 2.1).
W choose
We h a form
f for
f yp similar
i il tot r(x),
( ) bbutt with
ith unknown
k
coefficients to be determined by substituting that yp and its
derivatives into the ODE.
The corresponding rules for the choice of yp for practically
p
important ( ) are as follows.
forms of r(x)

55
Table2.1 Method of Undetermined Coefficients

y" + ay' + by = r(x), a, b: constants

56

Choice Rules for the Method of Undetermined


Coefficients
(a) Basic Rule. If r(x) in y" + ay' + by = r(x) is one of the
functions in the first column in Table 2.1, choose yp in the
same line and determine its undetermined coefficients by
substituting
b tit ti yp and d its
it derivatives
d i ti into
i t the
th given
i ODE.
ODE
(b) Modification Rule. If a term in your choice for yp happens
to be a solution of the homogeneous ODE corresponding to
y" + ay' + by = r(x), multiply your choice of yp by x (or by
x2 if this solution corresponds
p to a double root of the
characteristic equation of the homogeneous ODE).
(c) Sum Rule. If r(x) is a sum of functions in the first column
of Table 2.1, choose for yp the sum of the functions in the
corresponding lines of the second column.

57
EXAMPLE 1 Application of the Basic Rule

Solve the initial value problem


0 001 2, y(0)
y"" + y = 0.001x (0) = 00, y'(0)
'(0) = 11.5.
5
Solution. Step 1. General solution of the homogeneous ODE.
 The ODE y y" + y = 0 has the general solution
yh = A cos x + B sin x.
Step
p 2. Solution yp off the nonhomogeneous
g ODE.
 We first try yp = Kx2. Then y"p = 2K. By substitution, 2K +
Kx2 = 0.001x2.
 For this to hold for all x, the coefficient of each power of x
(x2 and x0) must be the same on both sides; thus K = 0.001
and 2K = 0, 0 a contradiction.
contradiction
 The second line in Table 2.1 suggests the choice

y p = K2 x 2 + K1 x + K0 .
Then y"p + yp = 2K2 + K2x2 + K1x + K0 = 0.001xcontinued 2.

58

 Equating the coefficients of x2, x, x0 on both sides, we have


K2 = 0.001,, K1 = 0,, 2K2 + K0 = 0. Hence K0 = –2K2 = –
0.002. This gives yp = 0.001x2 – 0.002, and
2
 y = yh + yp = A cos x + B sin x + 0.001x – 0.002.

Step 3. Solution of the initial value, y(0) = 0 and y'(0) = 1.5,


problem. Setting x = 0 and using the first initial condition
gives y(0) = A – 0.002 = 0, hence A = 0.002. By differentiation
and from the second initial condition,
y' = y'h + y'p = –A sin
i x + B cos x + 0.002x
and y'(0) = B = 1.5.
This gives the answer (Fig. 49)
y = 0.002 cos x + 1.5 sin x + 0.001x2 – 0.002.
continued
59
Fig.49.
g Solution in Example 1

Figure 49 shows y as well as the quadratic parabola yp about


which
hi h y is
i oscillating,
ill ti practically
ti ll like
lik a sine
i curve since
i the
th cosine
i
term is smaller by a factor of about 1/1000.

60

EXAMPLE 2 Application of the Modification Rule (b)

Solve the initial value problem


y" + 3y' + 2.25y = –10 e-1.5x, y(0) = 1, y'(0) = 0.
Solution. Step 1. General solution of the homogeneous ODE.
 The characteristic equation of the homogeneous ODE is 2 + 3+ 2.25
= (+ 1.5)2 = 0. Hence the homogeneous ODE has the general solution:
) -1.5x.
yh = ((c1 + c2x)e
Step 2. Solution yp of the nonhomogeneous ODE.
 If we assume the particular solution is in the form of Ce-1.5x, but, from
yh, this function is a solution of the homogeneous ODE, which
corresponds to a double root of the characteristic equation.
 Hence, according to the Modification Rule we have to multiply our
choice function by x2. That is, we choose
yp = Cx2e-1.5x.
Then y'p = C(2x – 1.5x2)e-1.5x,
continued
y''p = C(2 – 3x – 3x + 2.25x2)e-1.5x.
61
 We substitute these expressions into the given ODE and omit the factor
e-1.5x. This yields
C(2 – 6x + 2.25x2) + 3C(2x – 1.5x2) + 2.25Cx2 = –10.
 Comparing the coefficients of x2, x, x0 gives 0 = 0, 0 = 0, 2C = –10,
hence C = –55. This gives the solution yp = –5x 5x2e-1.5x. Hence the given
ODE has the general solution
y = yh + yp = (c1 + c2x)e-1.5x – 5x2e-1.5x.
Step 3. Solution of the initial value problem.
 Setting x = 0 in y and using the first initial condition, we obtain y(0) = c1
1 Differentiation
= 1. Diff ti ti off y gives
i
y' = (c2 – 1.5c1 – 1.5c2x)e-1.5x – 10xe-1.5x + 7.5x2e-1.5x
 From this and the second initial condition we have yy'(0)(0) = c2 – 1.5c
1 5c1 = 0.
0
Hence c2 = 1.5c1 = 1.5. This gives the answer
y = (1 + 1.5x) e-1.5x – 5x2e-1.5x = (1 + 1.5x – 5x2)e-1.5x.

continued
62

Fig.50.
g Solution in Example 2
The curve begins with a horizontal tangent, crosses the x-axis at x
= 0.6217 1 5x – 5x2 = 0) and approaches the axis from
0 6217 (where 1 + 1.5x
below as x increases.

63
EXAMPLE 3 Application of the Sum Rule (c)

Solve the initial value problem


y"" + 2y' 5 = e0.5x
2 ' + 5y 0 5x + 40 cos 10x
10 – 190 sini 10x,
10
y(0) = 0.16, y'(0) = 40.08.
Solution Step 1.
Solution. 1 General solution of the homogeneous ODE ODE.
 The characteristic equation

2 + 2+ 5 = (+ 1 + 2i)(+ 1 – 2i) = 0


the real general solution of the homogeneous ODE is
yh = e-x (A cos 2x + B sin 2x).
2x)
Step 2. Solution of the nonhomogeneous ODE.
 We write yp = yp1 + yp2 , where yp1 corresponds
p to the
exponential term and yp2 to the sum of the other two terms.
We set yp1 = Ce0.5x.
Th y''p1 = 0.5Ce
 Then
05
0 5C 0.5x d y""p1 = 0.25Ce
and 05
0 25C 0.5x
continued
64

 Substitute the above solution into the given ODE and omit
the exponential factor gives (0.25 + 220.5
0.5 + 5)C = 1, hence
0.5x
C = 1/6.25 = 0.16, and yp1 = 0.16e .
 We now set yp2 = K cos 10x + M sin 10x, as in Table 2.1,
and obtain
y'p2 = –10K sin 10x + 10M cos 10x,
yy"p2 = –100K
100K cos 10x – 100M sin 10x.
 Substitution into the given ODE gives for the cosine terms
and for the sine terms
–100K
100K + 210M
2 10M + 5K = 40,
40
–100M – 210K + 5M = 190
 or by simplification
or, simplification,
–95K + 20M = 40, –20K – 95M = 190.
The solution is K = 0, M = 2. Hence yp2 = 2 sin 10x.
continued
65
 Together
y = yh + yp1 + yp2
= e-x(A cos 2x + B sin 2x) + 0.16e0.5x + 2 sin 10x
Step 3. Solution of the initial value problem.
 From
F y andd the
h fi
first initial
i i i l condition,
di i y(0)
(0) = A + 0.16
0 16 =
0.16, hence A = 0. Differentiation gives
yy' = e-x(–A cos 2x – B sin 2x – 2A sin 2x + 2B cos 2x)
+ 0.08e0.5x + 20 cos 10x.
 From this and the second initial condition we have y (0)
y'(0)
= –A + 2B + 0.08 + 20 = 40.08, hence B = 10. This gives
the solution:
y = 10e-x sin 2x + 0.16e0.5x + 2 sin 10x.

continued
66

The first term goes to 0 relatively fast. When x = 4, it is


practically 0,
0 as the dashed curves ±10e-xx + 0.16e
0 16e0.5x show.
show
From then on, the last term, 2 sin 10x, gives an oscillation
about 0.16e0.5x, the monotone increasing dashed curve.

67
2.9 Modeling: Electric Circuits
An ODE for the current I(t) in the RLC-
circuit in the figure
g is obtained from the
following law:
Kirchhoff’s Voltage Law (KVL). The
voltage
lt (the
(th electromotive
l t ti force)
f )
impressed on a closed loop is equal to
the sum off the voltageg drops
p across the
other elements of the loop.
The circuit in the figure is a closed loop, and the impressed
lt
voltage l the
E(t) equals th sum off the
th voltage
lt d
drops th three
across the th
elements R, L, C of the loop.
Voltage Drops.
 RI (Ohm’s law): Voltage drop for a resistor of resistance R ohms 
 LI' = L(dI/dt): Voltage drop for an inductor of inductance L henrys (H),
 Q/C: Voltage drop for a capacitor of capacitance C farads (F).
continued
69

Modeling: Electric Circuits

According to KVL
KVL, for an RLC-circuit
RLC circuit with electromotive
force E(t) = E0 sin t (E0 constant) as a model the “integro-
differential equation”
1
LI ' RI   Idt  E (t )  E0 sin t
C
To g g , we differentiate the equation
get rid of the integral, q with
respect to t, obtaining
1
LI " RI ' I  E '((t )  E0 cos t
C
70
2.10 Solution by
y Variation of Parameters
For a nonhomogeneous linear ODEs
y" + p(x)y' + q(x)y = r(x).
the solution is y(x) = yh(x) + yp(x).
A more general way (other than the previous undetermined
coefficients method case) to find yp on I is called method of
variation
i ti off parameters t (or( Lagrange’s
L ’ method
th d or reduction
d ti off
orders):
yr yr
y p ( x)   y1  2 dx  y2  1 dx
W W
where y1, y2 form a basis of solutions of the corresponding
homogeneous ODE: y" + p(x)y' + q(x)y = 0, on I and W is the
Wronskian of y1, y2: W = y1y'2 – y2y'1.
continued
71

Derivation of variation of parameters


p
Start from a general solution of the homogeneous ODE:
yh(x) = c1y1(x) + c2y2(x)
on an open interval I.
Recall the reduction of order method in Sec. 2.1.
We assume the particular solution yp of the nonhomogeneous
ODE is obtained by replacing the constants (“the parameters”)
c1 and c2 by functions u(x) and v(x). Then the resulting
function
yp(x) = u(x)y1(x) + v(x)y2(x)
To determine u and v, v we substitute yp and its derivatives
y'p = u'y1 + uy'1 + v'y2 + vy'2
i t y"" + p(x)y'
into ( ) ' + q(x)y
( ) = r(x).
( )
continued
72
If we let u'y1 + v'y2 = 0 and yp must satisfy the given
nonhomogeneous
h ODE,
ODE th then y''p = uy''1 + vy''2.
Taking the second derivative on yp:
y''''p = u'y'' '1 + uy''''1 + v'y'
' '2 + vy''''2
Now we substitute y''p, y'p and yp into y" + p(x)y' + q(x)y = r(x),
we obtain:
bt i
u(y''1 + py'1 + qy1) + v(y''2 + py'2 + qy2) + u'y'1 + v'y'2 = r.
Si
Since d y2 satisfy
y1 and ti f the th corresponding di homogeneous
h ODE
ODE:
y''1 + py'1 + qy1 = 0
andd y''''2 + py''2 + qy2 = 0
Therefore, u'y'1 + v'y'2 = r.
Since u'y1 + v'y2 = 0, we can solve u' and v' as
continued
73

u' (y1y'2 – y2y'1) = –y2r, thus u'W = –y2r


andd v'' (y
( 1y''2 – y2y''1) = y1r, thus
th v'W 'W = y1r.
Since y1, y2 form a basis, y1, y2 are linearly independent. We
have W ≠ 0 (by Theorem 2 in Sec. Sec 2.6)
2 6) and can divide by W,
W
yr yr
u'   2 , v'  1
W W
y2 r yr
u   dx, v   1 dx
W W
Then we obtain
yr yr
y p ( x)  u ( x) y1 ( x)  v( x) y2 ( x)   y1  2 dx  y2  1 dx
W W

74
EXAMPLE 1
Solve the nonhomogeneous ODE
1
y " y  sec x 
cos x
Solution. A basis of solutions of the homogeneous ODE on
any interval is y1 = cos x,x y2 = sin x.
x This gives the Wronskian
W(y1, y2) = cos x cos x – sin x (–sin x) = 1.
By taking the previous results,
results choosing zero constants of
integration, we get the particular solution of the given ODE
yr yr
y p   y1  2 dxd  y2  1 dx d
W W
  cos x  sin x sec xdx  sin x  cos x sec xdx
 cos x ln cos x  x sin x

continued
75

Fig.69.
g Particular solution yp and its first term in
Example 1
The general solution:
y  yh  y p  (c1 y1  c2 y2 )  y p
 (c1  ln cos x ) cos x  (c2  x) sin x

76

You might also like