You are on page 1of 54

Honours Finance (Advanced Topics in Finance:

Nonlinear Analysis)
Lecture 2: Introduction to
Ordinary
Differential Euations
!"y #ot"er$
% Last &ee' &e considered (ins'y)s Financial Insta#ility
Hypot"esis as an e*pression of t"e +endo,enous
insta#ility- e*planation of volatility in finance (and
econo.ics)
% T"e FIH clai.s t"at e*pectations &ill rise durin, periods
of econo.ic sta#ility (or sta#le profits)/
% T"at can #e e*pressed as
0 1 rate of c"an,e of e*pectations 2 f(rate of ,ro&t")3
or in sy.#ols

,
_


dt
dY
Y
f
dt
dE
E
1 1
T"is is an ordinary differential euation (ODE)4 e*plorin,
t"is .odel .at"e.atically (in order to .odel it) t"us
reuires 'no&led,e of ODEs
!"y #ot"er$
% In ,eneral3 ODEs (and 5DEs) are used to .odel real6life
dyna.ic processes
0 t"e decay of radioactive particles
0 t"e ,ro&t" of #iolo,ical populations
0 t"e spread of diseases
0 t"e propa,ation of an electric si,nal t"rou," a circuit
% Euili#riu. .et"ods (si.ultaneous al,e#raic euations
usin, .atrices etc/) only tell us t"e restin, point of a
real6life process if t"e process conver,es to euili#riu.
(i/e/3 if t"e dyna.ic process is sta#le)
% Is t"e econo.y static$
Econo.ies and econo.ic .et"odolo,y
% Econo.y clearly dyna.ic3 econo.ic .et"odolo,y pri.arily
static/!"y t"e difference$
% Historically: t"e 7I88 principle:
0 +If &e &is"ed to "ave a co.plete solution /// &e s"ould
"ave to treat it as a pro#le. of dyna.ics/ 9ut it &ould
surely #e a#surd to atte.pt t"e .ore difficult uestion
&"en t"e .ore easy one is yet so i.perfectly &it"in our
po&er/- (:evons ;<=; >;?;;@: ?A)
0 +///dyna.ics includes statics/// 9ut t"e statical solutionB
is si.pler///4 it .ay afford useful preparation and
trainin, for t"e .ore difficult dyna.ical solution4 and it
.ay #e t"e first step to&ards a provisional and partial
solution in pro#le.s so co.ple* t"at a co.plete
dyna.ical solution is #eyond our attain.ent/- ((ars"all3
;?C= in Droene&e,en ;??E: FA2)
Econo.ies and econo.ic .et"odolo,y
% A century on3 :evonsG(ars"all attitude still do.inates .ost
sc"ools of econo.ic t"ou,"t3 fro. te*t#oo' to Hournal:
0 Tasli. I J"o&d"ury3 (acroecono.ic Analysis for Australian
8tudents: +t"e e*a.ination of t"e process of .ovin, fro.
one euili#riu. to anot"er is i.portant and is 'no&n as
dyna.ic analysis/ T"rou,"out t"is #oo' &e &ill assu.e t"at
t"e econo.ic syste. is sta#le and .ost of t"e analysis &ill #e
conducted in t"e co.parative static .ode/- (;??K: 2<)
0 8teed.an3 Luestions for 7alec'ians: +T"e ,eneral point
&"ic" is illustrated #y t"e a#ove e*a.ples is3 of course3 t"at
our previous MstaticM analysis does not Mi,noreM ti.e/ To t"e
contrary3 t"at analysis allo&s enou," ti.e for c"an,es in
pri.e costs3 .ar'ups3 etc/3 to "ave t"eir full effects/-
(8teed.an ;??2: ;FE)
Econo.ies and econo.ic .et"odolo,y
% Is t"is valid$
0 Nes3 if euili#riu. e*ists and is sta#le
0 No3 if euili#riu. does not e*ist3 is not sta#le3 or is one of
.any///
% Econo.ists assu.e t"e for.er/ For e*a.ple3 Hic's on Harrod:
0 +In a sense "e &elco.es t"e insta#ility of "is syste.3
#ecause "e #elieves it to #e an e*planation of t"e tendency
to fluctuation &"ic" e*ists in t"e real &orld/ I t"in'3 as I
s"all proceed to s"o&3 t"at so.et"in, of t"is sort .ay &ell
"ave .uc" to do &it" t"e tendency to fluctuation/ 9ut
.at"e.atical insta#ility does not in itself elucidate
fluctuation/ A .at"e.atically unsta#le syste. does not
fluctuate4 it Hust #rea's do&n/ T"e unsta#le position is one in
&"ic" it &ill not tend to re.ain/- (Hic's ;?F?)
LorenO)s 9utterfly
% 8o3 do unsta#le situations +Hust #rea' do&n-$
0 An e*a.ple: LorenO)s stylised .odel of 2D fluid flo&
under a te.perature ,radient
% LorenO)s .odel derived #y 2nd order Taylor e*pansion of
Navier68to'es ,eneral euations of fluid flo&/ T"e result:
( )
( )
dx
a y x
dt
dy
b z x y
dt
dz
x y c z
dt



