Fin500J Topic 6Fall 2010 Olin Business School 1 Fin500J: Mathematical Foundations in Finance Topic...
-
Upload
morgan-lloyd -
Category
Documents
-
view
212 -
download
1
Transcript of Fin500J Topic 6Fall 2010 Olin Business School 1 Fin500J: Mathematical Foundations in Finance Topic...
Fin500J Topic 6Fall 2010 Olin Business School 1
Fin500J: Mathematical Foundations in Finance
Topic 6: Ordinary Differential Equations
Philip H. DybvigReference: Lecture Notes by Paul Dawkins, 2007, page 20-33,
page 102-121, page 137-155 and page 340-344http://tutorial.math.lamar.edu/terms.aspx
Slides designed by Yajun Wang
Introduction to Ordinary Differential Equations (ODE)
Recall basic definitions of ODE,orderlinearityinitial conditionssolution
Classify ODE based on( order, linearity, conditions) Classify the solution methods
Fin500J Topic 6Fall 2010 Olin Business School 2
Derivatives Derivatives
dx
dy
Fin500J Topic 6Fall 2010 Olin Business School
Partial Derivatives
u is a function of more than one
independent variable
Ordinary Derivatives
y is a function of one independent variable
y
u
3
Differential Equations DifferentialEquations
162
2
xydx
yd
Fin500J Topic 6Fall 2010 Olin Business School
involve one or more partial derivatives of unknown functions
Ordinary Differential Equations
involve one or moreOrdinary derivatives of
unknown functions
02
2
2
2
x
u
y
u
4
Partial Differential Equations
Ordinary Differential EquationsOrdinary Differential Equations
Fin500J Topic 6Fall 2010 Olin Business School
)cos(25
:
2
2
xydx
dy
dx
yd
eydx
dy
Examples
x
Ordinary Differential Equations (ODE) involve one or more ordinary derivatives of unknown functions with respect to one independent variable
y(x): unknown function
x: independent variable
5
Order of a differential equationOrder of a differential equation
Fin500J Topic 6Fall 2010 Olin Business School
12
)cos(25
:
4
3
2
2
2
2
ydx
dy
dx
yd
xydx
dy
dx
yd
eydx
dy
Examples
x
The order of an ordinary differential equations is the order of the highest order derivative
Second order ODE
First order ODE
Second order ODE
6
Solution of a differential equationSolution of a differential equation
0)()(
)(
:Proof
)(
tt
t
t
eetxdt
tdx
edt
tdx
etxSolution
Fin500J Topic 6Fall 2010 Olin Business School
A solution to a differential equation is a function that satisfies the equation.
0)()(
:
txdt
tdx
Example
7
Linear ODELinear ODE
Fin500J Topic 6Fall 2010 Olin Business School
1
)cos(25
:
3
2
2
22
2
ydx
dy
dx
yd
xyxdx
dy
dx
yd
eydx
dy
Examples
x
An ODE is linear if the unknown function and its derivatives appear to power one. No product of the unknown function and/or its derivatives
Linear ODE
Linear ODE
Non-linear ODE
8
)()()()(')()()()()( 011
1 xgxyxaxyxaxyxaxyxa nn
nn
Boundary-Value and Initial value Problems
Boundary-Value Problems
The auxiliary conditions are not at one point of the independent variable
More difficult to solve than initial value problem
5.1)2(,1)0(
'2'' 2
yy
eyyy x
Fin500J Topic 6Fall 2010 Olin Business School
Initial-Value Problems
The auxiliary conditions are at one point of the independent variable
5.2)0(',1)0(
'2'' 2
yy
eyyy x
same different
9
Classification of ODEODE can be classified in different waysOrder
First order ODESecond order ODENth order ODE
LinearityLinear ODENonlinear ODE
Auxiliary conditionsInitial value problemsBoundary value problems
Fin500J Topic 6Fall 2010 Olin Business School 10
SolutionsAnalytical Solutions to ODE are available for
linear ODE and special classes of nonlinear differential equations.
Numerical method are used to obtain a graph or a table of the unknown function
We focus on solving first order linear ODE and second order linear ODE and Euler equation
Fin500J Topic 6Fall 2010 Olin Business School 11
First Order Linear Differential Equations
Def: A first order differential
equation is said to be linear if it
can be written)()( xgyxpy
Fin500J Topic 6Fall 2010 Olin Business School 12
First Order Linear Differential EquationsHow to solve first-order linear ODE ?
Sol: )1()()( xgyxpy
)2()()()()()( xgxyxpxdx
dyx
Fin500J Topic 6Fall 2010 Olin Business School 13
Multiplying both sides by , called an
integrating factor, gives
)(x
assuming we get
)3(),(')()( xxpx
)4()()()(')( xgxyxdx
dyx
First Order Linear Differential Equations
Fin500J Topic 6Fall 2010 Olin Business School 14
By product rule, (4) becomes
Now, we need to solve from (3)
)(
)(
)(')(')()( xp
x
xxxpx
)6()(
)()()(
)()()()(
)5()()())'()((
1
1
x
cdxxgxxy
cdxxgxxyx
xgxxyx
)(x
First Order Linear Differential Equations
Fin500J Topic 6Fall 2010 Olin Business School 15
)7()(
)()(ln
)())'((ln)()(
)('
)(3
)(
2
2
dxxpcdxxp ecex
cdxxpx
xpxxpx
x
to get rid of one constant, we can use
)9()()(
)(
thenisequation aldifferentiorder first linear a osolution t The
)8()(
)(
)(
dxxp
dxxp
e
cdxxgxxy
ex
Summary of the Solution Process
Fin500J Topic 6Fall 2010 Olin Business School 16
Put the differential equation in the form (1)Find the integrating factor, using (8) Multiply both sides of (1) by and write
the left side of (1) asIntegrate both sidesSolve for the solution
)(x)(x
))'()(( xyx
)(xy
Example 1
Sol:
xeyy 2
xx
xx
xxx
xdxdx
dxxpdxxp
ece
cee
cdxeee
cdxeee
cdxxgeexy
2
2
2)1()1(
)()()()(
Fin500J Topic 6Fall 2010 Olin Business School 17
Example 2
Sol:
2
1)1(,2' 2 yxxyxy
.12
7
3
1
4
1
2
1
c,get tocondition initial Apply the
3
1
4
1
3
1
4
1
)1()1(
)()(
12
'
22342
2222
)()(
cc
cxxxcxxx
cdxxxxcdxxee
cdxxgeexy
xyx
y
dxx
dxx
dxxpdxxp
Fin500J Topic 6Fall 2010 Olin Business School 18
Second Order Linear Differential Equations
Homogeneous Second Order Linear Differential Equationso real roots, complex roots and repeated roots
Non-homogeneous Second Order Linear Differential Equationso Undetermined Coefficients Method
Euler Equations
Fin500J Topic 6Fall 2010 Olin Business School 19
)(''' xgcybyay
where a, b and c are constant coefficientsLet the dependent variable y be replaced by the sum of the two new variables: y = u + vTherefore
)('''''' xgcvbvavcubuau
If v is a particular solution of the original differential equation
The general solution of the linear differential equation will be the sum of a “complementary function” and a “particular solution”.
purpose
Second Order Linear Differential Equations
The general equation can be expressed in the form
0''' cubuau
Fin500J Topic 6Fall 2010 Olin Business School 20
0''' cybyay
Let the solution assumed to be: rxey
rxredx
dy rxer
dx
yd 22
2
0)( 2 cbrarerx
characteristic equation
Real, distinct rootsDouble rootsComplex roots
The Complementary Function (solution of the homogeneous equation)
Fin500J Topic 6Fall 2010 Olin Business School 21
xrey 1 xrey 2
xrxr ececy 2121
Real, Distinct Roots to Characteristic Equation• Let the roots of the characteristic equation be real, distinct and of values r1 and r2. Therefore, the solutions of the characteristic equation are:
• The general solution will be
06'5'' yyy 0652 rr
3
2
2
1
r
r xx ececy 32
21
• Example
Fin500J Topic 6Fall 2010 Olin Business School 22
rxey rxrx rVeVey ''rxVey Let rxrxrx VerVreVey 2'2'''' and
where V is a function of x
0''' cybyay
0)('' xV dcxV
rxrxrxrx xececedcxbey 21)(
Equal Roots to Characteristic Equation• Let the roots of the characteristic equation equal and of value r1 = r2 = r. Therefore, the solution of the characteristic equation is:
0cbrar2 0bar2
Fin500J Topic 6Fall 2010 Olin Business School 23
)).sin()(cos(
,))sin()(cos()(
2
)(1
xixeey
xixeeyxxi
xxi
).sin(cos
:is d.e. theosolution t geneal theTherefore, equation.
aldifferenti the tosolutions twoare and that see easy to isIt
)sin()(2
1)(),cos()(
2
1)(
21
2121
xecx)(ecy(x)
vu
xeyyi
xvxeyyxu
λxλx
xx
Complex Roots to Characteristic EquationLet the roots of the characteristic equation be complex in the form r1,2 =λ±µi. Therefore, the solution of the characteristic equation is:
Fin500J Topic 6Fall 2010 Olin Business School 24
(I) Solve 09'6'' yyy
characteristic equation
0962 rr
321 rr
xexccy 321 )(
Examples(II) Solve 05'4'' yyy
characteristic equation
0542 rr
ir 22,1
)sincos( 212 xcxcey x
Fin500J Topic 6Fall 2010 Olin Business School 25
When g(x) is a polynomial of the form where all the coefficients are constants. The form of a particular solution is
)(''' xgcybyay
cky /
nnxaxaxaa ...2
210
nnxxxy ...2
210
Non-homogeneous Differential Equations (Method of Undetermined Coefficients)
When g(x) is constant, say k, a particular solution of equation is
Fin500J Topic 6Fall 2010 Olin Business School 26
Example
Solve 3844'4'' xxyyy
32 sxrxqxpy 232' sxrxqy
sxry 62''
3322 84)(4)32(4)62( xxsxrxqxpsxrxqsxr
equating coefficients of equal powers of x
84
0124
4486
0442
s
sr
qrs
pqr
32 26107 xxxy p
0442 rr
characteristic equation
xc exccy 2
21 )(
32221 26107)( xxxexcc
yyyx
pc
04'4'' yyy
complementary function
2r
Fin500J Topic 6Fall 2010 Olin Business School 27
Non-homogeneous Differential Equations (Method of Undetermined Coefficients)
rxAey • When g(x) is of the form Terx, where T and r are constants. Theform of a particular solution is
cbrar
TA
2
• When g(x) is of the form Csinnx + Dcosnx, where C and D are constants, the form of a particular solution is
nxFnxEy cossin
2222
2
)(
)(
bnanc
nbDCancE
2222
2
)(
)(
bnanc
nbDCancF
Fin500J Topic 6Fall 2010 Olin Business School 28
Example
Solve 18'6''3 yy
Cxy Cy '
0'' y
18)C(6)0(3
3C
xy p 3
063 2 rr
characteristic equation
xc eccy 2
21
x
pc
eccx
yyy2
213
0'6''3 yy
complementary function
2,0 21 rr
Fin500J Topic 6Fall 2010 Olin Business School 29
Example
Solve xeyyy 478'10''3
xCxey 4xCexy 4)41('
xCexy 4)816(''
71024 CC
2
1C
xp xey 4
2
1
0)4)(23(8103 2 rrrrcharacteristic equation
xxc BeAey 43/2
xxx
pc
BeAexe
yyy
43/24
2
1
08'10''3 yyy
complementary function
4,3/2 21 rr
Fin500J Topic 6Fall 2010 Olin Business School 30
ExampleSolve xyyy 2cos526'''
xDxCy 2sin2cos )2cos2sin(2' xDxCy
)2sin2cos(4'' xDxCy
0102
52210
DC
DC
1
5
D
C
xxy p 2sin2cos5
0)3)(2(62 rrrrcharacteristic equation
xxc BeAey 32
xxBeAe
yyyxx
pc
2sin2cos532
06''' yyy
complementary function
3,2 21 rr
Fin500J Topic 6Fall 2010 Olin Business School 31
Euler EquationsDef: Euler equations
Assuming x>0 and all solutions are
of the form y(x) = xr
Plug into the differential equation to
get the characteristic equation
0'''2 cybxyyax
.0)()1( crbrar
Fin500J Topic 6Fall 2010 Olin Business School 32
Fin500J Topic 6Fall 2010 Olin Business School 33
• The characteristic equation has two different real solutions r1 and r2.
• In this case the functions y = xr1 and y = xr2 are both solutions to the original equation. The general solution is: 21
21)( rr xcxcxy
.xcxcy(x)
.r,rr-)r(r-
yxyyx
32
2
5
1
21
2
32
5015312
:isequation sticcharacteri the,015'3''2
Example:
Fin500J Topic 6Fall 2010 Olin Business School 34
• The characteristic equation has two equal roots r1 = r2=r.
• In this case the functions y = xr and y = xr lnx are both solutions to the original equation. The general solution is: )ln()( 21 xccxxy r
x.xcxcy(x)
.rr)r(r-
yxyyx
ln
401671
:isequation sticcharacteri the,016'7''
42
41
2
Example:
Fin500J Topic 6Fall 2010 Olin Business School 35
• The characteristic equation has two complex roots r1,2 = λ±µi.
x))(μcx)(μ(cxy(x)
xixxxex
λ
xii
lnsinlncos
:be illsolution w general theroots,complex of case in the So,
)lnsin()lncos(
21
ln)(
.xxcxxcy(x)
i.rr)r(r-
yxyyx
)ln3sin()ln3cos(
310431
:isequation sticcharacteri the,04'3''
12
11
2,1
2
Example: