Вы находитесь на странице: 1из 156

Mathematics For Quant

Finance
Introduction to Mathematical Methods
Riaz Ahmad
+
This is a revision course designed to act as a mathematics
refresher. The four topics covered are
Calculus
Linear Algebra
Probability
Dierential Equations
+
r.ahmad@7city.com
1
1. INTRODUCTION TO CALCULUS
1 Introduction to Calculus
1.1 Functions
A function ) (a) of a single variable a is a rule that
assigns each element of a set A (written a A) to
exactly one element j of a set Y (j Y ) . A function
is denoted by the form j = ) (a) or:
a ) (a) .
We can also write ) : A Y .
The set A is called the domain of ) and the set Y is
called the image (or range), written Dom ) and Im ),
in turn.
The inverse function )
1
(a) is dened so that
)
_
)
1
(a)
_
= a and )
1
() (a)) = a.
2
1. INTRODUCTION TO CALCULUS
An even function is one which has the property
) (a) = ) (a)
e.g. ) (a) = a
2
.
) (a) = a
3
is an example of an odd function because
) (a) = ) (a) .
3
1. INTRODUCTION TO CALCULUS
1.1.1 The Modulus Function
Sometimes we wish to obtain the absolute value of a
number, i.e. positive part. For example the absolute
value of 3.9 is 3.9. In maths there is a function which
gives us the absolute value of a variable a called the
modulus function, written [a[ and dened as
j = [a[ =
_
a a 0
a a < 0
modulus function
0
0.5
1
1.5
2
2.5
3
3.5
-4 -3 -2 -1 0 1 2 3 4
4
1. INTRODUCTION TO CALCULUS
1.1.2 The exponential and log functions
The logarithm (or simply log) was introduced to solve
equations of the form
o
j
= .
and we say j is log of . to base o. That is we take logs
of both sides (log
o
)
log
o
o
j
= log
o
.
which gives
j = log
o
..
By denition log
o
o = 1 (important).
We will often need the exponential function c
a
and the
(natural) logarithm log
c
a or (ln a) . Here
c = 2.718281828 . . . .
which is the approximation to
_
1 +
1
a
_
a
5
1. INTRODUCTION TO CALCULUS
when a is very large. Similarly the exponential function
can be approximated from
_
1 +
a
a
_
a
ln a and c
a
are mutual inverses:
log (c
a
) = c
log a
= a.
Also
1
c
a
= c
a
.
Here we have used the property (a
o
)
b
= a
ob
, which
allowed us to write
1
c
a
= (c
a
)
1
= c
a
.
Their graphs look like this:
6
1. INTRODUCTION TO CALCULUS
Exponential Functions
0
1
2
3
4
5
6
7
8
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x
e
x
p
(
x
)

a
n
d

(
e
x
p
(
-
x
)
logx and lnx
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
0 1 2 3 4 5
x
We see that log
10
a grows faster than natural logarithm.
7
1. INTRODUCTION TO CALCULUS
When there is a large exponent (many terms) then it is
common to write
exp (.......)
Note:
c
a
c
j
= c
a+j
, c
0
= 1
(recall a
o
.a
b
= a
o+b
) and
log (aj) = log a+log j, log (1a) = log a, log 1 = 0.
log
_
a
j
_
= log a log j.
8
1. INTRODUCTION TO CALCULUS
1.1.3 Trigonometric Functions
sinx and cosx
-1.5
-1
-0.5
0
0.5
1
1.5
-8 -6 -4 -2 0 2 4 6 8
sin a is an odd function, i.e. sin (a) = sin a.
sin a = 0 =a = a Va Z
cos a is an even function, i.e. cos (a) = cos a.
It is periodic with period 2: cos (a + 2) = cos a.
cos a = 0 =a = (2a + 1)

2
Va Z
9
1. INTRODUCTION TO CALCULUS
Trigonometric Identities:
cos
2
a + sin
2
a = 1
sin (a j) = sin acos j cos asin j
cos (a j) = cos acos j (sin asin j
The "inverse" trigonometric functions are dened by
sec a =
1
cos a
; csc a =
1
sin a
10
1. INTRODUCTION TO CALCULUS
1.2 Limits
Choose a point a
0
and function ) (a) . Suppose we
are interested in this function near the point a = a
0.
The function need not be dened at a = a
0
. We write
) (a) | as a a
0
, "if ) (a) gets closer and closer
to | as a gets close to a
0
". Mathematically we write this
as
lim
aa
0
) (a) |,
if there exists a number | such that
Whenever a is close to a
0
) (a) is close to |.
11
1. INTRODUCTION TO CALCULUS
Let us have a look at a few basic examples and corre-
sponding "tricks" to evaluate them
Example 1:
lim
a0
_
a
2
+ 2a + 3
_
0 + 0 + 3 3;
Example 2:
lim
ao
a
2
+ 2a + 2
3a
2
+ 4
= lim
ao
a
2
a
2
+
2a
a
2
+
2
a
2
3a
2
a
2
+
4
a
2
=
lim
ao
1 +
2
a
+
2
a
2
3 +
4
a
2

1
3
.
Example 3:
lim
a3
a
2
9
a 3
= lim
a3
(a + 3) (a 3)
(a 3)
= lim
a3
(a + 3) 6
12
1. INTRODUCTION TO CALCULUS
1.3 Continuity
A function ) (a) is continuous at a
0
if
lim
aa
0
) (a) = ) (a
0
) .
That is, we can draw its graph without taking the pen
o the paper.
13
1. INTRODUCTION TO CALCULUS
1.4 Dierentiation
How fast does a function ) (a) change with a? The
gradient or derivative of ) (a) ,written
)
t
(a) or
o)
oa
is dened for each a as
)
t
(a) = lim
ca0
) (a +ca) ) (a)
ca
assuming the limit exists (it may not). Dierentiability
implies continuity (but converse does not always hold).
14
1. INTRODUCTION TO CALCULUS
Examples:
Dierentiating a
2
from rst principles:
) (a) = a
2
) (a +I) = (a +I)
2
= a
2
+ 2aI +I
2
) (a +I) ) (a)
I
=
2Ia +I
2
I
= 2a +I
2a as I 0;
o
oa
a
a
= aa
a1
;
o
oa
c
a
= c
a
;
o
oa
c
oa
= oc
oa
;
15
1. INTRODUCTION TO CALCULUS
o
oa
log a =
1
a
o
oa
cos a = sin a
o
oa
sin a = cos a
and so on. Take these as dened (standard results).
Examples:
) (a) = a
5
)
t
(a) = 5a
4
j (a) = c
3a
j
t
(a) = 3c
3a
= 3j (a)
1.4.1 Rules For Dierentiation
Linearity
If A and j are constants and j = A) (a) +jj (a) then
16
1. INTRODUCTION TO CALCULUS
oj
oa
=
o
oa
(A) (a) +jj (a)) = A)
t
(a) +jj
t
(a) .
Thus if j = 3a
2
6c
2a
then
ojoa = 6a + 12c
2a
.
17
1. INTRODUCTION TO CALCULUS
1.4.2 Product Rule
If j = ) (a) j (a) then
oj
oa
= )
t
(a) j (a) +) (a) j
t
(a) .
Thus if j = a
3
c
3a
then
ojoa = 3a
2
c
3a
+a
3
_
3c
3a
_
= 3a
2
(1 +a) c
3a
.
18
1. INTRODUCTION TO CALCULUS
1.4.3 Function of a Function Rule
Dierentiation is often a matter of breaking a complicated
problem up into simpler components.
The function of a function rule is one of the main ways
of doing this. If
j = ) (j (a)) then
oj
oa
= )
t
(j (a)) j
t
(a) .
Thus if j = c
4a
2
then
ojoa = c
4a
2
4.2a = 8ac
4a
2
.
So dierentiate the whole function, then multiply by the
derivative of the "inside" (j (a)) .
Another way to think of this is in terms of the chain rule.
19
1. INTRODUCTION TO CALCULUS
Write j = ) (j (a)) as
j = ) (&) , & = j (a) .
Then
oj
oa
=
o
oa
) (&) =
o&
oa
o
o&
) (&) = j
t
(a) )
t
(&)
= j
t
(a) )
t
(j (a)) .
Symbolically, we write this as
oj
oa
=
o&
oa
oj
o&
provided & is a function of a alone.
Thus for j = c
4a
2
, write & = 4a
2
, j = c
&
. Then
20
1. INTRODUCTION TO CALCULUS
oj
oa
=
o&
oa
oj
o&
= 8ac
4a
2
.
Further examples:
j = sin a
3
j = sin &, where & = a
3
j
t
= cos &.3a
2
j
t
= 3a
2
cos a
3
j = ln sin a. Put & = sin a j = ln &
oj
o&
=
1
&
,
o&
oa
= cos a
hence j
t
= cot a.
21
1. INTRODUCTION TO CALCULUS
1.4.4 Quotient Rule
If j =
) (a)
j (a)
then
oj
oa
=
j (a) )
t
(a) ) (a) j
t
(a)
(j (a))
2
.
Thus if j = c
3a
a
2
,
oj
oa
=
a
2
3c
3a
2ac
3a
a
4
=
3a 2
a
3
c
3a
.
This is a combination of the product rule and the function
of a function (or chain) rule.
Examples:
o
oa
(ac
a
) = a
o
oa
(c
a
) +c
a
o
oa
(a)
= ac
a
+c
a
= c
a
(a + 1) ;
22
1. INTRODUCTION TO CALCULUS
o
oa
(c
a
a) =
a(c
a
)
t
c
a
(a)
t
(a)
2
=
ac
a
c
a
a
2
=
c
a
a
2
(a 1) ;
o
oa
_
c
a
2
_
=
o
oa
(c
&
) where & = a
2
) o& = 2aoa
= (2a) c
a
2
.
23
1. INTRODUCTION TO CALCULUS
1.4.5 Higher Derivatives
These are dened recursively;
)
tt
(a) =
o
2
)
oa
2
=
o
oa
_
o)
oa
_
)
ttt
(a) =
o
3
)
oa
3
=
o
oa
_
o
2
)
oa
2
_
and so on. For example:
) (a) = 4a
3
)
t
(a) = 12a
2
)
tt
(a) = 24a
)
ttt
(a) = 24 )
(i)
(a) = 0.
so for any a
th
degree polynomial
) (a) = o
a
a
a
+o
a1
a
a1
+....... +o
1
a +o
0
we have )
(a+1)
(a) = 0.
24
1. INTRODUCTION TO CALCULUS
Consider another example
) (a) = c
a
)
t
(a) = c
a
)
tt
(a) = c
a
.
.
.
)
(a)
(a) = c
a
= ) (a)
25
1. INTRODUCTION TO CALCULUS
1.4.6 Further Limits
This will be an application of dierentiation. Consider
the limiting case
lim
ao
) (a)
j (a)
=
0
0
This is called an indeterminate form. Then L Hospitals
rule states
lim
ao
) (a)
j (a)
= lim
ao
)
t
(a)
j
t
(a)
= ....... = lim
ao
)
(v)
(a)
j
(v)
(a)
for v such that we have the indeterminate form 00. If
for v + 1 we have
lim
ao
)
(v+1)
(a)
j
(v+1)
(a)