* displace.ent
y displace.ent
te.perature ,radient
% Loo's pretty si.ple3 Hust a se.i6uadraticB
% First step3 &or' out euili#riu.:
LorenO)s 9utterfly
% T"ree euili#ria result (for #P;):
( )
( )
0
0
0
dx
a y x
dt
dy
b z x y
dt
dz
x y c z
dt



( )
( )
( )
, 0
1, 1
1
0
y x a
z b b
x y b c
x y z

>


( )
( )
1
1
1
b c
x
y b c
z
b
1

1
1
1
1

1
1
1
1

]
1
]
0
0
0
x
y
z
1 1
1 1

1 1
1 1
] ]
( )
( )
1
1
1
b c
x
y b c
z
b
1

1
1
1
1

1
1
1
1
]
1
]
% Not so si.ple after allQ 9ut
"opefully3 one is sta#le and
t"e ot"er t&o unsta#leB
% Ei,envalue analysis ,ives t"e
for.al ans&er (sort of B)
% 9ut let)s try a si.ulation
first B
8i.ulatin, a dyna.ic syste.
% (any .odern tools e*ist to si.ulate a dyna.ic syste.
0 All use variants (of varyin, accuracy) of appro*i.ation
.et"ods used to find roots in calculus
% (ost sop"isticated is Kt" order Run,e67utta4 si.plest Euler
0 T"e .ost sop"isticated pac'a,es let you see si.ulation
dyna.ically
% !e)ll try si.ulations &it" realistic para.eter values3
startin, a s.all distance fro. eac" euili#riu.:
5
15
1
a
b
c
1 1
1 1

1 1
1 1
] ]
So that the
equilibria are
3.742 3.742 0
3.742 , 3.742 , 0
14 14 0
x
y
z

1 1 1 1
1 1 1 1

