Calculus Blank
Calculus Blank
FINANCE
CQF
Calculus
Linear Algebra
Di¤erential Equations
Page 1
1 Introduction to Calculus
Page 2
Natural Numbers N = f0; 1; 2; 3; :::::g
Integers ( N) Z = f0; 1; 2; 3; :::::g
n o
p 1;
Rationals q: p; q 2 Z; Q = 0:76; 2:25; 0:3333333::::
2
np o
Irrationals Q = 2; 0:01001000100001:::; ; e
Reals R all the above
n p o
Complex C = x + iy : i = 1
Page 3
(a; b) = a < x < b open interval
Examples
1 < x<1 ( 1; 1)
1 < x b ( 1; b]
a x<1 [a; 1)
Page 4
1.2 Functions
This is a term we use very loosely, but what is a function? Clearly it is a type of
black box with some input and a corresponding output. As long as the correct
result comes out we usually are not too concerned with what happens ’inside’.
A function denoted f (x) of a single variable x is a rule that assigns each ele-
ment of a set X (written x 2 X ) to exactly one element y of a set Y (y 2 Y ) :
Page 5
30
20
10
0
-4 -3 -2 -1 0 1 2 3 4
-10
-20
-30
Page 6
The set X is called the domain of f and the set Y is called the image (or
range), written Domf and Im f; in turn. For a given value of x there should
be at most one value of y . So the role of a function is to operate on the
domain and map it across uniquely to the range.
Page 7
There are three types of mapping:
p
3. For each x 2 X; 9 more than one y 2 Y; e.g. y = x: This is a many
to one mapping. Clearly it is multivalued, and has two branches. We will
assume that only the positive value is being considered for consistency with
the de…nition of a function. A one to many mapping is not a function.
Page 8
The function maps the domain across to the range. What about a process
which does the reverse? Such an operation is due to the inverse function which
maps the image of the original function to the domain. The function y = f (x)
has inverse x = f 1 (y ) : Interchange of x and y leads to consideration of
y = f 1 (x) :
p
Thus x2 and x are inverse functions and we say they are mutually inverse.
p
Note the inverse x is multivalued unless we de…ne it such that only non-
negative values are considered.
Page 9
i.e. we want y 1: One way this can be done is to write the function above as
x = 2y 2 1
and now rearrange to have y = :::: so
s
x+1
y= :
2
s
1 (x) x+1
Hence y = : Check:
2
0s 12
x + 1A
yy 1 (x) = 2 @ 1 = x = y 1y (x)
2
Page 10
Returning to the earlier example
y = 2 x2 1
clearly Domf = R (clearly) and for
s
1 (x) x+1
y =
2
to exist we require the term inside the square root sign to be non-negative, i.e.
x+1 0 =) x > 1; therefore Domf = f[ 1; 1)g :
2
Page 11
1.2.1 Explicit/Implicit Representation
Page 12
So we see all known and unknown variables are bundled together. An implicit
form which does not give rise to a function is
y 2 + x2 16 = 0:
Page 13
1.2.2 Types of function f (x)
Page 14
k = 1; 2 gives a linear and quadratic in turn. The most general form of
quadratic equation is
ax2 + bx + c = 0:
To solve we can complete the square which gives
b 2 b2 c
x+ 2a 4a2
+ = 0
a
b 2 b2 c b2 4ac
x + 2a = 4a2 = 4a2
p a
b = b2 4ac
x + 2a 2a
and …nally we get the well known formula for x
p
b b2 4ac
x= :
2a
Page 15
b
(2) b2 4ac = 0 ! x = x1 = x2 = 2 R : one two fold root
2a
Page 16
1.2.3 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 x called the modulus function,
written jxj and de…ned as
(
x x>0
y = jxj = ;
x x<0
although most de…nitions included equality in the positive quadrant.
modulus function
3.5
2.5
1.5
0.5
-4 -3 -2 -1 0 1 2 3 4
Page 17
This is an example of a piecewise function.
The name is given because they are functions that comprise of ’pieces’, each
piece of the function de…nition depends on the value of x.
So, for the modulus, the …rst de…nition is used when x is non-negative and the
second if x is negative.
Page 18
1.3 Limits
lim f (x) ! l;
x!x0
Whenever x is close to x0
f (x) is close to l:
Page 19
The limit only exists if
f (x) ! l as x ! x0
f (x) ! l as x ! x+
0
Example 1:
lim x2 + 2x + 3 ! 0 + 0 + 3 ! 3;
x!0
Page 20
Example 2:
x2 + 2x 2
x2 + 2x + 2 x2 x 2 + x2
lim = lim =
x!1 3x2 + 4 x!1 3x2 + 4
x2 x2
1 + x2 + x22 1
lim ! :
x!1 3 + x42 3
Example 3:
x2 9 (x + 3) (x 3)
lim = lim = lim (x + 3) ! 6
x!3 x 3 x!3 (x 3) x!3
Page 21
A function f (x) is continuous at x0 if
That is, ’we can draw its graph without taking the pen o¤ the paper’.
Page 22
1.3.1 The exponential and log functions
The logarithm (or simply log) was introduced to solve equations of the form
ap = N
and we say p is log of N to base a: That is we take logs of both sides (loga)
loga ap = loga N
which gives
p = loga N:
By de…nition loga a = 1 (important).
We will often need the exponential function ex and the (natural) logarithm
loge x or (ln x) :
Page 23
Here
e = 2:718281828 : : : :
which is the approximation to
1 n
lim 1 +
n!1 n
when n is very large. Similarly the exponential function can be approximated
from
x n
lim 1 +
n!1 n
Page 24
Also
1 x:
= e
ex
Here we have used the property (xa)b = xab; which allowed us to write
1 = (ex ) 1 = e x :
ex
8 2
7 1.5
6 1
exp(x) and (exp(-x)
5 0.5
4 0
3 -0.5 0 1 2 3 4 5
2 -1
1 -1.5
0
-2
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2.5
x x
Page 25
Note that ex is always strictly positive. It tends to zero as x becomes very
large and negative, and to in…nity as x becomes large and positive. To get
an idea of how quickly ex grows, note the approximation e5 t 150:
2
Later we will also see e x =2; which is particularly useful in probability: This
function decays particularly rapidly as jxj increases.
Note:
exey = ex+y ; e0 = 1
Page 26
!
x
log = log x log y:
y
Example:
Page 27
1.3.2 Trigonometric/Circular Functions
1.5
0.5
0
-8 -6 -4 -2 0 2 4 6 8
-0.5
-1
-1.5
sin x = 0 () x = n 8n 2 Z
Page 28
Dom (sin x) =R and Im (sin x) = [ 1; 1]
cos x = 0 () x = (2n + 1) 2 8n 2 Z
sin x
tan x =
cos x
Page 29
n o n o
Dom = fx : cos x 6= 0g = x : x 6= (2n + 1) 2 ; n 2 Z = R (2n + 1) 2 ; n 2 Z
Trigonometric Identities:
cos2 x + sin2 x = 1; sin (x y ) = sin x cos y cos x sin y
tan x + tan y
cos (x y ) = cos x cos y sin x sin y ; tan (x + y ) =
1 tan x tan y
Exercise: Verify the following sin x + 2 = cos x; cos 2 x = sin x:
Page 30
More examples on limiting:
sin x
lim sin x ! 0; lim ! 1; lim jxj ! 0
x!0 x!0 x x!0
jxj
What about lim ?
x!0 x
jxj
lim = 1
x!0 x
+
jxj
lim = 1
x!0 x
jxj
therefore does not tend to a limit as x ! 0:
x
Page 31
Hyperbolic Functions
1 x
sinh x = e e x
2
Odd function: sinh ( x) = sinh x
Page 32
1 x
cosh x = e +e x
2
Page 33
sinh x
tanh x =
cosh x
Dom (tanh x) =R; Im (tanh x) = ( 1; 1)
Identities:
cosh2 x sinh2 x = 1
sinh (x + y ) = sinh x cosh y + cosh x sinh y
cosh (x + y ) = cosh x cosh y + sinh x sinh y
Page 34
Inverse Hyperbolic Functions
exp y exp( y)
y = sinh 1 x ! x = sinh y = 2 ;
2x = exp y exp ( y )
multiply both sides by exp y to obtain 2xey = e2y 1 which can be written
as
(ey )2 2x (ey ) 1 = 0:
Page 35
Dom sinh 1 x =R; Im sinh 1x =R
exp y+exp( y)
Similarly y = cosh 1 x ! x = cosh y = 2 ;
(ey )2 2x (ey ) + 1 = 0:
and
q
ey = x + x2 1
Page 36
We take the positive root (not both) to ensure this is a function.
q
cosh 1 x = ln x + x2 1
Page 37
and as before multiply through by ey
x exp 2y + x = exp 2y 1
1+x
exp 2y (1 x) = 1 + x ! exp 2y =
1 x
taking logs gives
1+x 1+x
2y = ln =) tanh 1 x = 12 ln
1 x 1 x
Dom tanh 1x = ( 1; 1) ; Im tanh 1x =R
Page 38
1.4 Di¤erentiation
A basic question asked is how fast does a function f (x) change with x? The
derivative of f (x) ; written
df
: Leibniz notation
dx
or
f 0 (x) : Lagrange notation,
is de…ned for each x as
f (x + x) f (x)
f 0 (x) = lim
x!0 x
assuming the limit exists (it may not) and is unique.
Page 39
f (x+ x) f (x)
The term on the right hand side x is called Newton quotient.
y
We can also de…ne operator notation due to Euler. Write
d
D :
dx
df
Then D operates on a function to produce its derivative, i.e. Df dx :
Page 40
The earlier form of the derivative given is also called a forward derivative.
Other possible de…nitions of the derivative are
1
f 0 (x) = lim (f (x) f (x x)) backward
x!0 x
1
f 0 (x) = lim (f (x + x) f (x x)) centred
x!0 2 x
f (x) = x3
f (x + x) = (x + x)3 = x3 + x3 + 3x x (x + x)
f (x + x) f (x) x3 + 3x x (x + x)
= = x2 + 3x2 + 3x x
x x
! 3x2 as x ! 0;
Page 41
d n d x d ax
x = nxn 1; e = ex; e = aeax;
dx dx dx
d 1 d d d
log x = ; cos x = sin x; sin x = cos x; tan x = sec2 x
dx x dx dx dx
and so on. Take these as de…ned (standard results).
Examples:
Page 42
Linearity: If and are constants and y = f (x) + g (x) then
dy d
= ( f (x) + g (x)) = f 0 (x) + g 0 (x) :
dx dx
Page 43
1.4.1 Product Rule
dy
= f 0 (x) g (x) + f (x) g 0 (x) :
dx
Thus if y = x3e3x then
Page 44
1.4.2 Function of a Function Rule
If y = f (g (x)) then
dy
= f 0 (g (x)) g 0 (x) :
dx
2
Thus if y = e4x then
2 2
dy=dx = e4x 4:2x = 8xe4x :
Page 45
So di¤erentiate the whole function, then multiply by the derivative of the
"inside" (g (x)) :
Write y = f (g (x)) as
y = f (u) ; u = g (x) :
Then
dy d du d
= f (u) = f (u) = g 0 (x) f 0 (u)
dx dx dx du
0 0
= g (x) f (g (x)) :
Symbolically, we write this as
Page 46
dy du dy
=
dx dx du
provided u is a function of x alone.
2
Thus for y = e4x ; write u = 4x2; y = eu: Then
dy du dy 4x 2
= = 8xe :
dx dx du
Further examples:
y = sin x3
y = sin u; where u = x3
y 0 = cos u:3x2 ! y 0 = 3x2 cos x3
y = tan2 x : this is how we write (tan x)2 so put
y = u2 where u = tan x
y 0 = 2u: sec2 x ! y 0 = 2 tan x sec2 x
Page 47
y = ln sin x: Put u = sin x ! y = ln u
dy 1 du
= ; = cos x
du u dx
hence y 0 = cot x:
dy
Exercise: Di¤erentiate y = log tan2 x to show = 2 sec x csc x
dx
Page 48
1.4.3 Quotient Rule
f (x)
If y = then
g (x)
Thus if y = e3x=x2;
dy x23e3x 2xe3x 3x 2 3x
= = e :
dx x4 x3
This is a combination of the product rule and the function of a function (or
chain) rule. It is very simple to derive:
Page 49
f (x)
Starting with y = and writing as y = f (x) (g (x)) 1 we apply the
g (x)
product rule
dy df 1 d
= (g (x)) + f (x) (g (x)) 1
dx dx dx
Now use the chain rule on (g (x)) 1 ; i.e. write u = g (x) so
d du d
(g (x)) 1 = u 1 = g 0 (x) u 2
dx dx du
g 0 (x)
= 2
:
g (x)
Then
Page 50
To simplify we note that the common denominator is g (x)2 hence
dy g (x) f 0 (x) f (x) g 0 (x)
= 2
:
dx g (x)
Examples:
d x d x x d
(xe ) = x (e ) + e (x)
dx dx dx
x x x
= xe + e = e (x + 1) ;
Page 51
1.4.4 Implicit Di¤erentiation
ln y = x ln a
and now di¤erentiate both sides by applying the chain rule to the left hand
side
1 dy
= ln a
y dx
dy
= y ln a
dx
and replace y by ax to give
dy
= ax ln a:
dx
Page 52
This is an example of implicit di¤erentiation.
Page 53
1.4.5 Higher Derivatives
Page 54
Consider another two examples
f (x) = ex
f 0 (x) = ex ! f 00 (x) = ex
...
f (n) (x) = ex = f (x) :
Not all functions are di¤erentiable everywhere. For example, 1=x has the
derivative 1=x2 but only for x 6= 0:
1
Easy way is to "look for a hole", e.g. f (x) = does not exist at x = 2:
x 2
Page 55
1.4.6 Leibniz Rule
This is the …rst of two rules due to Leibniz. Here it is used to obtain the nth
derivative of a product y = uv , by starting with the product rule.
dy dv du
=u +v uDv + vDu
dx dx dx
then
Page 56
Example: Find the nth derivative of y = x3eax:
Page 57
1.4.7 Further Limits
f (r+1) (x)
lim !A
x!a g (r+1) (x)
Page 58
Note: Very important to verify quotient has this indeterminate form before
using L’Hospitals rule. Else we end up with an incorrect solution.
Examples:
1.
cos x + 2x 1 0
lim
x!0 3x 0
So di¤erentiate both numerator and denominator !
d (cos x + 2x 1) sin x + 2 0 2
lim dx d (3x)
= lim 6= !
x!0 x!0 3 0 3
dx
ex + e x 2
2. lim ; quotient has form 0=0: By L’Hospital’s rule we have
x!0 1 cos 2x
ex e x
lim ; which has indeterminate form 0=0 again for 2nd time, so
x!0 2 sin 2x
Page 59
we apply L’Hospital’s rule again
ex + e x 1
lim = :
x!0 4 cos 2x 2
x2 1 2x
3. lim ) use L’Hospital , so lim !1
x!1 ln x 1 x!1 1=x
e3x 1
4. lim ) lim 3xe3x ! 1
x!1 ln x 1 x!1
x 2
5. lim x2e 3x 0:1; so we convert to form 1=1 by writing lim 3x ;
x!1 x!1 e
2
and now use L’Hospital (di¤erentiate twice), which gives lim !0
x!1 9e3x
Page 60
sin x
6. lim lim cos x 1
x!0 x x!0
Page 61
1.5 Taylor Series
Many functions are so complicated that it is not easy to see what they look
like. If we only want to know what a function looks like locally , we can
approximate it by simpler functions: polynomials. The crudest approximation
is by a constant: if f (x) is continuous at x0;
f (x) t f (x0)
Page 62
Suppose we wish to approximate this function for very small values of x (i.e.
df
x ! 0). We know at x = 0; dx = 1: So this is the gradient at x = 0: We
can …nd the equation of the line that passes through a point (x0; y0) using
y y0 = m (x x0 ) :
df
Here m = dx = 1; x0 = 0; y0 = 1; so y = 1 + x; is a polynomial. What
information have we ascertained from this?
Page 63
ex 1+x
25
20
15
10
0
-4 -3 -2 -1 0 1 2 3 4
-5
Page 64
Suppose now that we are not that close to 0: We look for a second degree
polynomial (i.e. quadratic)
g (0) = f (0) =) c = 1
g 00 (0) = f 00 (0) =) 2a = 1
Page 65
This gives
1 2
ex g (x) = x + x + 1
2
25
20
15
10
0
-4 -3 -2 -1 0 1 2 3 4
Page 66
Moving further away we would look at a third order polynomial h (x) which
gives
x 1 3 1 2
e h (x) = x + x + x + 1
3! 2!
25
20
15
10
0
-4 -3 -2 -1 0 1 2 3 4
-5
and so on.
Page 67
Better is to approximate by the tangent at x0: This makes the approximation
and its derivative agree with the function:
1 (n)
f (x0) (x x0 ) n ;
n!
Page 68
where f (n) means the nth derivative of f and n! = n: (n 1) : : : 2:1 is
the factorial.
Examples:
x2 x 3 xn
ex =1+x+ + + ::: +
2! 3! n!
Near 0; the logarithm looks like
x2 x 3 x4 n x
n+1
log (1 + x) = x + + ::: + ( 1)
2 3 4 (n + 1)!
Page 69
How can we obtain this? Put f (x) = log (1 + x) ; then f (0) = 0
1
f 0 (x) = 1+x f 0 (0) = 1
f 00 (x) = 1 f 00 (0) = 1
(1+x)2
f 000 (x) = 2 f 000 (0) = 2
(1+x)3
f (4) (x) = 6 f (4) (0) = 6
(1+x)4
Thus
1 (n)
X f (0) n
f (x) = x
n=0 n!
1 ( 1) 2 1 ( 6) 4
= 0+ x+ x + :2x3 + x + :::::
1! 2! 3! 4!
x 2 x3 x 4
= x + + :::
2 3 4
Page 70
Taylor’s theorem, in general, is this : If f (x) and its …rst n derivatives exist
(and are continuous) on some interval containing the point x0 then
1 f 0 (x ) (x
f (x) = f (x0) + 1! x0 ) +
0
1 f 00 (x ) (x 2
2! 0 x 0 ) + :::
+ (n 11)! f (n 1) (x0) (x x0)n 1 + Rn (x)
We can expand about any point x = a; and shift this point to the origin, i.e.
x x0 0 and we express in powers of (x x0)n :
Page 71
So for f (x) = sin x about x = =4 we will have
1 f (n)
X 4
f (x) = (x =4)n
n=0 n!
where f (n) (2) is the nth derivative of log (1 + x) evaluated at the point
x = 2:
Page 72
1.5.1 The Binomial Expansion
n (n 1) 2 n (n 1) (n 2) 3
(1 + x)n = 1 + nx + x + x + ::: :
2! 3!
We can extend this to expressions of the form
Page 73
The binomial coe¢ cients are found in Pascal’s triangle:
1 (n=0) (1 + x)0
1 1 (n=1) (1 + x)1
1 2 1 (n=2) (1 + x)2
1 3 3 1 (n=3) (1 + x)3
1 4 6 4 1 (n=4) (1 + x)4
1 5 10 10 5 1 (n=5) (1 + x)5
and so on ...
Page 74
As an example consider:
If n is not an integer the theorem still holds but the coe¢ cients are no longer
integers. For example,
(1 + x) 1 = 1 x + x2 x3 + ::: :
and
1=2 1 1 1 x2
(1 + x) =1+ x+ ::: :
2 2 2 2!
Page 75
h i
k
(a + b) = ak 1+ b k =
a
sin x
Example: We looked at lim ! 1 (by L’Hospital). We can also do this
x!0 x
using Taylor series:
sin x x3=3! + x5=5! + ::::
x
lim lim
x!0 x x!0 x
lim 1 x2=3! + x4=5! + ::::
x!0
! 1:
Page 76
1.6 Integration
Page 77
dF
If = f (x) then
dx
d dF dC dF
(F (x) + C ) = (x) + = (x) = f (x) :
dx dx dx dx
Z
1
xndx = xn+1 + C (n 6= 1) ;
n+1
Z Z
dx ax 1 ax
= log (x) + C; e dx = e + C (a 6= 0) ;
Z x Z a
1 1
cos axdx = sin ax + C; sin axdx = cos ax + C
a a
Page 78
Linearity
Integration is linear:
Z Z Z
( f (x) + g (x)) dx = f (x) dx + g (x) dx
Z Z Z
Ax2 + Bx3 dx = A x2dx + B x3dx
A 3 B 4
= x + x + C;
3 4
Z Z Z
dx
(3ex + 2=x) dx = 3 exdx + 2 = 3ex + 2 log (x) + C;
x
and so forth.
Page 79
1.6.2 The De…nite Integral
Page 80
Note also that a de…nite integral
Z b
f (x) dx
a
does not depend on the variable of integration, x in the above, it only depends
on the function f and the limits of integration (a and b in this case); the
area under a curve does not depend on what we choose to call the horizontal
axis.
So
Z b Z b Z b
f (x) dx = f (y ) dy = f (z ) dz:
a a a
We should never confuse the variable of integration with the limits of integra-
tion; a de…nite integral of the form
Z x
f (x) dx;
a
Page 81
If a < b < c then
Z c Z b Z c
f (x) dx = f (x) dx + f (x) dx:
a a b
Also
Z a Z c
f (x) dx = f (x) dx:
c a
Page 82
1.6.3 Integration by Substitution
This involves the change of variable and used to evaluate integrals of the form
Z
g (f (x)) f 0 (x) dx;
Examples:
Z
x
2
dx : z = 1 + x2 ! dz = 2xdx
Z
1+x
x 1 1 2 +C
dx = log (z ) + C = log 1 + x
1 + x2 2 q
2
= log 1 + x2 + C
Page 83
R 2
xe x dx : z = x2 ! dz = 2xdx
Z Z
x 2 1
xe dx = ez dz
2
1 z 1 x2
= e +C = e +C
2 2
Z Z
1 1 2
log (x) dx = z dz = z + C
x 2
1
(log (x))2 + C
=
2
with z = log (x) so dz = dx=x and
Z Z Z
e x+ex dx = ex
exe dx = ez dz
x
= ez + C = ee + C
with z = ex so dz = exdx:
Page 84
The method can be used for de…nite 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.
Z 2
x 2
e 2xdx:
1
Z x=2 Z z=4
x2
e 2xdx = ez dz
x=1 z=1
= [ez ]z=4
z=1 = e4 e1:
Page 85
Further examples: consider
Z x=2
2xdx
2
:
x=1 1 + x
Page 86
Or consider
Z x=e
log (x)
2 dx
x=1 x
Page 87
When we make a substitution like z = f (x) we are implicitly assuming that
dz=dx = f 0 (x) is neither in…nite nor zero. It is important to remember this
implicit assumption.
Page 88
It is clear that x2 > 0 except at x = 0 and therefore that
Z 1
2
x2dx =
1 3
must be the correct answer. The substitution z = x2 gave
Z x=1 Z
2 1 z=1 dz
x dx = p =0
x= 1 2 z=1 z
which is obviously wrong. So why did the substitution fail?
Page 89
1.6.4 Integration by Parts
This is based on the product rule. In usual notation, if y = u (x) v (x) then
dy du dv
= v+u
dx dx dx
so that
du dy dv
v= u
dx dx dx
and hence integrating
Z Z Z Z
du dy dv dv
vdx = dx u dx = y (x) u dx + C
dx dx dx dx
or
Z Z
du dv
vdx = u (x) v (x) u (x) dx + C
dx dx
i.e.
Z Z
u0vdx = uv uv 0dx + C
Page 90
This is useful, for instance, if v (x) is a polynomial and u (x) is an exponential.
Put
v = x u0 = ex
v 0 = 1 u = ex
hence
Z Z
dv
xexdx = uv u dx
Z dx
= xex ex:1dx = ex (x 1) + C
Page 91
R
Now using the same example xexdx
v = x du = exdx
dv = dx u = ex
and
Z Z Z
vdu = uv udv = xex exdx
= ex (x 1) + C
Another example
Z Z
2 e2x dx = 1 x2 e2x 2x
x
|{z} |{z} | {z }dx + C
xe
v(x) u0 |2 {z } uv 0
uv
and using integration by parts again
Z Z
2x 1 2x 1 1
xe dx = xe e2xdx = (2x 1) e2x + D
2 2 4
so Z
1
x2e2xdx = 2x2 2x + 1 e2x + E:
4
Page 92
1.6.5 Reduction Formula
) In = n!; n 2 Z+
In is called the Gamma Function.
Page 93
1.6.6 Other Results
Z
f 0 (x)
dx = ln jf (x)j + C
f (x)
e.g.
Z
3
dx = ln j1 + 3xj + C
1 + 3x
Z Z
1 1 7 1
dx = dx = ln j2 + 7xj + C
2 + 7x 7 2 + 7x 7
This allows us to state a standard result
Z
1 1
dx = ln ja + bxj + C
a + bx b
How can we re-do the earlier example
Z
x
2
dx;
1+x
which was initially treated by substitution?
Page 94
Partial Fractions Consider a fraction where both numerator and denomina-
tor are polynomial functions, i.e.
P
N
a n xn
f (x) n=0
h (x) =
g (x) P
M
bnxn
n=0
where deg f (x) < deg g (x) , i.e. N < M: Then h (x) is called a partial
fraction. Suppose
c A B
+
(x + a) (x + b) (x + a) (x + b)
then writing
c = A (x + b) + B (x + a)
and solving for A and B allows us to obtain partial fractions.
Page 95
The simplest way to achieve this is by setting x = b to obtain the value of
B; then putting x = a yields A:
1
Example: : Now write
(x 2) (x + 3)
1 A B
+
(x 2) (x + 3) x 2 x+3
which becomes
1 = A (x + 3) + B (x 2)
Page 96
There is another quicker and simpler method to obtain partial fractions, called
the "cover-up" rule. As an example consider
x A B
+ :
(x 2) (x + 3) x 2 x+3
A
Firstly, look at the term : The denominator vanishes for x = 2; so
x 2
take the expression on the LHS and "cover-up" (x 2) : Now evaluate the
x
remaining expression, i.e. for x = 2; which gives 2=5: So A = 2=5:
(x + 3)
B
Now repeat this, by noting that does not exist at x = 3: So cover
x+3
x
up (x + 3) on the LHS and evaluate for x = 3; which gives
(x 2)
B = 3=5:
Page 97
f (x)
Any rational expression (with degree of f (x) < degree of g (x)) such
g (x)
as above can be written
f (x)
F1 + F2 + :::::::: + Fk
g (x)
where each Fi has form
A Cx + D
m or n
(px + q ) ax2 + bx + c
A
where m is written as
(px + q )
A1 A2 A
+ + :::::: +
(px + q ) (px + q )2 (px + q )m
Page 98
Cx + D
and n becomes
ax2 + bx + c
C1x + D1 Cnx + Dn
+ :::::: + n
ax2 + bx + c ax2 + bx + c
Page 99
Examples:
3x 2 A B C D
+ + +
(4x 3) (2x + 5)3 4x 3 2x + 5 (2x + 5)2 (2x + 5)3
4x2 + 13x 9 A B C
+ +
x (x + 3) (x 1) x x + 3 (x 1)
5x2 x+2 Ax + B Cx + D E
2
+ 2
+
x2 + 2 x + 4 (x 1) x2 + 2 x + 4 x2 + 2 x + 4 x 1
x2 x 21 Ax + B Cx + D E
2
+ 2
+
x2 + 4 (2x 1) x2 + 4 x2 + 4 2x 1
Page 100
1.7 Complex Numbers
We call the x axis the real line and the y axis the imaginary line.
z = r (cos + i sin )
where r is always positive and counter-clockwise from Ox:
So x = r cos ; y = r sin
Page 101
x z = x+iy
r
y
The set of all complex numbers is denoted C; and for any complex number z
we write z 2 C: We can think of R C:
_
We de…ne the complex conjugate of z by z where
_
z =x iy:
z is the re‡ection of z in the real line. So for example if z = 1 2i; then
z = 1 + 2i:
Page 102
1.7.1 Arithmetic
c id
here we have simply multiplied by and note that (c + id) (c id) =
c id
c2 + d2
Page 103
Examples
z1 = 1 + 2i; z2 = 3 i
z1 + z2 = (1 + 3) + i (2 1) = 4 + i ; z1 z2 = (1 3) i (2 ( 1)) =
2 + 3i
z1 1 + 2i 3 + i 1 7
= : = +i
z2 3 i 3+i 10 10
Page 104
1.7.2 Complex Conjugate Identities
_
1. z = z
_
2. (z1 + z2) = z1 + z 2
_ _
3. (z1z2) = z1z2
_
_ z+z
4. z + z = 2x = 2 Re z ) Re z =
2
_
_ z z
5. z z = 2iy = 2i Im z ) Im z =
2i
_
6. z: z = (x + iy ) (x iy ) = jzj2
Page 105
7. jzj2 = z (z ) = zz = jzj2 ) jzj = jzj
z1 z z z z
8. = 1 : 2 = 1 22
z2 z2 z 2 jz 2j
Page 106
1.7.3 Polar Form
Page 107
then
Page 108
Euler’s Formula Let be any a1ngle, then
x 2 x 3 x n
ex = 1 + x + + + ::::::::::::: + (a)
2! 3! n!
x3 x5 n x2n+1
sin x = x + ::::::::::::: + ( 1) (b)
3! 5! (2n + 1)!
x2 x4 n x
2n
cos x = 1 + ::::::::::::: + ( 1) (c)
2! 4! (2n)!
Page 109
Replacing x by the purely imaginary quantity i in (a), we obtain
(i )2 (i )3 (i )n
ei = 1+i + + + ::::::::::::: +
2! 3! ! n!
2 4 6
= 1 + + :::::::::::: +
2! 4! 6!
!
3 5
i + :::::::::
3! 5!
= cos + i sin
Page 110
We can apply Euler’s formula to integral problems. Consider the problem
Z
ex sin xdx
= ex Im 1+i1 1 i
eix = ex Im (1+i)(1 eix
i)
= 21 ex Im (1 i) eix = 12 ex Im eix ieix
= 21 ex Im (cos x + i sin x i cos x + sin x)
= 21 ex (sin x cos x)
Z
Exercise: Apply this method to solving ex cos xdx.
Page 111
1.8 Functions of Several Variables: Multivariate Calculus
A function can depend on more than one variable. For example, the value of
an option depends on the underlying asset price S (for ’spot’or ’share’) and
time t: We can write its value as V (S; t) :
The value also depends on other parameters such as the exercise price E;
interest rate r and so on. Although we could write V (S; t; E; r; :::) ; it is
usually clearer to leave these other variables out.
Page 112
Consider a function z = f (x; y ) ; which can be thought of as a surface in
x; y; z space. We can think of x and y as positions on a two dimensional
grid (or as spacial variables) and z as the height of a surface above the (x; y )
grid.
@f
@x
(note @ and not d ). It is the x derivative of f with y held …xed:
@f f (x + x; y ) f (x; y )
= lim :
@x x!0 x
Page 113
The other partial derivative, @f =@y; is de…ned similarly but now x is held
…xed:
@f f (x; y + y ) f (x; y )
= lim :
@y y!0 y
@f @f
and
@x @y
are sometimes written as fx and fy :
Examples
If
2
f (x; y ) = x + y2 + xe y
then
@f y 2
= fx = 1 + 0 + 1 e
@x
Page 114
@f 2
= fy = 0 + 2y + x ( 2y ) e y :
@y
The convention is, treat the other variable like a constant.
Page 115
Higher Derivatives
Page 116
If f is well-behaved, the ’mixed’partial derivatives are equal:
fxy = fyx:
i.e. the second order derivatives exist and are continuous.
Example:
2
With f (x; y ) = x + y 2 + xe y as above,
2
fx = 1 + e y
so
2
fxx = 0; fxy = 2ye y
Page 117
Also
y 2
fy = 2 y 2xye
so
y 2 y 2 2 y 2
fyx = 2ye ; fyy = 2 2xe + 4xy e
Note that fxy = fyx:
Page 118
1.8.1 The Chain Rule I
i.e. a constant.
Page 119
dz
Example: Calculate at t = =2 where
dt
z = exp xy 2 x = t cos t; y = t sin t:
Chain rule gives
dz @z dx @z dy
= +
dt @x dt @y dt
= y 2 exp xy 2 ( t sin t + cos t) +
2xy exp xy 2 (sin t + t cos t) :
dz 3
At t = =2 x = 0; y = =2 ) = :
dt t= =2 8
Page 120
1.8.2 The Chain Rule II
@F @x @f @y @f @F @x @f @y @f
= + and = + :
@u @u @x @u @y @v @v @x @v @y
@ @x @ @y @ @ @x @ @y @
= + ; = + :
@u @u @x @u @y @v @v @x @v @y
Page 121
Example:
@T @T @x @T @y
= + = cos 3x2 y + sin 3y 2 x
@r @x @r @y @r
= cos 3r 2 cos2 r sin +
sin 3r 2 sin2 r cos
= 3r 2 cos3 + sin3 2r cos sin
= 3r 2 cos3 + sin3 r sin 2 :
Page 122
@T @T @x @T @y
= +
@ @x @ @y @
= r sin 3x2 y + r cos 3y 2 x
= r sin 3r 2 cos2 r sin +
r cos 3r 2 sin2 r cos
= 3r 3 cos sin (sin cos ) +
r2 sin2 cos2 :
= r2 (sin cos ) (3r cos sin + sin + cos )
Page 123
1.8.3 Taylor for two Variables
Page 124
Suppose a function f = f (x; y ) and both x; y change by a small amount, so
x ! x + x and y ! y + y; then we can examine the change in f using
a two dimensional form of Taylor
f (x + x; y + y ) = f (x; y ) + fx x + fy y +
1 1
fxx x2 + fyy y 2 +
2 2
fxy x y + O x2; y 2 :
By taking f (x; y ) to the lhs, writing
df = f (x + x; y + y ) f (x; y )
and considering only linear terms, i.e.
@f @f
df = x+ y
@x @y
we obtain a formula for the di¤erential or total change in f:
Page 125