where is not of the form 00 then
lim
ao
) (a)
j (a)
= lim
ao
)
(v+1)
(a)
j
(v+1)
(a)
.
Note: Very important to verify quotient has this indeter-
minate form before using LHospitals rule. Else we end
up with an incorrect solution. We can also use this rule
for the form
o
o
.
26
1. INTRODUCTION TO CALCULUS
Examples:
1.
lim
a0
cos a + 2a 1
3a
=
0
0
So dierentiate both numerator and denominator
lim
a0
o
oa
(cos a + 2a 1)
o
oa
(3a)
= lim
a0
sin a + 2
3
,=
0
0

2
3
2. lim
a0
c
a
+c
a
2
1 cos 2a
; quotient has form 00. By L
Hospitals rule we have lim
a0
c
a
c
a
2 sin 2a
, which has
indeterminate form 00 again for 2nd time, so we
apply L Hospitals rule again
lim
a0
c
a
+c
a
4 cos 2a
=
1
2
.
3. lim
ao
a
2
ln a
=
o
o
=use LHospital , so lim
ao
2a
1a

o
27
1. INTRODUCTION TO CALCULUS
4. lim
ao
c
3a
ln a
=
o
o
= lim
ao
3ac
3a
o
5. lim
ao
a
2
c
3a
= 0.o, so we convert to form oo
by writing lim
ao
a
2
c
3a
, and now use LHospital (dier-
entiate twice), which gives lim
ao
2
9c
3a
0
6. lim
a0
sin a
a
= lim
a0
cos a ~ 1
What is example 6. saying?
When a is very close to 0 then sin a ~ a. That is sin a
can be approximated with the function a for small values.
28
1. INTRODUCTION TO CALCULUS
1.5 Integration
1.5.1 The Indenite Integral
The indenite integral of ) (a) ,
_
) (a) oa,
is any function 1 (a) whose derivative equals ) (a).
Thus if
1 (a) =
_
) (a) oa then
o1
oa
(a) = ) (a) .
Since the derivative of a constant, C, is zero (oCoa = 0) ,
the indenite integral of ) (a) is only determined up to
an arbitrary constant;
29
1. INTRODUCTION TO CALCULUS
if
o1
oa
= ) (a) then
o
oa
(1 (a) +C) =
o1
oa
(a) +
oC
oa
=
o1
oa
(a) = ) (a) .
Thus we must always include an arbitrary constant of
integration in an indenite integral.
Simple examples are
_
a
a
oa =
1
a + 1
a
a+1
+C (a ,= 1) ,
_
oa
a
= log (a) +C,
_
c
oa
oa =
1
o
c
oa
+C (o ,= 0) ,
_
cos oaoa =
1
o
sin oa +C
_
sin oaoa =
1
o
cos oa +C
30
1. INTRODUCTION TO CALCULUS
Linearity
Integration is linear:
_
(c) (a) +oj (a)) oa = c
_
) (a) oa+o
_
j (a) oa
for constants and 1. Thus, for example
_
_
a
2
+1a
3
_
oa =
_
a
2
oa +1
_
a
3
oa
=

3
a
3
+
1
4
a
4
+C,
_
(3c
a
+ 2a) oa = 3
_
c
a
oa+2
_
oa
a
= 3c
a
+2 log (a)+C,
and so forth.
31
1. INTRODUCTION TO CALCULUS
1.5.2 The Denite Integral
The denite integral,
_
b
o
) (a) oa,
is the area under the graph of ) (a) , between a = o
and a = b, with positive values of ) (a) giving posi-
tive area and negative values of ) (a) contributing neg-
ative area. It can be computed if the indenite integral
is known. For example
_
3
1
a
3
oa =
_
1
4
a
4
_
3
1
=
1
4
_
3
4
1
4
_
= 20,
_
1
1
c
a
oa = [c
a
]
1
1
= c 1c.
32
1. INTRODUCTION TO CALCULUS
Note that the denite integral is also linear in the sense
that
_
b
o
() (a) +1j (a)) oa =
_
b
o
) (a) oa+1
_
b
o
j (a) oa.
Note also that a denite integral
_
b
o
) (a) oa
does not depend on the variable of integration, a in the
above, it only depends on the function ) and the limits
of integration (o and b in this case); the area under a
curve does not depend on what we choose to call the
horizontal axis.
So
_
b
o
) (a) oa =
_
b
o
) (j) oj =
_
b
o
) (:) o:.
33
1. INTRODUCTION TO CALCULUS
Note that, by denition, if o < b < c then
_
c
o
) (a) oa =
_
b
o
) (a) oa +
_
c
b
) (a) oa.
By convention (which is not unreasonable if we think of
a denite integral in terms of an area)
_
o
c
) (a) oa =
_
c
o
) (a) oa.
With this convention we nd that for any o, b and c
_
c
o
) (a) oa =
_
b
o
) (a) oa +
_
c
b
) (a) oa.
34
1. INTRODUCTION TO CALCULUS
1.5.3 Integration by Substitution
This involves the change of variable and used to evaluate
integrals of the form
_
j () (a)) )
t
(a) oa,
and can be evaluated by writing : = ) (a) so that
o:oa = )
t
(a) or o: = )
t
(a) oa. Then the integral
becomes
_
j (:) o:.
For example:
_
a
1 +a
2
oa =
1
2
_
o:
:
=
1
2
log (:) +C =
1
2
log
_
1 +a
2
_
+C
= log
_
_
1 +a
2
_
+C
35
1. INTRODUCTION TO CALCULUS
if we put : = 1 +a
2
so o: = 2aoa.
Similarly:
_
ac
a
2
oa =
1
2
_
c
:
o:
=
1
2
c
:
+C =
1
2
c
a
2
+C
this time with : = a
2
so o: = 2aoa;
_
1
a
log (a) oa =
_
: o: =
1
2
:
2
+C
=
1
2
(log (a))
2
+C
with : = log (a) so o: = oaa and
_
c
a+c
a
oa =
_
c
a
c
c
a
oa =
_
c
:
o:
= c
:
+C = c
c
a
+C
36
1. INTRODUCTION TO CALCULUS
with : = c
a
so o: = c
a
oa.
The method can be used for denite integrals too. In this
case it is usually more convenient to change the limits of
integration at the same time as changing the variable;
this is not strictly necessary, but it can save a lot of time.
For example, consider
_
2
1
c
a
2
2aoa.
Write : = a
2
, so o: = 2aoa. Now consider the limits
of integration; when a = 2, : = a
2
= 4 and when
a = 1, : = a
2
= 1. Thus
_
a=2
a=1
c
a
2
2aoa =
_
:=4
:=1
c
:
o:
= [c
:
]
:=4
:=1
= c
4
c
1
.
37
1. INTRODUCTION TO CALCULUS
Further examples: consider
_
a=2
a=1
2aoa
1 +a
2
.
In this case we could write : = 1 +a
2
, so o: = 2aoa
and a = 1 corresponds to : = 2, a = 2 corresponds
to : = 5, and
_
a=2
a=1
2a
1 +a
2
oa =
_
:=5
:=2
o:
:
= [ln (:)]
:=5
:=2
= log (5) ln (2)
= ln (52)
We can solve the same problem without change of limit,
i.e.
_
ln

1 +a
2

_
a=2
a=1
ln 5 ln 2 = ln 52.
38
1. INTRODUCTION TO CALCULUS
Or consider
_
a=c
a=1
2
log (a)
a
oa
in which case we should choose : = log (a) so o: =
oaa and a = 1 gives : = 0, a = c gives : = 1
and so
_
a=c
a=1
2
log (a)
a
oa =
_
:=1
:=0
2:o: =
_
:
2
_
:=1
:=0
= 1.
39
1. INTRODUCTION TO CALCULUS
1.5.4 Integration by Parts
This is based on the product rule. In usual notation, if
j = &(a) (a) then
oj
oa
=
o&
oa
+&
o
oa
so that
o&
oa
=
oj
oa
&
o
oa
and hence integrating
_
o&
oa
oa =
_
oj
oa
oa
_
&
o
oa
oa = j (a)
_
&
o
oa
oa+C
or
_
o&
oa
oa = &(a) (a)
_
&(a)
o
oa
oa +C
40
1. INTRODUCTION TO CALCULUS
i.e.
_
&
t
oa = &
_
&
t
oa +C
This is useful, for instance, if (a) is a polynomial and
&(a) is an exponential.
How can we use this formula? Consider the example
_
ac
a
oa
Put
= a &
t
= c
a

t
= 1 & = c
a
hence
_
ac
a
oa = &
_
&
o
oa
oa
= ac
a

_
c
a
.1oa = c
a
(a 1) +C
The formula we are using is the same as
_
o& = &
_
&o +C
Now using the same example
_
ac
a
oa
= a o& = c
a
oa
o = oa & = c
a
41
1. INTRODUCTION TO CALCULUS
and
_
o& = &
_
&o = ac
a

_
c
a
oa
= c
a
(a 1) +C
Another example
_
a
2
..
(a)
c
2a
..
&
t
oa =
1
2
a
2
c
2a
. .
&

_
ac
2a
. .
&
t
oa +C
and using integration by parts again
_
ac
2a
oa =
1
2
ac
2a