1 1 1 1
1 1 1 1
] ] ] ]
Lorenz_Any.vsm
LorenO)s 9utterfly
% No& you 'no& &"ere t"e +#utterfly effect- ca.e fro.
0 Aest"etic s"ape and3 .ore crucially
% All 3 equilibria are unstable (s"o&n later)
0 5ro#a#ility zero t"at a syste. &ill #e in an euili#riu.
state (Jalculus +Le#es,ue .easure-)
% 9efore analysin, &"y3 revie& econo.ists) definitions of
dyna.ics in li,"t of LorenO:
0 Te*t#oo': +t"e process of .ovin, fro. one euili#riu.
to anot"er-/ !ron,:
0 syste. starts in a non6euili#riu. state3 and .oves
to a non6euili#riu. state
0 not euili#riu. dyna.ics #ut far6fro. euili#riu.
dyna.ics
LorenO)s 9utterfly
0 Foundin, fat"er: +.at"e.atical insta#ility does not in
itself elucidate fluctuation/ A .at"e.atically unsta#le
syste. does not fluctuate4 it Hust #rea's do&n-/ !ron,:
% 8yste. &it" unsta#le euili#ria does not +#rea' do&n- #ut
de.onstrates co.ple* #e"aviour even &it" apparently
si.ple structure
% Not #rea'do&n #ut co.ple*ity
0 Researc"er: +static B analysis allo&s enou," ti.e for
c"an,es in pri.e costs3 .ar'ups3 etc/3 to "ave t"eir full
effects-/ !ron,:
% Jo.ple* syste. &ill re.ain far fro. euili#riu. even if
run for infinite ti.e
% Jonditions of euili#riu. never relevant to syste.ic
#e"aviour
!"en econo.ists are ri,"t
% Econo.ist attitudes ,arnered fro. understandin, of linear
dyna.ic syste.s
0 8ta#le linear syste.s do .ove fro. one euili#riu. to
anot"er
0 Snsta#le linear dyna.ic syste.s do #rea' do&n
0 8tatics is t"e end point of dyna.ics in linear syste.s
% 8o econo.ics correct to i,nore dyna.ics if econo.ic
syste. is
0 linear3 or
0 nonlinearities are .inor4
0 one euili#riu. is an attractor4 and
0 syste. al&ays &it"in or#it of sta#le euili#riu.
% !"o are &e 'iddin,$BNonlinearity rules:
Nonlinearities in econo.ics
% 8tructural
0 .onetary value of output t"e product of price and
uantity
% #ot" are varia#les and product is uasi6uadratic
% 9e"avioural
0 +5"illips curve- relation
% &ron,ly .ali,ned in literature
% clearly a curve3 yet conventionally treated as linear
% Di.ensions
0 .assively open6.ultidi.ensional3 t"erefore nu.erous
potential nonlinear interactions
% Evolution
0 Jlearly evolvin, syste.3 t"erefore even .ore co.ple*
t"an +si.ple- nonlinear dyna.icsB
!"y #ot"er$
0 10 20 30 40 50 60 70 80 90 100
Time
-8
-6
-4
-2
-0
2
4
6
8
X

w
i
t
h

b
=
1
5
Lorenz's str!n"e !ttr!#tor
X $is%&!#ement !s ! '(n#tion o' time
!"y 9ot"er$
% LorenO)s #iOarre ,rap"s indicate
0 Hi,"ly volatile nonlinear syste. could still #e
syste.ically sta#le
% cycles continue forever #ut syste. never e*ceeds
sensi#le #ounds
0 e/,/3 in econo.ics3 never ,et ne,ative prices
% linear .odels "o&ever do e*ceed sensi#le #ounds
0 linear co#&e# .odel eventually ,enerates ne,ative
prices
0 E*tre.ely co.ple* patterns could #e ,enerated #y
relatively si.ple .odels
% T"e +'iss- principle a,ain: per"aps co.ple* syste.s could
#e e*plained #y relatively si.ple nonlinear interactions
!"y 9ot"er$
% 9ut so.e pro#le.s (and opportunities)
0 syste.s e*tre.ely sensitive to initial conditions and
para.eter values
0 entirely ne& notion of +euili#riu.-
% +8tran,e attractors-
0 syste. attracted to re,ion in space3 not a point
% (ultiple euili#ria
0 t&o or .ore stran,e attractors ,enerate very
co.ple* dyna.ics
0 E*planation for volatility of &eat"er
% El Nino3 etc/
!"y #ot"er$
0 10 20 30 40 50 60 70 80 90 100
Time
-8
-6
-4
-2
-0
2
4
6
8
X

$
i
s
%
&
!
#
e
m
e
n
t
Lorenz's )tr!n"e *ttr!#tor
+ne sm!&& ste% 'or ! b(tter'&,, one enormo(s '&!% 'or m!n-in$...
Tiny error
in initial
readin,s
leads to
enor.ous
difference
in ti.e pat"
of syste./
And #e"ind
t"e c"aos3
stran,e
attractors///
!"y #ot"er$
Lorenz's )tr!n"e *ttr!#tor
X,. !n$ / $is%&!#ement
!"y 9ot"er$
% LorenO s"o&ed t"at real &orld processes could "ave
unsta#le euili#ria #ut not #rea' do&n in t"e lon, run
#ecause
0 syste. necessarily diver,es fro. euili#riu. #ut does
not continue diver,ence far fro. euili#riu.
0 cycles are co.ple* #ut re.ain &it"in realistic #ounds
#ecause of i.pact of nonlinearities
% Dyna.ics (ODEsG5DEs) t"erefore valid for processes &it"
endo,enous factors as &ell as t"ose su#Hect to an e*ternal
force
0 electric circuit3 #rid,e under &ind and s"ear stress3
population infected &it" a virus as #efore4 and also
0 ,lo#al &eat"er3 econo.ics3 population dyna.ics &it"
interactin, species3 etc/
!"y 9ot"er$
% To understand syste.s li'e LorenO)s3 first "ave to
understand t"e #asics
% Differential euations
0 Linear3 first order
0 Linear3 second (and "i,"er) order
0 8o.e nonlinear first order
0 Interactin, syste.s of euations
% Initial e*a.ples non6econo.ic (typical .at"s ones)
% Later &e)ll consider so.e econo.icGfinance applications
#efore #uildin, full finance .odel
(at"s and t"e real &orld
% (uc" of .at"e.atics education .a'es it see. irrelevant
to t"e real &orld
% In fact t"e purpose of .uc" .at"e.atics is to
understand t"e real &orld at a deep level
% 5rior to 5oincare3 .at"e.aticians (suc" as Laplace)
#elieved t"at .at"e.atics could one day co.pletely
descri#e t"e universe)s future
% After 5oincare (and LorenO) it #eca.e apparent t"at to
descri#e t"e future accurately reuired infinitely
accurate 'no&led,e of t"e present
0 Dodel "ad also proved t"at so.e t"in,s cannot #e
proven .at"e.atically
(at"s and t"e real &orld
% Today .at"e.atics is .uc" less a.#itious
% Li.itations of .at"e.atics accepted #y .ost
.at"e.aticians
% (at"e.atical .odels
0 seen as +first pass- to real &orld
0 re,arded as less ,eneral t"an si.ulation .odels
% #ut .at"s "elps cali#rate and c"aracterise #e"aviour of
suc" .odels
0 ODEs and 5DEs "ave t"eir o&n li.itations
% .ost ODEsG5DEs cannot #e solved
0 "o&ever tec"niues used for t"ose t"at can are used
to analyse #e"aviour of t"ose t"at cannot
(at"s and t"e real &orld
% 8u..arisin, solva#ility of .at"e.atical .odels (fro.
JostanOa ;??A: AA):
Linear Non-linear
01(!tions
+ne
e1(!tion
)e2er!&
e1(!tions
3!n,
e1(!tions
+ne
e1(!tion
)e2er!&
e1(!tions
3!n,
e1(!tions
*&"ebr!i# tri2i!& e!s,
essenti!&&,
im%ossib&e 2er, $i''i#(&t 2er, $i''i#(&t im%ossib&e
+r$in!r,
4i''erenti!& e!s, $i''i#(&t
essenti!&&,
im%ossib&e 2er, $i''i#(&t im%ossib&e im%ossib&e
5!rti!&
4i''erenti!& $i''i#(&t
essenti!&&,
im%ossib&e im%ossib&e im%ossib&e im%ossib&e im%ossib&e
(at"s and t"e real &orld
% To .odel t"e vast .aHority of real &orld syste.s t"at
fall into t"e #otto. ri,"t6"and corner of t"at ta#le3 &e
0 nu.erically si.ulate syste.s of ODEsG5DEs
0 develop co.puter si.ulations of t"e relevant process
% 9ut an understandin, of t"e #asic .at"s of t"e solva#le
class of euations is still necessary to 'no& &"at)s ,oin,
on in t"e insolu#le set
0 Hence3 a cras" course in ODEs3 &it" so.e refres"ers
on ele.entary calculus and al,e#ra///
Fro. Differentiation to DifferentialB
% In (at"s ;/A3 you learnt to "andle euations of t"e for.
( ) x f
dx
dy

% !"ere f is so.e function/ For


e*a.ple
( )
( )
( ) c x y
dx x dx
dx
dy
x
dx
dy
+


cos
sin
sin
% On t"e ot"er "and3 differential euations are of t"e
for.
( ) y x f
dx
dy
,
% 8o "o& do &e "andle t"e.$ (a'e t"e. loo' li'e t"e
stuff &e 'no&:
% T"e rate of c"an,e of y is a function of its
value: y #ot" independent I dependent
Dependent varia#le
Independent varia#le
Fro. Differentiation to DifferentialB
% T"e si.plest differential euation is
y
dt
dy
(we tend to use t to signify time, rather than x
for displacement as in simple differentiation)
% Try
solvin,
t"is for
yourself:
( ) ( )
( ) ( )
( ) ( ) ( ) c t dt y dt y
y
dt
dy
y
y
y
dt
dy
y
dt
dy
+


1 ln ln
dt
d
: t w.r.t. sides both Integrate 1 ln
dt
d
: form in this equation the ewrite
1
ln
dt
d
: ! tric" 1
y by sides both #i$ide
%ontinued...
Fro. Differentiation to DifferentialB
% Anot"er approac" isn)t uite so for.al:
( )
growth l &xponentia
ls exponentia 'a"e ln
t
t
t c t c t
e C y
C e y
C e e e e y
c t y



+

+
(ecause log of a negati$e
number is not defined
(ecause an
exponential is
always positi$e
Fro. Differentiation to DifferentialB
% Treat dt as a s.all uantity
% (ove it around li'e a varia#le
% Inte,rate #ot" sides &/r/t t"e relevant
+d(*)- ter.
0 dy on LH8
0 dt on RH8
% 8o.e pro#le.s &it" ,enerality of t"is
approac" versus previous .et"od3 #ut O7
for econo.ists I .odellin, issues
( )
t
e C y
c t y
dt
y
dy
dt
y
dy
y
dt
dy

+


ln
% 8o &"at)s t"e relevance of t"is to
econo.ics and finance$ Ho& a#out
co.pound interest$
Fro. Differential Euations to Finance
% Jonsider a .oneylender c"ar,in, interest rate i &it"
outstandin, loans of Ty/
% !"o saves s1 of "is inco.e fro. #orro&ers
% !"ose #orro&ers repay p1 of t"eir outstandin, principal eac"
year
% T"en t"e incre.ent to #an' #alances eac" period dt &ill #e d*:
( ) dt y p dt y p i s dy + Divide #y y I Jollect ter.s
( ) ( ) dt p p i s
y
dy
+ Inte,rate
( ) ( )

+ dt p p i s
y
dy
( ) ( ) ( ) c t p p i s y + + ln Ta'e e*ponentials
( ) ( ) t p p i s
e C y
+

Fro. Differential Euations to Finance
% Snder &"at circu.stances &ill our .oneylender)s assets
,ro&$
0 J euals "isG"er initial assets:
( )
( ) ( ) t p p i s
e C t y
+

( )
( ) ( )
C C e C e C y
p p i s

+
1 )
) )
% T"e .oneylender &ill accu.ulate if t"e po&er of t"e
e*ponential is ,reater t"an Oero:
> +

,
_

t as e then ) If
t
p p i s

% T"e .oneylender &ill #lo& t"e lot if t"e po&er of t"e


e*ponential is less t"an Oero:
<

t as ) e then ) If
t

7no&n as +ei,envalue-4
7no&n as +ei,envalue-4
tells "o& .uc" t"e euation
tells "o& .uc" t"e euation
is +stretc"in,- space
is +stretc"in,- space
9ac' to Differential EuationsQ
% T"e for. of t"e precedin, euation is t"e si.plest
possi#le4 "o& a#out a .ore ,eneral for.:
( ) y t f
dt
dy

8a.e #asic idea applies:
( ) dt t f
y
dy

( ) ( )

dt t f y ln
( )



dt t f
e C y
% f(t) can ta'e .any for.s3 and all your inte,ration
'no&led,e fro. (at"s ;/A can #e usedB A fe&
e*a.ples
9ac' to Differential EuationsQ
% 9ut firstly a fe& &ords fro. our sponsor
0 T"ese e*a.ples are Hust +rote- e*ercises
% .ost of t"e. don)t represent any real &orld syste.
0 Ho&ever t"e ulti.ate o#Hective is to #e a#le to
co.pre"end co.ple* nonlinear .odels of finance t"at
do purport to .odel t"e real &orld
% so put up &it" t"e rote and &e)ll ,et to t"e final
o#Hective eventuallyQ
9ac' to JalculusQ
Try t"e follo&in,:
( )
( ) ) sin
)
) sin
)
)
*



+
+


y t e
dt
dy
y e
dt
dy
y t
dt
dy
y t
dt
dy
y t
dt
dy
t b
t b
+
,on-t pursue the last one because
+
.ot a course in integration
+
/ost differential equations
analytically insoluble anyway
+
0rograms exist which can do most
(but not all1) integrations a human can
do
+
(ut a quic" reminder of what is done
to sol$e such 2#&s
+
!lso of rele$ance to wor" we-ll
do later on systems of 2#&s
9ac' to JalculusQ
% 8i.ple to derive fro. first principles: consider a
function &"ic" is t"e product of t&o ot"er functions:
( ) u
dx
d
v v
dx
d
u v u
dx
d
+
% 8o.e useful rules fro. differentiation and inte,ration:
0 5roduct rule:
( ) ( ) t e t f
t b
sin

9ac' to JalculusQ
1)
1)
u x ( )
$ x ( )
u x ( ) $ x ( )
.
1) 1) x
1) 3 ) 3 1)
1)
3
)
3
1)
sin(x)
exp(4bx)
sin(x)5exp(4bx)
( ) ( )
( )
( ) ( )
dx
du
v
dx
dv
u
x
u v
x
v u
x
v u
x
v u u v v u v u v u
x
v u v v u u
x
f f f
x f
dx
d
v v u u f f
v u f
x
x
x
x
+

