Download Second-Order Homogeneous Equations with Constant Coefficients

Document related concepts
no text concepts found
Transcript
Chap 3 Linear Differential
Equations
王 俊 鑫(Chun-Hsin Wang)
中華大學 資訊工程系
Fall 2002
Outline

Second-Order Homogeneous Linear Equations

Second-Order Homogeneous Equations with
Constant Coefficients

Modeling: Mass-Spring Systems, Electric Circuits

Euler-Cauchy Equation

Wronskian

Second-Order Nonhomogeneous Linear
Equations

Higher Order Linear Differential Equations
Page 2
Outline
常係數
二階線性齊次
常微分方程
歐拉-柯西
微分方程
二階線性齊次
常微分方程
二階線性非齊次
常微分方程
高階線性
常微分方程
二階線性
常微分方程
線性
常微分方程
二階
常微分方程
Page 3
Second-Order ODE

General Form for Second-Order Linear ODE

Implicit Form
F ( x, y , y , y )  0

Explicit Form
y   p( x ) y   q( x ) y  r ( x )
Page 4
Second-Order Homogeneous
Linear Equations

Second-Order Homogeneous Linear ODE
y   p( x ) y   q( x ) y  0

p(x), q(x): coefficient functions

Example
(1  x ) y  2 xy  6 y  0
2
Page 5
Examples of Nonlinear differential
equations
x( yy  y ' )  2 y ' y  0
2
y' 
y ' 1
2
Page 6
A linear combination of Solutions for
homogeneous linear equation

Example:
y " y  0
y  e , y  e
x
y  3e  5e
x
x
x
Page 7
Second-Order Homogeneous
Linear Equations

Linear Principle (Superposition Principle)
If y1 and y2 are the solutions of
y   p( x ) y   q( x ) y  0
y = c1y1+ c2y2 is also a solution
(c1, c2 arbitrary constants)

y is called the linear combination of y1 and y2
Page 8
Second-Order Homogeneous
Linear Equations
Proof:
Let y  c1 y1  c2 y2
y  p( x ) y  q( x ) y
 (c1 y1  c2 y2 )  p( x )( c1 y1  c2 y2 )  q( x )( c1 y1  c2 y2 )
 c1 y1  p( x ) y1  q( x ) y1   c2  y2  p( x ) y2  q( x ) y2   0
Note ( cy )  cy  ( y1  y2 )  y1  y2
Page 9
Does the Linearity Principle hold for
nonhomogeneous linear or nonlinear equations ?

Example: A nonhomogeneous linear differential
equation
y  1  cos x, y  1  sin x
y " y  1
(1  cos x )  (1  sin x )

Example: A nonlinear differential equation
y  x ,y  1
2
y" y  xy'  0
x 1
2
Page 10
Initial Value Problem for SecondOrder homogeneous linear equations

For second-order homogeneous linear equations,
y   p( x ) y   q( x ) y  0
a general solution will be of the form
y  c1 y1  c2 y2
, a linear combination of two solutions involving two
arbitrary constants c1 and c2
 An initial value problem consists two initial
conditions.
y ( x0 )  k0 , y ' ( x0 )  k1
Page 11
Initial Value Problem

Example:
y" y  0, y  c1e  c2e
x
x
y (0)  4, y ' (0)  2

Observation:
y1  e , y2  le
x

x
Our solution would not have been general
enough to satisfy the two initial conditions and
solve the problem.
Page 12
A General Solution of an
Homogeneous Linear Equation



Definition: A general solution of an equation
y   p( x ) y   q( x ) y  0
on an open interval I
is a solution y  c1 y1  c2 y2
with y1 and y2 not proportional solutions of
the equation on I and c1 ,c2 arbitrary
constants.
The y1 and y2 are then called a basis (or
fundamental system) of the equation on I
A particular solution of the equation is
obtained if we assign specific values to c1 ,c2
Page 13
Linear Independent

Two functions y1(x) and y2(x) are linear
independent on an interval I where
they are defined if
k1 y1( x)  k2 y2 ( x)  0  k1  0, k2  0

Example
y1  cos x, y2  sin x
y " y  0
Page 14
How to obtain a Bass if One
Solution is Known ?

Method of Reduction Order
y   p( x ) y   q( x ) y  0

Given y1

Find y2

e
 p ( x ) dx
y2  y1 
2
1
y
dx
Page 15
Second-Order Homogeneous
Linear Equations
Proof:
Let y2  uy1
 y2  uy1  uy1, y2  uy1  2uy1  uy1
y   p ( x ) y   q( x ) y  0
 (uy1  2uy1  uy1)  p( x )( uy1  uy1 )  q( x )( uy1 )  0
 uy1  u( 2 y1  p( x ) y1 )  u ( y1  p ( x ) y1  q( x ) y1 )  0
2 y1  p ( x ) y1
 u 
u  0, Let U  u
y1
2 y1  p ( x ) y1

 U 
U  0
y1
Page 16
Second-Order Homogeneous
Linear Equations
Proof:
dU
2 y1  p( x ) y1


dx
U
y1
 ln U  2 ln y1   p( x )dx
e 
 p ( x ) dx
U 
y12
e 
 p ( x ) dx
 y2  y1  Udx  y1 
2
1
y
dx
Page 17
Second-Order Homogeneous
Linear Equations

Example 3-1:
x 2 y  xy  y  0, y1  x, Find y2
Sol:
1
1
y   y   2 y  0
x
x
e 
 p ( x ) dx
y2  y1 
2
1
y
dx  x 
e
1
  dx
x

x
2
dx
eln x
1
 x  2 dx  x  dx
x
x
 x ln x
Page 18
Second-Order Homogeneous
Linear Equations

Exercise 3-1: Basic Verification and
Find Particular Solution
y   9 y  0
y   2 y   y  0
4 x 2 y  3 y  0
Basis
cos(3x ), sin( 3x )
Initial Condition
y (0)  4, y (0)  6
Basis
e x , xe-x
Initial Condition
y (0)  1, y (0)  0
Basis
x 1/ 2 , x 3/2
Initial Condition
y (1)  3, y (1)  2.5
Page 19

Exercise: Reduce of order if a solution
is known.
x y"5xy'9 y  0, y1  x
2
3
Page 20
Second-Order Homogeneous
Equations with Constant Coefficients

General Form of Second-Order
Homogeneous Equations with Constant
Coefficients
y   ay   by  0
whose coefficients a and b are constant.
Page 21
Second-Order Homogeneous
Equations with Constant Coefficients
Sol:
y   ay   by  0
Try y  e
x
x
x
 ( e )  a ( e )  be
e
2
x
 ae
x
 be
 (   a  b ) e
2
Characteristic
Equation
x
x
x
0
0
0
  a  b  0
2
Page 22
Second-Order Homogeneous
Equations with Constant Coefficients

Case 1: 兩相異實根
a  4b  0
2

Case 2: 重根
y  c1e
1 x
 c2e
2 x
1 , 1
a  4b  0
2

1, 2
y  (c1  c2 x )e
1 x
Case 3: 共軛虛根 m  ni
a  4b  0
2
y  emx ( A cos nx  B sin nx)
Page 23
Second-Order Homogeneous
Equations with Constant Coefficients

Example 3-2:
y   y   2 y  0, y (0)  4, y (0)  5
Sol:
Step 1: Find General Solution
    2  0,
   1,2
2
 y  c1e x  c2 e  2 x
Page 24
Second-Order Homogeneous
Equations with Constant Coefficients
Step 2: Find Particular Solution
y  c1e x  c2 e 2 x
 y   c1e  2c2 e
x
2 x
y (0)  c1  c2  4
y (0)  c1  2c2  5
 c1  1, c2  3
 y  e  3e
x
2 x
Page 25
Second-Order Homogeneous
Equations with Constant Coefficients
Step 3: Plot Particular Solution
MATLAB Code
x=[0:0.01:2];
y=exp(x)+3*exp(-2*x);
plot(x,y)
Page 26
Case 2 Real Double Root = -a/2
a
2
 4b  0, y1  e
 ax 2
Let y2  uy1
 y2  uy1  uy1, y2  uy1  2uy1  uy1
y   ay   by  0
 (uy1  2uy1  uy1)  a (uy1  uy1 )  b(uy1 )  0
 uy1  u( 2 y1  ay1 )  u ( y1  ay1  by1 )  0
 y1  ay1  by1  0
2 y '1   ae  ax 2   ay1 ,
2 y '1  ay1  0
 u" y1  0, u"  0
 u  c1 x  c2
 take u  x, y2  xy1  xe ax 2
 y  ( c1  c2 x )e  ax 2
Page 27
Second-Order Homogeneous
Equations with Constant Coefficients

Example 3-3:
y   4 y   4 y  0, y (0)  3, y (0)  1
Sol:
Step 1: Find General Solution
  4  4  0,
   2,2
2
 y  ( c1  c2 x )e 2 x
Page 28
Second-Order Homogeneous
Equations with Constant Coefficients
Step 2: Find Particular Solution
y  ( c1  c2 x )e 2 x
 y   c2 e
2x
 2( c1  c2 x )e
2x
y (0)  c1  3
y (0)  c2  2c1  1
 c1  3, c2  5
 y  (3  5 x )e
2x
Page 29
Second-Order Homogeneous
Equations with Constant Coefficients
Step 3: Plot Particular Solution
MATLAB Code
x=[0:0.01:2];
y=(3-5*x).*exp(2*x);
plot(x,y)
Page 30
Euler Formula

Euler Formula
e  cos x  i sin x
ix
Proof:
Maclaurin
Series
2
3
n

x
x
x
ex  1  x 

  
2! 3!
n 0 n!

x2 x4 x6
( 1)n x 2 n
cos( x )  1 


  
2! 4! 6!
(2n)!
n 0

x3 x5 x7
( 1)n x 2 n 1
sin( x )  x 


  
3! 5! 7!
n 0 ( 2n  1)!
Page 31
Euler Formula
Proof:
2
3
n

(
ix
)
(
ix
)
(
ix
)
ix
ix
e  1  ix  e   cos
 xi sin
2!
3!
n 0 n!
x
x 2 ix 3 x 4 ix 5 x 6 ix 7
 1  ix  
 
 

2! 3! 4! 5! 6! 7!
 x2 x4 x6
 

x3 x5 x7
 1       i  x     
2! 4! 6!
3! 5! 7!

 

 cos( x )  i sin( x )
Page 32
Euler Formula
幾何
虛數
i
e  1
分析
負數
自然數
Page 33
Complex Exponential Function
z  s  it
e  e
z
s  it
 e e  e (cos t  i sin t )
s it
s
Page 34
Case 3 a 2  4b  0
a
a
1    iw, 2    iw,
2
2
1 2
w  b a
4
1x
 ( a 2 ) x  iwx
 ( a 2) x
e  e
 e
(cos wx  i sin wx)
e
 2x
 e
 ( a 2 ) x  iwx
 y1  e
 y  e
 ax 2
 ax 2
 e
 ( a 2) x
(cos wx  i sin wx)
cos wx, y2  e
 ax 2
sin wx
( A cos wx  B sin wx)
Page 35
Second-Order Homogeneous
Equations with Constant Coefficients

Example 3-4:
y   0.2 y   4.01 y  0, y (0)  0, y (0)  2
Sol:
Step 1: Find General Solution
  0.2  4.01  0,
   0.1  2i
2
 y  e  0.1x ( A cos 2 x  B sin 2 x )
Page 36
Second-Order Homogeneous
Equations with Constant Coefficients
Step 2: Find Particular Solution
ye
 0 .1 x
( A cos 2 x  B sin 2 x )
 y   0.1e 0.1 x ( A cos 2 x  B sin 2 x )
 e 0.1 x ( 2 A sin 2 x  2 B cos 2 x )
y ( 0)  A  0
y (0)  2 B  2
 A  0, B  1
 y  e 0.1 x sin 2 x
Page 37
Second-Order Homogeneous
Equations with Constant Coefficients
Step 3: Plot Particular Solution
MATLAB Code
x=[0:0.1:30];
y=exp(-0.1*x).*sin(2*x);
plot(x,y)
Page 38
Second-Order Homogeneous
Equations with Constant Coefficients

Exercise 3-2: Find General Solution
4 y   4 y   3 y  0
2 y   9 y   0
y   4 y   4 y  0
兩相異實根
重根
9 y   30 y   25 y  0
y   2 y   2 y  0
4 y   4 y   10 y  0
共軛虛根
Page 39
Modeling: Mass-Spring Systems
my   cy   ky  0
Page 40
Modeling: Electric Circuits
1
LI   RI   I  0
C
Resistor
(ohms)
Capacitor
(farads)
Inductor
(heries)
Page 41
Modeling
my   cy   ky  0
my   cy   ky  0
c
k
 
 
 0
m
m
c
1
2
1, 2  

c  4mk
2m
2m
c
1
 
,  
c 2  4mk
2m
2m
1     , 2    
2
Page 42
Modeling

y (t )  c1e
Overdamping
 (   ) t
 c2e
 (   ) t
c  4mk  0
2
Page 43
Modeling

y (t )  (c1  c2t )e
t
Critical Damping c 2  4mk  0
Page 44
Modeling
c  4mk  0
2
y ( t )  e t ( A cos w*t  B sin w*t )
 Ce αt cos( w*t   ),
C 

A2  B 2 , tan 
 B
A
Underdamping
Page 45
Euler-Cauchy Equation

Euler-Cauchy Equation
x y  axy  by  0
2
Sol : Substitute y  x m , y   mx m 1 , y   m( m  1) x m 2
x 2 m( m  1) x m 2  axmxm 1  bx m  0
m( m  1) x m  amx m  bx m  0
The Auxiliary Equation
m  (a  1)m  b  0
2
Page 46
Euler-Cauchy Equation

Case 1: Distinct Real Roots m1, m2
y  c1 x

m1
 c2 x
m2
Example 3-5: x 2 y  2.5xy  2.0 y  0
Sol : Auxiliary Equation
m  3.5m  2  0
2
m  0.5, 4
 y  c1 x
 0. 5
 c2 x
4
Page 47
Euler-Cauchy Equation

Case 2: Double Roots m=(1-a)/2
y  (c1  c2 ln x ) x
m
Page 48
Euler-Cauchy Case 2 :Example

Example x 2 y  3xy  4 y  0
Sol : Auxiliary Equation
m 2  4m  4  0
m  2, 2
 y  ( c1  c2 ln x ) x 2
Page 49
Euler-Cauchy Equation

Case 3: Complex Roots m = a ± bi
y  x A cos(b ln x )  B sin( b ln x )
a
Page 50
Euler-Cauchy Case 3 :Example

Example
x y  7 xy  13 y  0
2
Sol : Auxiliary Equation
m  6m  13  0
2
m  3  2i
y  x
3
A cos( 2 ln x )  B sin( 2 ln x )
Page 51
Existence and Uniqueness Theory
y   p( x ) y   q( x ) y  0  (1)
y  c1 y1  c2 y2  (2)
y ( x0 )  k0 , y ' ( x0 )  k1  (3)

If p(x) and q(x) are continuous function on some
open interval  and x0 is in , then the initial value
problem consisting of (1) and (3) has a unique
solution y(x) on the interval .
Page 52
Wronskian

A set of n functions y1(x), y2(x), …, yn(x),
is said to be linearly dependent over
an interval I if there exist n constants
c1, c2, …, cn, not all zero, such that
c1 y1 ( x )  c2 y2 ( x )    cn yn ( x )  0

Otherwise the set of functions is said to
be linearly independent
Page 53
Wronskian

A set of n functions y1(x), y2(x), …, yn(x), is
linearly independent over an interval I if and
only if the determinant (Wronski determinant, or
Wronskian)
y1
y1
y2
y2


yn
yn




y1( n )
y2( n )
W ( y1 , y2 ,, yn ) 
yn( n )
0
Page 54
Wronskian

Example 3-8:
cos x, sin x
Sol:
W (cos x, sin x ) 
cos x
sin x
 sin x
cos x
 cos2 x  sin 2 x
1 0
 cosx, sinx are linearly independent
Page 55
Linear Dependence and
Independence of Solution


Suppose that (1) has continuous coefficients
p(x) and q(x) on an open interval . Then two
solutions y1 and y2 of (1) on  are linear
dependent on  if and only if their Wronskian
W is zero at some x0 in .
Furthermore, if W=0 for x= x0, then W=0 on
; hence if there is an x1in  at which W is not
zero, then y1 ,y2 are liner independent on  .
Page 56
Illustration of Theorem 2

Example 1
y1  coswx, y2  sinwx
y " w 2 y  0

Example 2
y"2 y '  y  0,
y  ( c1  c2 x )e x
Page 57
A General Solution of (1) includes All
Solutions
y   p ( x ) y   q( x ) y  0  (1)

Theorem 3 (Existence of a general solution)
If p(x) and q(x) are continuous on an open interval , then (1)
has a general solution on .

Theorem 4 (General solution)
Suppose that (1) has continuous coefficients p(x) and q(x) on
some open interval . Then every solution y=Y(x) of (1) is of the
form
Y  c1 y1 ( x)  c2 y2 ( x)
where y1 , y2 form a basis of solutions of (1) on  and c1, c2 are
suitable constants. Hence (1) does not have singular solutions
(I.e., solutions not obtainable from a general solution)
Page 58
Nonhomogeneous Equations
y   p ( x ) y   q( x ) y  r ( x )  (1)
y   p ( x ) y   q( x ) y  0  ( 2)

Theorem


(a) The difference of two solutions of (1)
on some open interval  is a solution of (2)
on 
(b) The sum of a solution of (1) and a
solution of (2) on  is a solution of (1) on 
Page 59
y  
y  

p ( x ) y   q( x ) y
p ( x ) y   q( x ) y
 r ( x )  (1)
 0  ( 2)
A general solution of the nonhomogeneous equation
(1) on some open interval  is a solution of the form
y ( x )  yh ( x )  y p ( x )  (3)

where yh(x)=c1y1(x)+c2y2(x) is a general solution of
the homogeneous equation (2) on  and yp(x) is any
solution of (1) on  containing no arbitrary constants.
A particular solution of (1) on  is a solution obtain
from (3) by assigning specific values to the arbitrary
constants c1 and c2 in yh(x).
Page 60
Practical Conclusion

To solve the nonohomegeneous equation (1)
or an initial value problem for (1) , we have
to solve the homogeneous equation (2) and
find any particular solution yp of (1)
y   p ( x ) y   q( x ) y  r ( x )  (1)
y   p ( x ) y   q( x ) y  0  ( 2)
Page 61
Initial value problem for a
nonhomogeneous equation

Example
y"2 y '101 y  10.4e x
y (0)  1.1, y ' (0)  0.9
Page 62
Solution by Undetermined
Coefficients

Method of Undetermined Coefficients
y   ay   by  r ( x )

General Solution: y
= y h + yp

yh : Homogeneous Solution

yp : Particular Solution
Page 63
Solution by Undetermined
Coefficients
r (x )
yp
ke
nx
nx
kx
n
ke
Kn xn  Kn1xn1   K1x  K0
k cos x K1 cos x  K 2 sin x
k sin x K1 cos x  K 2 sin x
nx
nx
ke cos x e ( K1 cos x  K 2 sin x )
nx
nx
ke sin x e ( K1 cos x  K 2 sin x )
Page 64
Rules for the Method of
Undetermined Coefficients



Basic Rule
Modification Rule
Sum Rule
Page 65
Solution by Undetermined
Coefficients
2


 Example 3-9: y  4 y  8 x , Find y p
Sol:
y p  K 2 x  K1 x  K 0
2
y p  2 K 2
2 K 2  4( K 2 x 2  K1 x  K 0 )  8 x 2
 4 K 2 x  4 K1 x  ( 2 K 2  4 K 0 )  8 x
2
2
 K 2  2, K1  0, K 0  1
 yp  2x 1
2
Page 66
Example for Modification Rule

Example 1: in the case of a simple root
y  3 y'2 y  e , Find y p
x

Example 2: in the case of a double root
y   2 y ' 1  e  x ,
y (0)  1, y ' (0)  1

Example 3: sum rule.
y   2 y '5 y  1.25e0.5 x  40 cos 4 x  55 sin 4 x,
y (0)  0.2, y ' (0)  60.1
Page 67
Second-Order Non-homogeneous
Linear Equations

Method of Variation of Parameters
y   p( x ) y   q( x ) y  r ( x )

Particular Solution:
y p ( x )   y1 
y2 r
y1r
dx  y2 
dx
W
W
y1, y2 : Homogeneous Solutions
 W : Wronskian of y1 and y2

Page 68
Second-Order Non-homogeneous
Linear Equations
2


 Example 3-10: y  4 y  8 x , Find y p
Sol:
y1  cos 2 x, y2  sin 2 x
W 
cos 2 x
sin 2 x
 2 sin 2 x
2 cos 2 x
2
y2 r
yr
dx  y2  1 dx
W
W
8 x 2 sin 2 x
8 x 2 cos 2 x
  cos 2 x 
dx  sin 2 x 
dx
2
2
y p   y1 



  cos 2 x  2 x 2 cos 2 x   4 x cos 2 xdx  sin 2 x 2 x 2 sin 2 x   4 x sin 2 xdx



  cos 2 x  2 x 2 cos 2 x  2 x sin 2 x  cos 2 x 

sin 2 x 2 x 2 sin 2 x  2 x cos 2 x  sin 2 x

 2 x2  1
Page 69
Higher Order Linear Differential
Equations

Higher Order Homogeneous Linear ODE
y ( n )  pn 1 ( x ) y ( n 1)    p1 ( x ) y   p0 ( x ) y  0
If y1, y2, …, yn are the solutions of
y
(n)
 pn 1 ( x ) y
( n 1)
   p1 ( x ) y   p0 ( x ) y  0
y = c1y1+ c2y2 +… + cnyn will be the general
solution
Page 70
Higher Order Linear Differential
Equations

Higher Order Nonhomogeneous Linear ODE
y ( n )  pn 1 ( x ) y ( n 1)    p1 ( x ) y  p0 ( x ) y  r ( x )

General Solution: y
= y h + yp

yh : Homogeneous Solution

yp : Particular Solution
Page 71
Related documents