1
2
_
c
2a
oa =
1
4
(2a 1) c
2a
+1
so
_
a
2
c
2a
oa =
1
4
_
2a
2
2a + 1
_
c
2a
+1.
42
1. INTRODUCTION TO CALCULUS
1.5.5 Other Results
_
)
t
(a)
) (a)
oa = ln [) (a)[ +C
e.g.
_
3
1 + 3a
oa = ln [1 + 3a[ +C
_
1
2 + 7a
oa =
1
7
_
7
2 + 7a
oa =
1
7
ln [2 + 7a[ +C
This allows us to state a standard result
_
1
o +ba
oa =
1
b
ln [o +ba[ +C
How can we re-do the earlier example
_
a
1 +a
2
oa,
which was initially treated by substitution? We note that
we can write this integral as
1
2
_
2a
1 +a
2
oa =
1
2
ln

1 +a
2

+C
= ln
_

1 +a
2

+C
43
1. INTRODUCTION TO CALCULUS
1.5.6 Partial Fractions
Consider a fraction where both numerator and denomi-
nator are polynomial functions, i.e.
I (a) =
) (a)
j (a)
=
.

a=0
o
a
a
a
A

a=0
b
a
a
a
where deg ) (a) < deg j (a) , i.e. . < A. Then I (a)
is called a partial fraction. Suppose
c
(a +o) (a +b)
=

(a +o)
+
1
(a +b)
then writing
c = (a +b) +1(a +o)
and solving for and 1 allows us to obtain partial
fractions.
44
1. INTRODUCTION TO CALCULUS
The simplest way to achieve this is by setting a = b to
obtain the value of 1, then putting a = o yields .
Example:
1
(a 2) (a + 3)
. Now write
1
(a 2) (a + 3)
=

a 2
+
1
a + 3
which becomes
1 = (a + 3) +1(a 2)
Setting a = 3 1 = 15; a = 2 = 15.
So
1
(a 2) (a + 3)
=
1
5 (a 2)

1
5 (a + 3)
.
45
1. INTRODUCTION TO CALCULUS
Any rational expression
) (a)
j (a)
(with degree of )(a) <
degree of j(a)) such as above can be written
) (a)
j (a)
= 1
1
+1
2
+ ........ +1
I
where each 1
i
has form

(ja +q)
n
or
Ca +1
_
oa
2
+ba +c
_
a
where

(ja +q)
n
is written as

1
(ja +q)
+

2
(ja +q)
2
+ ...... +

(ja +q)
n
and
Ca +1
_
oa
2
+ba +c
_
a
becomes
C
1
a +1
1
oa
2
+ba +c
+ ...... +
C
a
a +1
a
_
oa
2
+ba +c
_
a
46
1. INTRODUCTION TO CALCULUS
Examples:
3a 2
(4a 3) (2a + 5)
3
=

4a 3
+
1
2a + 5
+
C
(2a + 5)
2
+
1
(2a + 5)
3
4a
2
+ 13a 9
a(a + 3) (a 1)
=

a
+
1
a + 3
+
C
(a 1)
3a
3
18a
2
+ 29a 4
(a + 1) (a 2)
3
=

a + 1
+
1
a 2
+
C
(a 2)
2
+
1
(a 2)
3
5a
2
a + 2
_
a
2
+ 2a + 4
_
2
(a 1)
=
a +1
a
2
+ 2a + 4
+
Ca +1
_
a
2
+ 2a + 4
_
2
+
1
a 1
a
2
a 21
_
a
2
+ 4
_
2
(2a 1)
=
a +1
a
2
+ 4
+
Ca +1
_
a
2
+ 4
_
2
+
1
2a 1
47
1. INTRODUCTION TO CALCULUS
1.6 Complex Numbers
A complex number : is dened by : = a +ij where
a, j R and i =
_
1. It follows that i
2
= 1.
A complex number : may also be expressed in polar
co-ordinate form as
: = v (cos 0 +i sin 0)
where v is always positive and 0 counter-clockwise from
Oa. So a = v cos 0, j = v sin 0
x
y
r

z = x+iy
So
a = v cos 0, j = v sin 0; v = +
_
a
2
+j
2
, 0 = arctan
j
a
48
1. INTRODUCTION TO CALCULUS
We call the a axis the real line and the j axis the
imaginary line.
The set of all complex numbers is denoted C, and for
any complex number : we write : C. We can think
of R C.
49
1. INTRODUCTION TO CALCULUS
1.6.1 Arithmetic
Given any two complex numbers :
1
= o + ib, :
2
=
c +io the following denitions hold:
Addition & Subtraction :
1
:
2
= (o c)+i (b o)
Multiplication :
1
:
2
= (oc bo) +i (oo +bc)
Division
:
1
:
2
=
o +ib
c +io
=
(oc +bo) +i (bc oo)
c
2
+o
2
here we have simply multiplied by
c io
c io
and note that
(c +io) (c io) = c
2
+o
2
Examples
:
1
= 1 + 2i, :
2
= 3 i
:
1
+ :
2
= (1 + 3) + i (2 1) = 4 + i ; :
1
+ :
2
=
(1 3) +i (2 (1)) = 2 + 3i
50
1. INTRODUCTION TO CALCULUS
:
1
:
2
= (1.3 2. 1) +i (1. 1 + 2.3) = 5 + 5i
:
1
:
2
=
1 + 2i
3 i
.
3 +i
3 +i
=
1 + 7i
10
1.6.2 Modulus and Argument
Given : = a + ij, the modulus of : denoted [:[ is
dened [:[ = v = +
_
a
2
+j
2
(as given earlier). So
we are using Pythagoras to calculate the length of point
joining the origin to the point : (a, j) . As an example,
consider the complex number : = 3 + 5i, which is
represented in the a j plane (rst quadrant) by
the point (3, 5) . The modulus can be calculated from
[3 + 5i[ =
_
3
2
+ 5
2
, to give v =
_
34.
51
1. INTRODUCTION TO CALCULUS
r
(3, 5)
0
1.6.3 Complex Conjugate
We dene complex conjugate of : by
_
: where
_
: = a ij.
: is the reection of : in the real line. So for example
if : = 1 2i, then : = 1 + 2i
1.
__
:
_
= :
2. (:
1
+:
2
) = :
1
+
_
:
2
3. (:
1
:
2
) =
_
:
1
_
:
2
52
1. INTRODUCTION TO CALCULUS
4. : +
_
: = 2a = 2 Re : =Re : =
: +
_
:
2
5. :
_
: = 2ij = 2i Im: =Im: =
:
_
:
2i
6. :.
_
: = (a +ij) (a ij) = [:[
2
7. [:[
2
= :(:) = :: = [:[
2
=[:[ = [:[
8.
:
1
:
2
=
:
1
:
2
.
:
2
:
2
=
:
1
:
2
[:
2
[
2
9. [:
1
:
2
[
2
= [:
1
[
2
[:
2
[
2
1.6.4 Polar Form:
We return to the polar form representation of complex
numbers. We now introduce a new notation. If : C,
then
: = v (cos 0 +i sin 0) = vc
i0
.
53
1. INTRODUCTION TO CALCULUS
Hence
c
i0
= cos 0 +i sin 0,
which is a special relationship called Eulers Identity.
Knowing sin 0 is an odd function gives c
i0
= cos 0
i sin 0. Referring to the earlier gure, we have:
[:[ = v, arg : = 0
If
:
1
= v
1
c
i0
1
and :
2
= v
2
c
i0
2
then
:
1
:
2
= v
1
v
2
c
i(0
1
+0
2
)
=[:
1
:
2
[ = v
1
v
2
= [:
1
[ [:
2
[
arg (:
1
:
2
) = 0
1
+0
2
= arg (:
1
) + arg (:
2
) .
If :
2
,= 0 then
:
1
:
2
=
v
1
c
i0
1
v
2
c
i0
2
=
v
1
v
2
c
i(0
1
0
2
)
and hence

:
1
:
2

=
[:
1
[
[:
2
[
=
v
1
v
2
arg
_
:
1
:
2
_
= 0
1
0
2
= arg (:
1
) arg (:
2
)
54
1. INTRODUCTION TO CALCULUS
Eulers Formula: Let 0 be any angle, then
exp (i0) = cos 0 +i sin 0.
We can prove this by considering the Taylor series for
exp (a) , sin a, cos a
c
a
= 1 +a +
a
2
2!
+
a
3
3!
+............. +
a
a
a!
(a)
sin a = a
a
3
3!
+
a
5
5!
.............+(1)
a
a
2a+1
(2a + 1)!
(b)
cos a = 1
a
2
2!
+
a
4
4!
............. + (1)
a
a
2a
(2a)!
(c)
Replacing a by the purely imaginary quantity i0 in
(o), we obtain
c
i0
= 1 +i0 +
(i0)
2
2!
+
(i0)
3
3!
+............. +
(i0)
a
a!
=
_
1
0
2
2!
+
0
4
4!

0
6
6!
+............
_
+
i
_
0
0
3
3!
+
0
5
5!
.........
_
= cos 0 +i sin 0
55
1. INTRODUCTION TO CALCULUS
Note: When 0 = then exp i = 1 and 0 = 2
gives exp (i2) = i.
56
1. INTRODUCTION TO CALCULUS
1.7 Functions of Several Variables
A function can depend on more than one variable. For
example, the value of an option depends on the underly-
ing asset price S (for spot or share) and time t. We
can write its value as \ (S, t) .
The value also depends on other parameters such as the
exercise price 1, interest rate v and so on. Although
we could write \ (S, t, 1, v, ...) , it is usually clearer to
leave these other variables out.
Depending on the application, the independent variables
may be a and t for space and time, or two space
variables a and j, or S and t for price and time, and
so on.
57
1. INTRODUCTION TO CALCULUS
1.7.1 Partial Derivatives
Consider a function : = ) (a, j) , which can be thought
of as a surface in a, j, : space. We can think of
a and j as positions on a two dimensional grid (or as
spacial variables) and : as the height of a surface above
the (a, j) grid.
How do we dierentiate a function ) (a, j) of two vari-
ables? What if there are more independent variables?
The partial derivative of ) (a, j) with respect to a is
written
0)
0a
(note 0 and not o ). It is the a derivative of ) with
j held xed:
0)
0a
= lim
ca0
) (a +ca, j) ) (a, j)
ca
.
58
1. INTRODUCTION TO CALCULUS
The other partial derivative, 0)0j, is dened similarly
but now a is held xed:
0)
0j
= lim
cj0
) (a, j +cj) ) (a, j)
cj
.
0)
0a
and
0)
0j
are sometimes written as )
a
and )
j
.
Examples
If
) (a, t) = a +t
2
+ac
t
2
then
0)
0a
= )
a
= 1 + 0 + 1 c
t
2
59
1. INTRODUCTION TO CALCULUS
0)
0t
= )
t
= 0 + 2t +a (2t) c
t
2
.
The convention is, treat the other variable like a constant.
Let : = a
3
j
2
+ sin aj then
:
a
= 3a
2
j
2
+j cos aj, :
j
= 2a
3
j +acos aj
60
1. INTRODUCTION TO CALCULUS
1.7.2 Higher Derivatives
Like ordinary derivatives, these are dened recursively:
0
2
)
0a
2
= )
aa
=
0
0a
_
0)
0a
_
,
0
2
)
0a0j
= )
aj
=
0
0j
_
0)
0a
_
,
0
2
)
0j0a
= )
ja
=
0
0a
_
0)
0j
_
,
and
0
2
)
0j
2
= )
jj
=
0
0j
_
0)
0j
_
.
61
1. INTRODUCTION TO CALCULUS
If ) is well-behaved, the mixed partial derivatives are
equal:
)
aj
= )
ja
.
i.e. the second order derivatives exist and are continuous.
In the previous example we have
:
aa
= 6aj
2
j
2
sin aj, :
jj
= 2a
3
a
2
sin aj,
:
aj
= 6a
2
j + cos aj aj sin aj = :
ja
.
62
1. INTRODUCTION TO CALCULUS
Examples:
With ) (a, t) = a +t
2
+ac
t
2
as above,
)
a
= 1 +c
t
2
so
)
aa
= 0; )
at
= 2tc
t
2
Also
)
t
= 2t 2atc
t
2
so
)
ta
= 2tc
t
2
; )
tt
= 2 2ac
t
2
+ 4at
2
c
t
2
Note that )
at
= )
ta
.
63
2. INTRODUCTION TO LINEAR ALGEBRA
2 Introduction to Linear Algebra
2.1 Properties of Vectors
We consider real adimensional vectors belonging to
the set R
a
. An atuple
= (
1
,
2
, .........,
a
) R
a
is a vector of dimension a. The elements
i
(i = 1, ...., a)
are called components of .
Any pair &, R
a
are equal i the corresponding
components &
i
s and
i
s are equal.
64
2. INTRODUCTION TO LINEAR ALGEBRA
Examples:
&
1
= (1, 0) , &
2
=
_
1, c,
_
3, 6
_
, &
3
= (3, 4) , &
4
=
(, ln 3, 2, 1)
1. &
1
, &
3
R
2
and &
2
, &
4
R
4
2. (a +j, a :, 2: 1) = (3, 2, 5) .For equality
to hold corresponding components are equal, so
a +j = 3
a : = 2
2: 1 = 5
_