+ + +

+ +

+ + +





lim
lim
lim
lim
)
)
)
)
'hen
x of functions are $ u, f, where %onsider
% T"ese rules t"en
re&or'ed to ,ive us
+inte,ration #y parts- for
co.ple* inte,rals:
9ac' to JalculusQ
% Jonvert difficult inte,ration into an easier one #y eit"er
0 reducin, +u- co.ponent to Oero #y repeated
differentiation
0 repeatin, +u- and solvin, al,e#raically
( )
( )
( )



+
+
du v v u dv u
du v v u d dv u
du v dv u v u d
dx
du
v
dx
dv
u v u
dx
d
Treat inte,ration as a
.ultiplication operator
9ac' to JalculusQ
% 5ractically
0 c"oose for +u- so.et"in, &"ic" eit"er
% ,ets si.pler &"en inte,rated4 or
% cycles #ac' to itself &"en inte,rated .ore t"an once
0 For our e*a.ple:
( ) ( ) t e t f
t b
sin

T"ese don)t ,et
any si.pler3 #ut
do +cycle-
%Try sin:
%cycles #ac'
%for.ulas e*ist for
e*pansion
9ac' to JalculusQ
( ) ( )
( ) ( )
( ) ( ) ( )









dt t e
b
e
b
t dt t e
e
b
dt e v dt e dv
dt t du t u
X dt t e dt t f
t b t b t b
t b t b t b
t b
cos
1 1
sin sin
: 2ne Stage gi$es 'his
1
, 0ut
cos , sin 0ut
) ( sin
Ne*t differentiation of t"is
Reproduces t"is
9ac' to JalculusQ
% 8ta,e T&o:
( )
( ) ( )
( )
( ) ( ) t function
t function
dt t e X
t function X t function
X t function t function X
b
a
t b
a b
b a
+

+


1
) (
sin
) ( 1
) (
% Finally3 8ta,e T"ree: &e &ere tryin, to solve t"e ODE:
( ) ) sin