_
=a = 1; j = 2; : = 3
65
2. INTRODUCTION TO LINEAR ALGEBRA
2.1.1 Vector Arithmetic
Let &, R
a
. Then vector addition is dened as
& + = (&
1
+
1
, &
2
+
2
, ..........., &
a
+
a
)
If I R is any scalar then
I& = (I&
1
, I&
2
, ..........., I&
a
)
Note: vector addition only holds if the dimensions of
each are identical.
Examples:
& = (3, 1, 2, 0) , = (5, 5, 1, 2) , & = (0, 5, 3, 1)
1. &+ = (3 + 5, 1 5, 2 + 1, 0 + 2) = (8, 4, 1, 2)
2. 2& = (2.0, 2. (5) , 2.3, 2.1) = (0, 10, 6, 2)
3. &+ 2& = (8, 4, 1, 2) (0, 10, 6, 2) =
(8, 6, 7, 0)
66
2. INTRODUCTION TO LINEAR ALGEBRA
1 R
a
is given by (1, 1, ....., 1) .
Similarly 0 = (0, 0, ....., 0) is the zero vector.
Vectors can also be multiplied together using the dot
product . If &, R
a
then the dot product denoted
by &. is
&. = &
1

1
+&
2

2
+............ +&
a

a
R
which is clearly a scalar quantity. The operation is com-
mutative , i.e.
&. = .&
If a pair of vectors have a scalar product which is zero,
they are said to be orthogonal.
Geometrically this means that the two vectors are per-
pendicular to each other.
67
2. INTRODUCTION TO LINEAR ALGEBRA
2.1.2 Concept of Length in R
a
Recall in 2-D & = (a
1
, j
1
)
x
y
x 1
y1

u
The length or magnitude of &, written [&[ is given by
Pythagoras
[&[ =
_
(a
1
)
2
+ (j
1
)
2
and the angle 0 the vector makes with the horizontal is
0 = arctan
j
1
a
1
.
Any vector & can be expressed as
& = [&[

&
68
2. INTRODUCTION TO LINEAR ALGEBRA
where

& is the unit vector because [

&[ = 1.
In 3D (or R
3
) a vector = (a
1
, j
1
, :
1
) has length/magnitude
[[ =
_
(a
1
)
2
+ (j
1
)
2
+ (:
1
)
2
.
69
2. INTRODUCTION TO LINEAR ALGEBRA
2.2 Matrices
A matrix is a rectangular array =
_
o
i )
_
for i =
1, ..., n ; ) = 1, ..., a written
=
_
_
_
_
_
_
_
_
_
_
o
11
o
12
.. .. .. o
1a
o
21
o
22
.. .. .. o
2a
: :
: :
: .. .. .. .. :
o
n1
o
n2
.. .. .. o
na
_
_
_
_
_
_
_
_
_
_
and is an (na) matrix, i.e. n rows and a
columns.
If n = a the matrix is called square. The product
na gives the number of elements in the matrix.
A vector which we have already seen is simply a case of
a (n1) matrix, i.e.
A =
_
_
_
_
_
_
_
_
_
_
a
1
a
2
:
:
:
a
n
_
_
_
_
_
_
_
_
_
_
70
2. INTRODUCTION TO LINEAR ALGEBRA
2.2.1 Matrix Arithmetic
Let , 1
n
R
a
+1 =
_
_
_
_
_
_
_
_
_
_
o
11
o
12
.... o
1a
o
21
o
22
.... o
2a
: : : :
: : : :
: .. .... :
o
n1
o
n2
.... o
na
_
_
_
_
_
_
_
_
_
_
+
_
_
_
_
_
_
_
_
_
_
b
11
b
12
.. .. b
1a
b
21
b
22
.. .. b
2a
: : : : :
: : : : :
: .. .. .. :
b
n1
b
n2
.. .. b
na
_
_
_
_
_
_
_
_
_
_
and the corresponding elements are added to give
_
_
_
_
_
_
_
_
_
_
o
11
+b
11
o
12
+b
12
.... o
1a
+b
1a
o
21
+b
21
o
22
+ +b
22
.... o
2a
+b
2a
: : : :
: : : :
: .. .... :
o
n1
+b
n1
o
n2
+b
n2
.... o
na
+b
na
_
_
_
_
_
_
_
_
_
_
= 1+
71
2. INTRODUCTION TO LINEAR ALGEBRA
Matrices can only added if they are of the same form.
Examples:
=
_
1 1 2
0 3 4
_
, 1 =
_
4 0 3
1 2 3
_
,
C =
_
_
_
2 3 1
5 1 2
1 0 3
_
_
_, 1 =
_
_
_
1 0 0
0 1 0
0 0 1
_
_
_
+1 =
_
5 1 1
1 1 7
_
; C+1 =
_
_
_
3 3 1
5 0 2
1 0 4
_
_
_
We cannot perform any other combination of addition as
and 1 are (2 3) and C and 1 are (3 3) .
72
2. INTRODUCTION TO LINEAR ALGEBRA
2.2.2 Matrix Multiplication
To multiply two square matrices A and B, so that
C = AB, the elements of C are found from the recipe
C
i)
=
.

I=1

iI
1
I)
.
That is, the i th row of A is dotted with the ) th
column of B. For example,
_
o b
c o
__
c )
j I
_
=
_
oc +bj o) +bI
cc +oj c) +oI
_
.
Note that in general AB ,= BA. The general rule for
multiplication is

ja
1
an
C
jn
73
2. INTRODUCTION TO LINEAR ALGEBRA
Example:
_
2 1 0
2 0 2
_
_
_
_
1 2
0 3
1 2
_
_
_
=
_
2.1 + 1.0 + 0.1 2.2 + 1.3 + 0.2
2.1 + 0.0 + 2.1 2.2 + 0.3 + 2.2
_
=
_
2 7
4 8
_
74
2. INTRODUCTION TO LINEAR ALGEBRA
2.2.3 Transpose
The transpose of a matrix with entries
i)
is the
matrix with entries
)i
; the entries are reected across
the leading diagonal, i.e. rows become columns. The
transpose of A is written A
T
. If A = A
T
then A
is symmetric. For example, of the matrices
A =
_
1 2
3 4
_
, B =
_
1 3
2 4
_
, C =
_
1 2
2 1
_
,
we have B = A
T
and C = C
T
. Note that for any
matrix A and 1
(i) (A+1)
T
= A
T
+1
T
(ii)
_
A
T
_
T
= A
(iii) (I)
T
= I
T
, I is a scalar
75
2. INTRODUCTION TO LINEAR ALGEBRA
(iv) (1)
T
= 1
T

T
Example:
=
_
_
_
2 1
1 2
2 2
_
_
_
T
=
_
2 1 2
1 2 2
_
76
2. INTRODUCTION TO LINEAR ALGEBRA
2.2.4 Matrix Representation of Linear Equations
We begin by considering a two-by-two set of equations
for the unknowns a and j :
oa +bj = j
ca +oj = q
The solution is easily found. To get a, multiply the
rst equation by o, the second by b, and subtract to
eliminate j :
(oo bc) a = oj bq.
Then nd j :
(oo bc) j = oq cj.
77
2. INTRODUCTION TO LINEAR ALGEBRA
This works and gives a unique solution as long as oo
bc ,= 0.
If oobc = 0, the situation is more complicated: there
may be no solution at all, or there may be many.
Examples:
Here is a system with a unique solution:
a j = 0
a +j = 2
The solution is a = j = 1.
Now try
a j = 0
2a 2j = 2
Obviously there is no solution: from the rst equation
a = j, and putting this into the second gives 0 = 2.
Here oo bc = 1 (2) (1) 2 = 0.
78
2. INTRODUCTION TO LINEAR ALGEBRA
Also note what is being said:
a = j
a = 1 +j
_
Impossible.
Lastly try
a j = 1
2a 2j = 2.
The second equation is twice the rst so gives no new
information. Any a and j satisfying the rst equation
satisfy the second. This system has many solutions.
Note: If we have one equation for two unknowns the sys-
tem is undetermined and has many solutions. If we have
three equations for two unknowns, it is over-determined
and in general has no solutions at all.
Then the general (2 2) system is written
79
2. INTRODUCTION TO LINEAR ALGEBRA
_
o b
c o
__
a
j
_
=
_
j
q
_
or
Ax = p.
The equations can be solved if the matrix A is invert-
ible. This is the same as saying that its determinant

o b
c o

= oo bc
is not zero.
These concepts generalise to systems of . equations in
. unknowns. Now the matrix A is . . and the
vectors x and p have . entries.
80
2. INTRODUCTION TO LINEAR ALGEBRA
Here are two special forms for A. One is the identity
matrix, which has its own inverse
I =
_
_
_
_
_
_
_
_
1 0 0 . . . 0
0 1 0 . . .
0 0 1 . . .
.
.
.
.
.
.
.
.
. 0
0 . . . 0 1
_
_
_
_
_
_
_
_
.
and for any x, Ix = x. The other is the tridiago-
nal form. This is common in nite dierence numerical
schemes.
=
_
_
_
_
_
_
_
_
_
_
+ + 0 0
+
.
.
.
.
.
.
.
.
.
.
.
.
0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 0
.
.
.
.
.
.
.
.
.
.
.
. +
0 0 + +
_
_
_
_
_
_
_
_
_
_
81
2. INTRODUCTION TO LINEAR ALGEBRA
There is a main diagonal, and one above called the super
diagonal and one below called the sub-diagonal.
A symmetric matrix has the property
A
T
=
_
o
i)
_
=
_
o
)i
_
so the leading diagonal acts as a "mirror". Clearly a
symmetric matrix is square. For example
_
_
_
_
_
c o b c
o o o c
b o )
c c ) c
_
_
_
_
_
is symmetric.
82
2. INTRODUCTION TO LINEAR ALGEBRA
To conclude:
System of Linear Equations
Inconsistent Consistent Consistent
No Solution
Unique Solution Many Solutions
n E >
n E =
variable free
n E <
where 1 = number of equations and a = unknowns.
The theory and numerical analysis of linear systems ac-
counts for quite a large branch of mathematics.
83
2. INTRODUCTION TO LINEAR ALGEBRA
2.3 Using Matrix Notation For Solving Lin-
ear Systems
The usual notation for systems of linear equations is that
of matrices and vectors. Consider the system
oa +bj +c: = j (+)
oa +cj +): = q
ja +Ij +i: = v
for the unknown variables a, j, :. We gather the
unknowns a, j and : and the given j , q and v
into vectors:
_
_
_
a
j
:
_
_
_,
_
_
_
j
q
v
_
_
_
and put the coecients into a matrix
84
2. INTRODUCTION TO LINEAR ALGEBRA
=
_
_
_
o b c
o c )
j I i
_
_
_.
is called the coecient matrix of the linear system
(+) and the special matrix formed by
_
_
_
o b c
o c )
j I i

j
q
v
_
_
_
is called the augmented matrix.
85
2. INTRODUCTION TO LINEAR ALGEBRA
Now consider a general linear system consisting of n
equations in a unknowns which can be written in aug-
mented form as
_
_
_
_
_
_
_
_
_
_
o
11
o
12
.. .. .. o
1a
o
21
o
22
.. .. .. o
2a
: :
: :
: .. .. .. .. :
o
n1
o
n2
o
na

b
1
b
2
:
:
:
b
n
_
_
_
_
_
_
_
_
_
_
.
We can perform a series of row operations on this matrix
and reduce it to a simplied matrix of the form
_
_
_
_
_
_
_
_
_
_
o
11
o
12
.. .. .. o
1a
0 o
22
.. .. .. o
2a
0 0 :
0 0 0 :
: .. .. .. .. :
0 0 0 o
na

b
1
b
2
:
:
:
b
n
_
_
_
_
_
_
_
_
_
_
.
Such a matrix is said to be of echelon form if the number
of zeros preceding the rst nonzero entry of each row
increases row by row.
86
2. INTRODUCTION TO LINEAR ALGEBRA
A matrix is said to be row equivalent to a matrix
1, written 1 if 1 can be obtained from
from a nite sequence of operations called elementary
row operations of the form:
[ER
1
]: Interchange the i
th
and )
th
rows: 1
i
1
)
[ER
2
]:Replace the i
th
row by itself multiplied by a
nonzero constant I : 1
i
I1
i
[ER
3
]:Replace the i
th
row by itself plus I times the
)
th
row: 1
i
1
i
+I1
)
These have no aect on the solution of the of the linear
system which gives the augmented matrix.
87
2. INTRODUCTION TO LINEAR ALGEBRA
Examples:
Solve the following linear systems
1.
2a +j 2: = 10
3a + 2j + 2: = 1
5a + 4j + 3: = 4
_

_
= a = b with
=
_
_
_
2 1 2
3 2 2
5 4 3
_
_
_ and b =
_
_
_
10
1
4
_
_
_
The augmented matrix for this system is
_
_
_
2 1 2
3 2 2
5 4 3

10
1
4
_
_
_
1
2
21
2
31
1

1
3
21
3
51
1
_
_
_
2 1 2
0 1 10
0 3 16

10
28
42
_
_
_
1
3
1
3
31
2

1
1
1
1
1
2
_
_
_
2 0 12
0 1 10
0 0 14

38
28
42
_
_
_
14: = 42 : = 3
j + 10: = 28 j = 28 + 30 = 2
a 6: = 19 a = 19 18 = 1
88
2. INTRODUCTION TO LINEAR ALGEBRA
Therefore solution is unique with
a =
_
_
_
1
2
3
_
_
_
89
2. INTRODUCTION TO LINEAR ALGEBRA
2.
a + 2j 3: = 6
2a j + 4: = 2
4a + 3j 2: = 14
_

_
_
_
_
1 2 3
2 1 4
4 3 2

6
2
14
_
_
_
1
2
1
2
21
1

1
3
1
3
41
1
_
_
_
1 2 3
0 5 10
0 5 10

6
10
10
_
_
_
1
3
1
3
1
2

1
2
0.51
2
_
_
_
1 2 3
0 1 2
0 0 0

6
2
0
_
_
_
Number of equations is less than number of un-
knowns.
j 2: = 2 so : = o is a free variable= j =
2 (1 +o)
a + 2j 3: = 6 a = 6 2j + 3: = 2 o
=a = 2 o; j = 2 (1 +o) ; : = o
90
2. INTRODUCTION TO LINEAR ALGEBRA
Therefore there are many solutions
a =
_
_
_
2 o
2 (1 +o)
o
_
_
_
91
2. INTRODUCTION TO LINEAR ALGEBRA
3.
a + 2j 3: = 1
3a j + 2: = 7
5a + 3j 4: = 2
_

_
_
_
_
1 2 3
3 1 2
5 3 4

1
7
2
_
_
_
1
2
1
2
31
1

1
3
1
3
51
1
_
_
_
1 2 3
0 7 11
0 7 11

1
10
7
_
_
_
1
3
1
3
1
2

_
_
_
1 2 3
0 7 11
0 0 0

1
10
3
_
_
_
The last line reads 0 = 3. Also middle itera-
tion shows that the second and third equations are
inconsistent.
Hence no solution exists.
92
2. INTRODUCTION TO LINEAR ALGEBRA
2.4 Matrix Inverse
The inverse of a matrix A, written A
1
, satises
AA
1
= A
1
A = I.
It may not always exist, but if it does, the solution of the
system
Ax = p
is
x = A
1
p.
93
2. INTRODUCTION TO LINEAR ALGEBRA
The inverse of the matrix for the special case of a 2 2
matrix
_
o b
c o
_
is
1
oo bc
_
o b
c o
_
provided that oo bc ,= 0.
The inverse of any a a matrix is dened as