y t e
dt
dy
t b
9ac' to Differential EuationsQ
% !e ,ot to t"e point &"ere t"e euation &as in solu#le for.:
( )



dt t e
y
dy
t b
sin
% T"en &e solved t"e inte,ral:
( )
( ) ( ) t function
t function
dt t e X
b
a
t b
+


1
) (
sin
% No& &e solve t"e LH8
and ta'e e*ponentials:
( )
( )
( )
( )
( ) t function
t function
b
a
b
a
e C y
t function
t function
y
+

+

1
1
ln
9ac' to Differential EuationsQ
% 8o far3 &e can solve (so.e) ordinary differential
euations of t"e for.:
( ) ) + y t f
dt
dy
% T"ese are 'no&n as:
0 First order
% #ecause only a first differential is involved
0 Linear
% 9ecause t"ere are no functions of y suc" as sin(y)
0 Ho.o,eneous
% 9ecause t"e RH8 of t"e euation is Oero
9ac' to Differential EuationsQ
% Ne*t sta,e is to consider non6"o.o,eneous euations:
( ) ( ) t g y t f
dt
dy
+
% ,(t) can #e t"ou,"t of as a force actin, on a syste.
% !e can no lon,er +divide t"rou," #y y- as #efore3
since t"is yields
( )
( ) dt t f
y
t g
y
dy