1
=
1
[[
adj
where adj =
_
(1)
i+j

A
ij

_
T
is the adjoint, i.e. we
form the matrix of s cofactors and transpose it.
94
2. INTRODUCTION TO LINEAR ALGEBRA
A
ij
is the square sub-matrix obtained by "covering the
i
th
row and j
th
column", and is called the Minor of the
element o
ij
. The term
ij
= (1)
i+j

A
ij

is then
called the cofactor of o
ij
.
Consider the following example with
=
_
_
_
1 1 0
1 2 1
0 1 3
_
_
_
So the determinant is given by [[ =
(1)
1+1

11
[A
11
[+(1)
1+2

12
[A
12
[+(1)
1+3

13
[A
13
[
= 1

2 1
1 3

1 1
0 3

+ 0

1 2
0 1

= (2 3 1 1) (1 3 1 0) + 0 = 5 3
= 2
Here we have expanded about the 1
st
row - we can do
this about any row. If we expand about the 2
nd
row - we
should still get [[ = 2.
95
2. INTRODUCTION TO LINEAR ALGEBRA
We now calculate the adjoint:
(1)
1+1
A
11
= +

2 1
1 3

(1)
1+2
A
12
=

1 1
0 3

(1)
1+3
A
13
= +

1 2
0 1

(1)
2+1
A
21
=

1 0
1 3

(1)
2+2
A
22
= +

1 0
0 3

(1)
2+3
A
23
=

1 1
0 1

(1)
3+1
A
31
= +

1 0
2 1

(1)
3+2
A
32
=

1 0
1 1

(1)
3+3
A
33
= +

1 1
1 2

adj =
_
_
_
5 3 1
3 3 1
1 1 1
_
_
_
T
96
2. INTRODUCTION TO LINEAR ALGEBRA
We can now write the inverse of (which is symmetric)

1
=
1
2
_
_
_
5 3 1
3 3 1
1 1 1
_
_
_
Elementary row operations (as mentioned above) can be
used to simplify a determinant, as increased numbers of
zero entries present, requires less calculation. There are
two important points, however. Suppose the value of the
determinant is [[ , then:
[ER
1
]: 1
i
1
)
=[[ [[
[ER
2
]: 1
i
I1
i
=[[ I [[
[ER
3
]: Leaves [[ unchanged
97
3. INTRODUCTION TO PROBABILITY
3 Introduction to Probability
3.1 Preliminaries
A set of all possible outcomes of some given experi-
ment is called the sample space.
A particular outcome . is called a sample point,
or sample path for a stochastic process.
An event is a set of outcomes, i.e. .
Example
Experiment: A dice is rolled and the number appear-
ing on top is observed. The sample space consists
of the 6 possible numbers:
= 1, 2, 3, 4, 5, 6
If the number 4 appears then . = 4 is a sample point,
clearly 4 .
98
3. INTRODUCTION TO PROBABILITY
Let
1
,
2
,
3
= events that an even, odd, prime num-
ber occurs respectively.
So

1
= 2, 4, 6 ,
2
= 1, 3, 5 ,
3
= 2, 3, 5

1
'
3
= 2, 3, 4, 5, 6 event that an even or
prime number occurs.

2

3
= 3, 5 event that odd and prime number
occurs.

c
3
= 1, 4, 6 event that prime number does not
occur (complement of event).
99
3. INTRODUCTION TO PROBABILITY
3.1.1 Random Variables
Outcomes of experiments are not always numbers, e.g. 2
heads appearing; picking an ace from a deck of cards. We
need some way of assigning real numbers to each random
event. Random variables assign numbers to events.
Thus a random variable (RV) A is a function which maps
from the sample space to the set of real numbers
A : . R,
i.e. it associates a number A (.) with each outcome ..
Consider the example of tossing a coin and suppose we
are paid 1 for each head and we lose 1 each time a
tail appears. We know that P(H) = P(T) =
1
2
. So now
we can assign the following outcomes
P(1) =
1
2
P(1) =
1
2
100
3. INTRODUCTION TO PROBABILITY
Mathematically, if our random variable is A, then
A =
_
+1 if H
1 if T
or using the notation above A : . H,T 1, 1 .
The probability that the RV takes on each possible value
is called the probability distribution.
If A is a RV then
P(A = o) = P(. : A (.) = o)
is the probability that o occurs (or A maps onto o).
1 (o A b) = probability that A lies in the interval
[o, b] =
P(. : o A (.) b)
A :
Domain
R
Range (nite)
A () = a
1
, ...., a
a
= a
i

1ia
101
3. INTRODUCTION TO PROBABILITY
P[a
i
] = P[A = a
i
] = ) (a
i
) V i.
So the earlier coin tossing example gives
P(A = 1) =
1
2
; P(A = 1) =
1
2
) (a
i
) is the probability distribution of A.
This is called a discrete probability distribution.
a
i
a
1
a
2
............ a
a
) (a
i
) ) (a
1
) ) (a
2
) ............ ) (a
a
)
There are two properties of the distribution ) (a
i
)
(i) ) (a
i
) 0 V i [1, a]
(ii)
a

i=1
) (a
i
) = 1, i.e. sum of all probabilities is one.
102
3. INTRODUCTION TO PROBABILITY
3.1.2 Mean/Expectation
The mean j measures the centre (average) of the dis-
tribution
j = E[A] =
a

i=1
a
i
) (a
i
)
= a
1
) (a
1
) +a
2
) (a
2
) +..... +a
a
) (a
a
)
which is equal to the weighted average of all possible
values of A together with associated probabilities.
This is also called the rst moment.
Example:
a
i
2 3 8
) (a
i
)
1
4
1
2
1
4
j = E[A] =
3

i=1
a
i
) (a
i
) = 2
_
1
4
_
+ 3
_
1
2
_
+ 8
_
1
4
_
= 4
103
3. INTRODUCTION TO PROBABILITY
3.1.3 Variance/Standard Deviation
This measures the spread (dispersion) of A about the
mean.
Variance V[A] =
E
_
(A j)
2
_
= E
_
A
2
_
j
2
=
a

i=1
a
2
i
) (a
i
)j
2
= o
2
E
_
(A j)
2
_
is also called the second moment about
the mean.
From the previous example we have j = 4, therefore
V[A] =
_
2
2
_
1
4
_
+ 3
2
_
1
2
_
+ 8
2
_
1
4
__
16
= 5.5 = o
2
o = 2.34
104
3. INTRODUCTION TO PROBABILITY
3.1.4 Rules for Manipulating Expectations
Suppose A, Y are random variables and c, o, A R
are constant scalar quantities. Then
E[AA] = AE[A]
E[A +Y ] = E[A] +E[Y ] , (linearity)
V[cA +o] = c
2
V[A]
E[AY ] = E[A] E[Y ] ,
V[A +Y ] = V[A] +V[Y ]
The last two are provided A, Y are independent.
105
3. INTRODUCTION TO PROBABILITY
3.1.5 Continuous Random Variables
As the number of discrete events becomes very large,
individual probabilities ) (a
i
) 0. Now look at the
continuous case.
Instead of ) (a
i
) we now have j (a) which is a con-
tinuous distribution called as probability density function,
PDF.
1 (o A b) =
_
b
o
j (a) oa
The cumulative distribution function 1 (a) of a RV A
is
1 (a) = 1 (A a) =
_
a
o
j (a) oa
1 (a) is related to the PDF by
j (a) =
o1
oa
(fundamental theorem of calculus) provided 1 (a) is
dierentiable. However unlike 1 (a) , j (a) may have
singularities (and may be unbounded).
106
3. INTRODUCTION TO PROBABILITY
3.1.6 Special Expectations:
Given any PDF j (a) of A.
Mean j = E[A] =
_
R
aj (a) oa.
Variance o
2
= V[A] = E
_
(A j)
2
_
=
_
R
a
2
j (a) oa
j
2
(2
nd
moment about the mean).
The a
th
moment about zero is dened as
j
a
= E[A
a
]
=
_
R
a
a
j (a) oa.
107
3. INTRODUCTION TO PROBABILITY
In general, for any function I
E[I(A)] =
_
R
I(a) j (a) oa.
where A is a RV following the distribution given by
j (a) .
Moments about the mean are given by
E[(A j)
a
] ; a = 2, 3, ...
The special case a = 2 gives the variance o
2
.
108
3. INTRODUCTION TO PROBABILITY
3.1.7 Skewness and Kurtosis
Having looked at the variance as being the second mo-
ment about the mean, we now discuss two further mo-
ments centred about j, that provide further important
information about the probability distribution.
Skewness is a measure of the asymmetry of a distribution
(i.e. lack of symmetry) about its mean. A distribution
that is identical to the left and right about a centre point
is symmetric.
The third central moment, i.e. third moment about the
mean scaled with o
3
E
_
(A j)
3
_
o
3
is called the skew and is a measure of the skewness (a
non-symmetric distribution is called skewed).
Any distribution which is symmetric about the mean has
a skew of zero.
109
3. INTRODUCTION TO PROBABILITY
Negative values for the skewness indicate data that are
skewed left and positive values for the skewness indicate
data that are skewed right.
By skewed left, we mean that the left tail is long relative
to the right tail. Similarly, skewed right means that the
right tail is long relative to the left tail.
The fourth centred moment scaled by the variance, called
the kurtosis is dened
E
_
(A j)
4
_
o
4
.
This is a measure of how much of the distribution is out
in the tails at large negative and positive values of A.
110
3. INTRODUCTION TO PROBABILITY
3.2 Normal Distribution
The normal (or Gaussian) distribution .
_
j, o
2
_
with
mean and standard deviation j and o
2
in turn is dened
in terms of its density function
j (a) =
1
o
_
2
exp
_

(a j)
2
2o
2
_
.
For the special case j = 0 and o = 1 it is called the
standard normal distribution . (0, 1) .
This is also veried by making the substitution
=
a j
o
in j (a) which gives
() =
1
_
2
exp
_

1
2

2
_
and clearly has zero mean and unit variance:
111
3. INTRODUCTION TO PROBABILITY
E
_
A j
o
_
=
1
o
E[A j] = 0,
V
_
A j
o
_
= V
_
A
o

j
o
_
Now V[cA +o] = c
2
V[A] (standard result), hence
1
o
2
V[A] =
1
o
2
.o
2
= 1
Its cumulative distribution function is
1 (a) =
1
_
2
_
a
o
c

1
2

2
o = 1 (o A a) .
The skewness of . (0, 1) is zero and its kurtosis is 3.
112
3. INTRODUCTION TO PROBABILITY
3.3 Correlation
The covariance is useful in studying the statsitical depen-
dence between two random. If A, Y are RVs, then their
covariance is dened as:
Cov (A, Y ) = E
_

_
_
_
_A E(A)
. .
=j
a
_
_
_
_
_
_Y E(Y )
. .
=j
j
_
_
_
_

_
= E[AY ] j
a
j
j
which we denote as o
AY
. Note:
Cov (A, A) = E
_
(A j
a
)
2
_
= o
2
.
A, Y are correlated if
E
_
(A j
a
)
_
Y j
j
__
,= 0.
We can then dene an important dimensionless quantity
(used in nance) called the correlation coecient and
denoted as j
AY
(A, Y ) where
j
AY
=
Cov (A, Y )
o
a
o
j
.
113
3. INTRODUCTION TO PROBABILITY
The correlation can be thought of as a normalised covari-
ance, as [j
AY
[ 1, for which the following conditions
are properties:
i. j (A, Y ) = j (Y, A)
ii. j (A, A) = 1
iii. 1 j 1
j
AY
= 1 = perfect negative correlation
j
AY
= 1 =perfect correlation
j
AY
= 0 =A, Y uncorrelated
114
4. DIFFERENTIAL EQUATIONS
4 Dierential Equations
4.1 Introduction
2 Types of Dierential Equation (D.E)
(i) Ordinary Dierential Equation (O.D.E)
Equation involving (ordinary) derivatives
a, j,
oj
oa
,
o
2
j
oa
2
, ........,
o
a
j
oa
a
(some xed a)
j is some unknown function of a together with its deriv-
atives, i.e.
1
_
a, j, j
t
, j
tt
, ......, j
(a)
_
= 0 (1)
115
4. DIFFERENTIAL EQUATIONS
Note j
4
,= j
(4)
Also if j = j (t), where t is time, then we often write

j =
oj
ot
,

j =
o
2
j
ot
2
, ......,

j =
o
4
j
ot
4
116
4. DIFFERENTIAL EQUATIONS
(ii) Partial Dierential Equation (PDE)
Involve partial derivatives, i.e. unknown function depen-
dent on two or more variables,
e.g.
0&
0t
+
0
2
&
0a0j
+
0&
0:
& = 0
More complicated to solve - better for modelling real-life
situations, e.g. nance, engineering & science.
117
4. DIFFERENTIAL EQUATIONS
Order of the highest derivative is the order of the DE
An ode is of degree v if
o
a
j
oa
a
(where a is the order of
the derivative) appears with power v
_
vcZ
+
_
the denition of a and v is distinct. Assume
that any ode has the property that each
o

j
oa

appears in the form


_
o

j
oa

_
v

_
o
a
j
oa
a
_
v
order a
and degree v.
Examples:
DE order degree
(1) j
t
= 3j 1 1
(2)
_
j
t
_
3
+ 4 sin j = a
3
1 3
(3)
_
j
(4)
_
2
+a
2
_
j
(2)
_
5
+
_
j
t
_
6
+j = 0 4 2
(4) j
tt
=
_
j
t
+j +a 2 2
(5) j
tt
+a
_
j
t
_
3
aj = 0 2 1
Note - example (4) above can be written as
_
j
tt
_
2
=
j
t
+j +a
118
4. DIFFERENTIAL EQUATIONS
We will consider ODEs of degree one, and of the form
o
a
(a)
o
a
j
oa
a
+o
a1
(a)
o
a1
j
oa
a1
+....+o
1
(a)
oj
oa
+o
0
(a) j = j(a)
=
a

i=0
o
i
(a) j
(i)
(a) = j (a) (more pedantic)
Note: j
(0)
(a) - zeroth derivative, i.e. j(a).
This is a Linear ODE of order a, i.e. v = 1 V (for
all) terms. Linear also because o
i
(a) not a function of
j
(i)
(a) - else equation is Non-linear.
119
4. DIFFERENTIAL EQUATIONS
Examples:
DE Nature of DE
(1) 2aj
tt
+a
2
j
t
(sin a) j = a
2
Linear
(2) jj
tt
+aj
t
+j = 2 o
2
= j = Non-Linear
(3) j
tt
+
_
j
t
+j = a
2
Non-Linear *
_
j
t
_
1
2
(4)
o
4
j
oa
4
+j
4
= 0 Non-Linear - j
4
120
4. DIFFERENTIAL EQUATIONS
4.2 First Order Ordinary Dierential Equa-
tions
Standard form for a rst order DE (in the unknown func-
tion j (a)) is
j
t
= ) (a, j) (2)
so given a 1
st
order ode
1
_
a, j, j
t
_
= 0
can often be rearranged in the form (2), e.g.
aj
t
+ 2aj j = 0 = j
t
=
j 2a
a
121
4. DIFFERENTIAL EQUATIONS
4.2.1 Variable Separable
j
t
= j (a) I(j) (3)
So ) (a, j) = j (a) I(j) where j and I are functions of
a only and j only in turn. So
oj
oa
= j (a) I(j)
_
oj
I(j)
=
_
j (a) oa +c
c arbitrary constant
Examples:
1.
oj
oa
=
a
2
+ 2
j
_
j oj =
_
_
a
2
+ 2
_
oa
j
2
2
=
a
3
3
+ 2a +c
122
4. DIFFERENTIAL EQUATIONS
2.
oj
oa
= j ln a subject to j = 1 at a = c ( j (c) = 1)
_
oj
j
=
_
ln a oa Recall:
_
ln a oa = a(ln a 1)
ln j = a(ln a 1) +c j = exp (aln a a)
arb. constant
now putting a = c, j = 1 gives = 1. So solution
becomes
j = exp (ln a
a
) exp (a) j =
a
a
c
a
=j =
_
a
c
_
a
123
4. DIFFERENTIAL EQUATIONS
4.2.2 Linear Equations
These are equations of the form
j
t
+1 (a) j = Q(a) (4)
which are similar to (3), but the presence of Q(a) renders
this no longer separable. We look for a function 1(a),
called an Integrating Factor (I.F) so that
1(a)j
t
+1(a)1 (a) j =
o
oa
(1(a)j) (5)
So upon multiplying the lhs of (4), it becomes a derivative
of 1(a)j, i.e.
1j
t
+11j = 1j
t
+1
t
j
from (4).
124
4. DIFFERENTIAL EQUATIONS
This gives 11j = 1
t
j = 1(a)1 (a) =
o1
oa
, which is
a DE for 1 which is separable, hence
_
o1
1
=
_
1oa +c ln 1 =
_
1oa +c
125
4. DIFFERENTIAL EQUATIONS
So 1(a) = 1 exp (
_
1 oa), hence there exists a func-
tion 1(a) with the required property.
Multiply (4) through by 1(a)
1(a)
_
j
t
+1(a)j
_
. .
=
o
oa
(1(a)j)
= 1(a)Q(a)
o
oa
(1j) = 1(a)Q(a) 1(a)j =
_
1(a)Q(a)oa+1
1 arb. constant.
We also know the form of 1(a)
j1 exp
__
1 oa
_
=
_
1 exp
__
1 oa
_
Q(a)oa +1
126
4. DIFFERENTIAL EQUATIONS
divide through by 1 to give
j exp
__
1 oa
_
=
_
exp
__
1 oa
_
Q(a)oa+ constant.
So we can take 1 = 1 in the expression for 1(a).
To solve j
t
+1 (a) j = Q(a) calculate
1(a) = exp (
_
1 oa)
,
which is the I.F
Examples:
1. Solve aj
t
j = a
3
This is currently not in standard form. However, dividing
through by a gives
j
t

1
a
j = a
2
Now comparing with (4) gives 1(a) =
1
a
& Q(a) =
a
2
, therefore
127
4. DIFFERENTIAL EQUATIONS
I.F 1(a) = exp
_
_

1
a
oa
_
= exp (ln a) =
1
a
.
Multiply DE by
1
a

1
a
_
j
t

1
a
j
_
= a =
o
oa
_
j
a
_
= a
_
o
_
a
1
j
_
=
_
aoa +c
=
j
a
=
a
2
2
+c ) GS is j =
a
3
2
+ca
128
4. DIFFERENTIAL EQUATIONS
2. Obtain the general solution of (1 +jc
a
)
oa
oj
= c
a
oj
oa
= (1 +jc
a
) c
a
= c
a
+j =
oj
oa
j = c
a
Which is a linear equation, with 1 = 1; Q = c
a
I.F 1(j) = exp
__
oa
_
= c
a
so multiplying DE by I.F
c
a
_
j
t
j
_
= c
2a

o
oa
_
jc
a
_
= c
2a
=
_
o
_
jc
a
_
=
_
c
2a
oa
129
4. DIFFERENTIAL EQUATIONS
jc
a
=
1
2
c
2a
+c
) j = cc
a

1
2
c
a
is the GS
130
4. DIFFERENTIAL EQUATIONS
4.3 Second Order ODEs
Typical second order ODE (degree 1) is
j
tt
= )
_
a, j, j
t
_
solution involves two arbitrary constants.
4.3.1 Simplest Cases
A j
t
, j missing, so j
tt
= ) (a)
Integrate wrt a (twice): j =
_
(
_
) (a) oa) oa
Example: j
tt
= 4a
GS j =
_ __
4a oa
_
oa =
_
_
2a
2
+C
_
oa =
2a
3
3
+Ca+1
131
4. DIFFERENTIAL EQUATIONS
B j missing, so j
tt
= )
_
j
t
, a
_
Put 1 = j
t
j
tt
=
o1
oa
= ) (1, a), i.e. 1
t
=
) (1, a) - rst order ode
Solve once 1(a)
Solve again j(a)
Example: Solve a
o
2
j
oa
2
+ 2
oj
oa
= a
3
Note: A is a special case of B
C j
t
and a missing, so j
tt
= ) (j)
Put j = j
t
, then
o
2
j
oa
2
=
oj
oa
=
oj
oj
oj
oa
= j
oj
oj
= ) (j)
132
4. DIFFERENTIAL EQUATIONS
So solve 1st order ode
j
oj
oj
= ) (j)
which is separable, so
_
j oj =
_
) ( j) oj
1
2
j
2
=
_
) (j) oj + const.
Example: Solve j
3
j
tt
= 4
=j
tt
=
4
j
3
. Put j = j
t