,
_


% &"ic" still "as y on #ot" sides of t"e euals si,n3 and
if anyt"in, loo's "arder t"an t"e initial euation
% 8o &e apply t"e t"ree funda.ental rules of
.at"e.atics:
T"e t"ree funda.ental rules of .at"e.atics

% (;) !"at "ave you ,ot t"at you don)t &ant$


0 Det rid of it
% (2) !"at "aven)t you ,ot t"at you do &ant$
0 5ut it in
% (A) 7eep t"in,s #alanced
% Ta'e a loo' at t"e euation a,ain
( ) ( ) t g y t f
dt
dy
+
!"at does t"is loo' al.ost li'e$
T"e product rule:
( ) u
dx
d
v v
dx
d
u v u
dx
d
+
Non6Ho.o,eneous First Order Linear ODEs
% T"e LH8 of t"e e*pression
( ) ( ) t g y t f
dt
dy
+
is al.ost in product rule
for.
% Jan &e do anyt"in, to put it e*actly in t"at
for.$
0 (ultiply both sides #y an e*pression (t)
so t"at
( ) ( ) ( ) ( ) ( ) t g t y t f t
dt
dy
t +
% T"is is only possi#le if
( ) ( ) ( ) ( ) ( ) y t f t
dt
dy
t y t
dt
d
+
% No& &e "ave to find a (t) suc" t"at
( ) ( ) ( ) t f t t
dt
d

T"e Inte,ratin, Factor Approac"
% T"is is a first order linear "o.o,eneous ODE3 &"ic" &e
already 'no& "o& to solve (t"e only t"in, t"at .a'es it
apparently .essy is t"e e*plicit state.ent of a
dependence on t in (t)3 &"ic" &e can drop for a &"ile):
( )
( )
( )
( ) ( )
( )
( )


dt t f
e t
dt t f
dt t f
d
dt t f
d
t f
dt
d


ln
'his is "nown as the 6integrating factor7
T"e Inte,ratin, Factor Approac"
% 8o if &e .ultiply
( ) ( ) t g y t f
dt
dy
+
by
( )
( )

dt t f
e t
we get
( )
( )
( ) ( )
( )
( )

,
_

dt t f dt t f dt t f dt t f
e t g e y
dt
d
y e t f
dt
dy
e
% Any#ody diOOy yet$
0 It)s co.plicated3 #ut t"ere is a li,"t at t"e
end of t"e tunnel
% Ne*t3 &e solve t"e euation #y ta'in,
inte,rals of #ot" sides:
( ) ( )
( )
( )
dt e t g e y dt e y
dt
d dt t f dt t f dt t f


,
_

T"e Inte,ratin, Factor Approac"


% And finally t"e solution is:
( )
( )
( )


dt t f
dt t f
e
dt e t g
y
% T"is is a #it li'e line dancin,: it loo's &orse t"an it
really is/
0 Let)s try a couple of e*a.ples: firstly3 try
t y t
dt
dy
*
% (Actually3 line dancin, pro#a#ly is as #ad as it loo's3
and so is t"is)///
T"e Inte,ratin, Factor Approac"
% T"e first one
t y t
dt
dy
*
#eco.es
t y t
dt
dy
*
usin, t"e inte,ratin, factor
% No& &e need a suc"
t"at
( ) y t
dt
dy
y
dt
d
*
t
dt
d
*
% !"ic" is only possi#le
if
% T"is is a first order "o.o,eneous DE: piece of ca'eQ
( )
*
*
* ln *
t
e t dt t dt t
d

T"e Inte,ratin, Factor Approac"


% T"us &e .ultiply
t y t
dt
dy
*
by
*
t
e

to yield
( )
* * * *
*
t t t t
e t y e
dt
d
e t y
dt
dy
e


% T"en &e inte,rate:
( )


dt e t y e dt y e
dt
d
t t t
* * *
Ne*t pro#le.: "o& to inte,rate t"is$
9ac' to #asics U2:
t"e J"ain Rule in
reverse
T"e J"ain Rule
% T"is e*pression:


dt e t
t
*
% +Loo's li'e-
( ) t t
dt
d
t u du e
u

* since where
* *
( )
* *
so
*
1
t u dt t t d

% Or in differential for.:
% T"at inte,ral is ele.entary:
c e du e
u u
+


( ) C e c e du e du e t
t t u t
+ +


* * *
*
1
*
1

*
1

% No& su#stitutin, for u and ta'in, account of t"e
constant:
T"e Inte,ratin, Factor Approac"
% Finally3 &e return to
( )


dt e t y e dt y e
dt
d
t t t
* * *
% 5uttin, it all to,et"er:
C e y e
t t
+

* *
*
1
*
* *
*
*
1
*
1
*
1
t
t t
t
e C
e
C
e
C e
y + +
+

t y t
dt
dy
*
is t"e solution to
% 9efore &e try anot"er e*a.ple3 t"e ,eneral
principle #e"ind t"e tec"niue a#ove is t"e c"ain
rule in reverse:
T"e J"ain Rule
1)
1)
u x ( )
$ x ( )
u x ( ) $ x ( )
.
( )
$ u x ( ) ( )
1) 1) x
1) 3 ) 3 1)
1)
3
)
3
1)
sin(x)
exp(4bx)
sin(x)5exp(4bx)
e(sin(x))
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) C t g F
dt t g t g F dt t g t g f
x f x F dx x f x F
+