o
2
j
oa
2
= j
oj
oj
=
4
j
3
)
_
j oj =
_
4
j
3
oj = j
2
=
4
j
2
+ 1 ) j =

_
1j
2
4
j
, so from our denition of j,
133
4. DIFFERENTIAL EQUATIONS
oj
oa
=

_
1j
2
4
j
=
_
oa =
_
j
_
1j
2
4
oj
Integrate rhs by substitution (i.e. & = 1j
2
4) to give
a =

_
1j
2
4
1
+1
_
1(a 1)
2
_
= 1j
2
4
) GS is 1j
2
1
2
(a 1)
2
= 4
D a missing: j
tt
= )
_
j
t
, j
_
Put 1 = j
t
, so
o
2
j
oa
2
= 1
o1
oj
= ) (1, j) - 1
st
order
ODE
134
4. DIFFERENTIAL EQUATIONS
4.3.2 Linear ODEs with Constant Coecients
We will look at equations of the form:
1(j) = o
o
2
j
oa
2
+b
oj
oa
+cj = 0 o, b, c R
where
1 = o
o
2
oa
2
+b
o
oa
+c.
Try a solution of the form j = exp (Aa)
_
o1
2
+b1 +c
_
c
Aa
= 0
hence oA
2
+bA+c = 0 and so A is a root of the quadratic
equation
oA
2
+bA+c = 0 AUXILLIARY EQUATION (A.E)
135
4. DIFFERENTIAL EQUATIONS
There are three cases to consider:
(1) b
2
4oc 0
So A
1
,= A
2
R, so GS is
j = c
1
exp (A
1
a) +c
2
exp (A
2
a)
c
1
, c
2
arb. const.
(2) b
2
4oc = 0
So A = A
1
= A
2
=
b
2o
Clearly c
Aa
is a solution of 1 j = 0 - but theory tells us
there exist two solutions for a 2
nd
order ode. So now try j = aexp (Aa)
1
_
ac
Aa
_
=
_
o1
2
+b1 +c
_ _
ac
Aa
_
=
_
oA
2
+bA +c
_
. .
=0
_
ac
Aa
_
+ (2oA +b)
. .
=0
_
c
Aa
_
= 0
136
4. DIFFERENTIAL EQUATIONS
This gives a 2
nd
solution ) GS is j = c
1
exp (Aa) +
c
2
aexp (Aa), hence
j = (c
1
+c
2
a) exp (Aa)
(3) b
2
4oc < 0
So A
1
,= A
2
C - Complex conjugate pair A = j iq
where
j =
b
2o
, q =
1
2o
_

b
2
4oc

(,= 0)
Hence
j = c
1
exp (j +iq) a +c
2
exp (j iq) a
= c
1
c
ja
c
iqa
+c
2
c
ja
c
iqa
= c
ja
_
c
1
c
iqa
+c
2
c
iqa
_
Eulers identity gives exp (i0) = cos 0 i sin 0
137
4. DIFFERENTIAL EQUATIONS
Simplifying (using Euler) then gives the GS
j (a) = c
ja
(cos qa +1sin qa)
Examples:
(1) j
tt
3j
t
4j = 0
Put j = c
Aa
to obtain A.E
A.E: A
2
3A 4 = 0 (A 4) (A + 1) = 0 =
A = 4 & 1 - 2 distinct R roots
GS j (a) = c
4a
+1c
a
138
4. DIFFERENTIAL EQUATIONS
(2) j
tt
8j
t
+ 16j = 0
A.E A
2
8A + 16 = 0 (A 4)
2
= 0 =A = 4
, 4 (2 fold root)
go up one, i.e. instead of j = c
Aa
, take j = ac
Aa
GS j (a) = (C +1a) c
4a
(3) j
tt
3j
t
+ 4j = 0
A.E A
2
3A + 4 = 0 A =
3
_
9 16
2
=
3 i
_
7
2
A
1
=
3 +i
_
7
2
, A
2
=
3 i
_
7
2
= j iq
_
j =
3
2
, q =
_
7
2
_
139
4. DIFFERENTIAL EQUATIONS
j = c
3
2
a
_
o cos
_
7
2
a +b sin
_
7
2
a
_
140
4. DIFFERENTIAL EQUATIONS
4.4 Non-Homogeneous Case - Method of
Undetermined Coecients
GS j = C.F + P.I
C.F comes from the roots of the A.E
There are three methods for nding P.I
(a) "Guesswork" - which we are interested in
(b) Annihilator
(c) D-operator Method
(a) Guesswork Method
If the rhs of the ode j (a) is of a certain type, we can
guess the form of P.S. We then try it out and determine
the numerical coecients.
141
4. DIFFERENTIAL EQUATIONS
The method will work when j(a) has the following forms
i. Polynomial in a j (a) = j
0
+j
1
a+j
2
a
2
+.......... +
j
n
a
n
.
ii. An exponential j (a) = Cc
Ia
(Provided I is not
a root of A.E).
iii. Trigonometric terms, j(a) has the form sin oa, cos oa
(Provided io is not a root of A.E).
iv. j (a) is a combination of i. , ii. , iii. provided j (a)
does not contain part of the C.F (in which case use other
methods).
142
4. DIFFERENTIAL EQUATIONS
Examples:
(1) j
tt
+ 3j
t
+ 2j = a
2
GS j = C.F + P.I = j
c
+j
j
C.F: A.E gives
A
2
+3A+2 = 0 =A = 1, 2 ) j
c
= oc
a
+bc
2a
P.I Now j(a) = a
2
,
so try j
j
= j
0
+ j
1
a + j
2
a
2
j
t
j
= j
1
+
2j
2
a j
tt
j
= 2j
2
Now substitute these in to the DE, ie
2j
2
+ 3 (j
1
+ 2j
2
a) + 2
_
j
0
+j
1
a +j
2
a
2
_
= a
2
and
equate coecients of a
a
O
_
a
2
_
: 2j
2
= 1 =j
2
=
1
2
143
4. DIFFERENTIAL EQUATIONS
O(a) : 6j
2
+ 2j
1
= 0 =j
1
=
3
2
O
_
a
0
_
: 2j
2
+ 3j
1
+ 2j
0
= 0 =j
0
=
7
4
) GS j = oc
a
+bc
2a
+
7
4

3
2
a +
1
2
a
2
144
4. DIFFERENTIAL EQUATIONS
(2) j
tt
+ 3j
t
+ 2j = 3c
5a
The homogeneous part is the same as in (1), so j
c
=
c
a
+1c
2a
. For the non-homog. part we note that
j (a) has the form c
Ia
, so try j
j
= Cc
5a
, and I = 5 is
not a solution of the A.E.
Substituting j
j
into the DE gives
C
_
5
2
+ 15 + 2
_
c
5a
= 3c
5a
C =
1
14
) j = c
a
+1c
2a
+
1
14
c
5a
145
4. DIFFERENTIAL EQUATIONS
(3) j
tt
5j
t
6j = cos 3a
A.E: A
2
5A 6 = 0 =A = 1, 6 =j
c
= cc
a
+
oc
6a
Guided by the rhs, i.e. j (a) is a trigonometric term, we
try
j
j
= cos 3a +1sin 3a
j
t
j
= 3sin 3a+31cos 3a j
tt
j
= 9cos 3a
91sin 3a and substitute into DE.
Collecting coecients of sin 3a and cos 3a gives:
O(cos 3a) : 9151 6 = 1
O(sin 3a) : 91 + 1561 = 0
=
1
30
= 1 j
j
=
1
30
(cos 3a + sin 3a), so
general solution becomes
j = cc
a
+oc
6a

1
30
(cos 3a + sin 3a)
146
4. DIFFERENTIAL EQUATIONS
4.4.1 Failure Case
Consider the DE j
tt
5j
t
+ 6j = c
2a
, which has a CF
given by j (a) = cc
2a
+oc
3a
. To nd a
PS, if we try j
j
= c
2a
, we have upon substitution
c
2a
[4 10 + 6] = c
2a
so when I (= 2) is also a solution of the C.F , then
the trial solution j
j
= c
Ia
fails, so we must seek the
existence of an alternative solution.
The methods given should be used in such cases.
Statement
a) 1j = j
tt
+oj
t
+b = cc
Ia
- trial function is normally
j
j
= Cc
Ia
.
147
4. DIFFERENTIAL EQUATIONS
If I is a root of the A.E then 1
_
Cc
Ia
_
= 0 so this
substitution does not work. In this case, we try j
j
=
Cac
Ia
- so go one up.
This works provided I is not a repeated root of the A.E,
if so try j
j
= Ca
2
c
Ia
, and so forth ....
b) 1j = j where j (a) has the form (csin na +o cos na) c
ja
try
j
j
= (c
1
sin na +c
2
cos na) c
ja
provided j +in is not a root of the A.E. If j +in is
a root then go one up so try
j
j
= (c
1
sin na +c
2
cos na) ac
ja
, etc.
c) Finally, if j (a) = j
1
(a) +j
2
(a) +j
3
(a) where
148
4. DIFFERENTIAL EQUATIONS
j
1
(a) =
n

I=0
j
I
a
I
, j
2
(a) = Cc
Ia
,
j
3
(a) = (csin na +o cos na) c
ja
Then try
j
j
= j
j
(a) +

j
j
(a) +

j
j
(a)
where
j
j
(a) = j
0
+j
1
a +j
2
a
2
+.......... +j
n
a
n

j
j
(a) = Cc
Ia

j
j
(a) = (c
1
sin na +c
2
cos na) c
ja
149
4. DIFFERENTIAL EQUATIONS
4.5 Linear ODEs with Variable Coecients
- Euler Equation
In the previous sections we have looked at various second
order DEs with constant coecients. We now introduce
a 2
nd
order equation in which the coecients are variable
in a. An equation of the form
1 j = oa
2
o
2
j
oa
2
+oa
oj
oa
+cj = j (a)
is called a Cauchy-Euler equation. Note the relation-
ship between the coecient and corresponding derivative
term, ie o
a
(a) = oa
a
and
o
a
j
oa
a
, i.e. both power and
order of derivative are a.
The equation is still linear. To solve the homogeneous
part, we look for a solution of the form
j = a
A
150
4. DIFFERENTIAL EQUATIONS
So j
t
= Aa
A1
j
tt
= A(A 1) a
A2
, which upon
substitution yields the quadratic, A.E.
oA
2
+bA +c = 0
[where b = (o o)] which can be solved in the usual
way - there are 3 cases to consider, depending upon the
nature of b
2
4oc.
151
4. DIFFERENTIAL EQUATIONS
Case 1: b
2
4oc 0 A
1
, A
2
R - 2 real
distinct roots
GS j = a
A
1
+1a
A
2
Case 2: b
2
4oc = 0 A = A
1
= A
2
R - 1
real (double fold) root
GS j = a
A
(+1ln a)
Case 3: b
2
4oc < 0 A = cio C - pair of
complex conjugate roots
GS j = a
c
(cos (o ln a) +1sin (o ln a))
Example 1
Solve a
2
j
tt
2aj
t
4j = 0
152
4. DIFFERENTIAL EQUATIONS
Put j = a
A
= j
t
= Aa
A1
= j
tt
= A(A 1) a
A2
and substitute in DE to obtain (upon simplication) the
A.E. A
2
3A 4 = 0 (A 4) (A + 1) = 0
=A = 4 & 1 : 2 distinct R roots. So GS is
j (a) = a
4
+1a
1
Example 2
Solve a
2
j
tt
7aj
t
+ 16j = 0
So assume j = a
A
A.E A
2
8A + 16 = 0 =A = 4 , 4 (2 fold root)
go up one, i.e. instead of j = a
A
, take j = a
A
ln a to
give
j (a) = a
4
(+1ln a)
153
4. DIFFERENTIAL EQUATIONS
Example 3
Solve a
2
j
tt
3aj
t
+ 13j = 0
Assume existence of solution of the form j = a
A
A.E becomes A
2
4A+13 = 0 A =
4
_
16 52
2
=
4 6i
2
A
1
= 2+3i, A
2
= 23i = cio (c = 2, o = 3)
j = a
2
(cos (3 ln a) +1sin (3 ln a))
154
4. DIFFERENTIAL EQUATIONS
4.5.1 Reduction to constant coecient
The Euler equation considered above can be reduced to
the constant coecient problem discussed earlier by use
of a suitable transform. To illustrate this simple technique
we use a specic example.
Solve a
2
j
tt
aj
t
+j = ln a
Use the substitution a = c
t
i.e. t = ln a. We now
rewrite the the equation in terms of the variable t, so
require new expressions for the derivatives (chain rule):
oj
oa
=
oj
ot
ot
oa
=
1
a
oj
ot
o
2
j
oa
2
=
o
oa
_
oj
oa
_
=
o
oa
_
1
a
oj
ot
_
=
1
a
o
oa
oj
ot

1
a
2
oj
ot
=
1
a
ot
oa
o
ot
oj
ot

1
a
2
oj
ot
=
1
a
2
o
2
j
ot
2

1
a
2
oj
ot
155
4. DIFFERENTIAL EQUATIONS
) the Euler equation becomes
a
2
_
1
a
2
o
2
j
ot
2

1
a
2
oj
ot
_
a
_
1
a
oj
ot
_
+j = t
j
tt
(t) 2j
t
(t) +j = t
The solution of the homogeneous part , ie C.F. is j
c
=
c
t
(+1t) .
The particular solution (P.S.) is obtained by using j
j
=
j
0
+j
1
t to give j
j
= 2 +t
The GS of this equation becomes
j (t) = c
t
(+1t) + 2 +t
which is a function of t . The original problem was j =
j (a), so we use our transformation t = ln a to get the
GS
j = a(+1ln a) + 2 + ln a.
156

Вам также может понравиться