8 8 8 So
8 then If
% In reverse3 t"e
su#stitution .et"od of
inte,ration:
Rate of c"an,e of
co.posite function is rate
of c"an,e of one ti.es t"e
ot"er
( ) ( ) ( )
( ) ( ) ( ) ( ) x g x g f x F
x g f x F
8 8 8 then
If

2slope of co.posite
8lope of one
V slope of ot"er
9ac' to Differential EuationsQ
% Try t"e tec"niue &it"
1
*
+ y t
dt
dy
( )
( )
9
9
1
9 *
*
*
*
*
9
1
dt ln
d
dt
d
dt
d
iff
: factor g integratin 'imes 1
t
e
t t
t
t
y
dt
d
y t
dt
dy
y t
dt
dy




+
+



% 8ta,e One: Findin, :
Linear First Order Non6Ho.o,eneous
% 8ta,e T&o: apply :
c dt e y e dt y e
dt
d
e y e
dt
d
y e t
dt
dy
e y t
dt
dy
e y t
dt
dy
t t t
t t t t
t
+

,
_

,
_

+ +
+

9 9 9
9 9 9 9
9
9
1
9
1
9
1
9
1
9
1
9
1
*
9
1
*
9
1
*
factor g integratin 'imes 1

% 8ta,e T"ree: inte,ratin, RH8B


0 t"ere is no 'no&n inte,ralQ (co..on situation in
ODEs)
0 Jo.pletin, t"e .at"s as #est &e can:
c e dt e e y
t t t
+

9 9 9
9
1
9
1
9
1
T"is can only #e esti.ated nu.erically

You might also like