You are on page 1of 48

Mathematics I

(Part of 4CCP 1350)


Department of Physics, King’s College London
Dr J. Alexandre, 2009/2010

Contents
1 Introduction 3
1.1 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Combinatorics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Functions of a real variable 5


2.1 Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Polynomial functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Rational functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5 Trigonometric functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Integration 12
3.1 Interpretation of the integral . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Integration by part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Change of variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 Improper integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Logarithm and exponential functions 18


4.1 Logarithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3 Hyperbolic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Taylor expansions and series 22


5.1 Approximation of a function around a value of the argument . . . . . . . . 22
5.2 Radius of convergence and series . . . . . . . . . . . . . . . . . . . . . . . . 22
5.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.4 Expansion for a composition of functions . . . . . . . . . . . . . . . . . . . 24

1
6 Vector calculus 25
6.1 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.2 Rotations in two dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3 Scalar product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.4 Cross product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.5 Scalar triple product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.6 Polar coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

7 Complex numbers 30
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.2 Complex exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.3 Trigonometric formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.4 Roots of complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.5 Relation to hyperbolic functions . . . . . . . . . . . . . . . . . . . . . . . . 32

8 Linear differential equations 33


8.1 First order, homogeneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.2 Variation of parameters method . . . . . . . . . . . . . . . . . . . . . . . . 34
8.3 Second order, homogeneous . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4 Second order, non-homogeneous . . . . . . . . . . . . . . . . . . . . . . . . 37
8.5 General properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.6 Separation of variables method . . . . . . . . . . . . . . . . . . . . . . . . 37

9 Linear algebra 38
9.1 Linear function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9.2 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9.3 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
9.4 Composition of linear functions . . . . . . . . . . . . . . . . . . . . . . . . 40
9.5 Eigenvectors and eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . . . 41

10 Functions of several variables 43


10.1 Partial differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
10.2 Differential of a function of several variables . . . . . . . . . . . . . . . . . 44
10.3 Implicit functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
10.4 Double integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
10.5 Triple integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

2
1 Introduction
1.1 Numbers
• Natural numbers N These are all positive integers, including 0.

• Integers Z These are the elements of N, plus the negative integers.

• Rational numbers Q These are all the numbers which can be written p/q, where p
and q 6= 0 are elements of Z. These numbers have either a finite number of decimals
or a periodic infinite number of decimals, for example

1 . 3795 3795 3795 3795 · · · · · ·

Q contains Z, which is obvious if one takes q = 1.

• Real numbers R These are the elements of Q plus all the numbers with
√ infinite and
random decimals. Examples of real numbers, which are not in Q are: 2, π, e, ....

Density property: Between any two real numbers can be found a rational number, and vice
verse.

1.2 Group
A group G is a set of elements {a}, together with an operation ⋆, such that:
• if a, b are two elements of G, then a ⋆ b is element of G;

• G contains a unit element u such that, for any element a of G, a ⋆ u = a;

• for any element a of G, there is an element ã such that a ⋆ ã = u.


Examples of groups: {Z, +}, or {Q⋆ , ×}, where Q⋆ is Q without 0.

1.3 Combinatorics
• Permutations The number of ways to choose an order for n elements is the factorial

n! = n × (n − 1) × (n − 2) · · · ×3 × 2 × 1.

Indeed, there are n possibilities for the first element, and for each of these possibilities,
there are n − 1 for the second element, etc...

• Combinations The number of ways to choose k elements out of n, independently


of the order, is given by the binomial coefficients
 
n n!
= .
k k!(n − k)!

3
Indeed, the number of possible ways to order n points is n!, and has to be divided
by the number of ways to order the k chosen elements, which is k!, and also by the
number of ways to order the remaining n − k elements, which is (n − k)!
Some simple properties are:
       
n n n n
= , = n, = 1.
n−k k 1 0

• Binomial formula. We show here that


k=n  
X
n n
(a + b) = an−k bk , (1)
k
k=0

where n is an integer and a, b are real numbers, using a proof by induction:


First step: check that eq.(1) is valid for a given value of n, for example n = 2:

(a + b)2 = a2 + 2ab + b2
     
2 2 0 2 1 1 2
= ab + ab + a0 b2
0 1 2
k=2  
X 2
= a2−k bk .
k
k=0

Second step: suppose that eq.(1) is valid for n, and show that it is then valid for
n + 1:
k=n  
n+1
X n
(a + b) = (a + b) an−k bk
k
k=0
k=n
X n 
 k=n  
n−k+1 k
X n
= a b + an−k bk+1
k k
k=0 k=0
k=n   k=n+1
X  n 
X n n+1−k k
= a b + an+1−k bk
k k−1
k=0 k=1
k=n    
n+1 n+1
X n n
= a +b + + an+1−k bk
k k−1
k=1
k=n
X n + 1 
n+1 n+1
= a +b + an+1−k bk
k
k=1
k=n+1  
X n+1
= an+1−k bk .
k
k=0

4
2 Functions of a real variable
A function of a real variable f is an operation, which to a real variable x associates the
quantity f (x).

2.1 Continuity
Intuitively, a function f of the variable x is continuous is a small change in x leads to a
small change in f (x). More rigorously, f is continuous in x0 if for any ε > 0, one can
always find a δ > 0 such that

|x − x0 | < δ ⇒ |f (x) − f (x0 )| < ε.

2.2 Differentiation
The derivative of a function f at the point x is the slope of the tangent of the curve y = f (x)
at x. In order to calculate it, let’s consider the points M and M ′ with coordinates (x, f (x))
and (x + ∆x, f (x + ∆x)) respectively, where dx > 0 is an increment (see fig(1)). The slope
of the straight line (MM ′ ) is

f (x + ∆x) − f (x) f (x + ∆x) − f (x)


slope = = .
(x + ∆x) − x ∆x

The slope of the tangent of the curve at M is obtained when ∆x → 0. The derivative of
f at the point x is then

f (x + ∆x) − f (x) df
f ′ (x) = lim = , (2)
∆x→0 ∆x dx
where dx denotes the infinitesimal increment in x and df the corresponding infinitesimal
increment in f (x).

Example Let us calculate the derivative of f (x) = axn , where a is a constant and n is an
integer. By definition

a(x + ∆x)n − axn


f ′ (x) = lim
∆x→0 ∆x
a[x + nxn−1 ∆x + n(n − 1)xn−2 (∆x)2 /2 + · · ·] − axn
n
= lim
∆x→0 ∆x
n−1 n−2

= a lim nx + n(n − 1)x ∆x + · · ·
∆x→0
= anxn−1 ,

where the dots represent higher orders in ∆x.

5
f(x+∆ x)

f(x)

x x+∆x

Figure 1: The derivative is the slope of the tangent.

Eq, (2) defines the “right derivative”, for ∆x > 0. One can also define the “left derivative”
by
f (x) − f (x − ∆x)
lim ,
∆x→0 ∆x
where ∆x > 0. A function f is said to be differentiable at x if these two definitions lead
to the same result. If these two derivatives are different, the function is singular at the
point x and its derivative is not defined. An example of such a singularity is the function
f (x) = |x| at x = 0. Indeed, for x = 0, the left derivative is -1 and the right derivative is
1.
Note that a function can be continuous but not differentiable for a given value of x, as
shows the previous example.

Extrema of a function Since the derivative f ′ (a) of a function at the point a corresponds
to the slope of the tangent of the curve of equation y = f (x), we have the following
classification:
• if f ′ (a) > 0, then f is increasing in the vicinity of a;
• if f ′ (a) < 0, then f is decreasing in the vicinity of a;
• if f ′ (a) = 0 and f (x) changes sign at x = a, then f (a) is an extremum of f ;
• if f ′ (a) = 0 and f (x) does not change sign at x = a, then the point of coordinates
(a, f (a)) is called an inflexion point. At such a point, the second derivative changes
sign.

6
Derivative of a product If f, g are two functions of x, the derivative (f g)′ is given by

f (x + ∆x)g(x + ∆x) − f (x)g(x)


(f g)′(x) = lim
∆x→0 ∆x
f (x + ∆x)g(x) − f (x)g(x) + f (x + ∆x)g(x + ∆x) − f (x + ∆x)g(x)
= lim
∆x→0
 ∆x 
f (x + ∆x) − f (x) g(x + ∆x) − g(x)
= lim g(x) + f (x + ∆x)
∆x→0 ∆x ∆x
′ ′
= f (x)g(x) + f (x)g (x). (3)

Chain rule Consider two functions f and g, and the function F defined as F (x) = f (g(x)).
The derivative of F is
F (x + ∆x) − F (x)
F ′ (x) = lim
∆x→0 ∆x
f (g(x + ∆x)) − f (g(x))
= lim
∆x→0 dx
f (g(x + ∆x)) − f (g(x)) g(x + ∆x) − g(x)
= lim ×
∆x→0 g(x + ∆x) − g(x) ∆x
f (g + ∆g) − f (g) g(x + ∆x) − g(x)
= lim ×
∆x→0 ∆g ∆x
′ ′
= f (g(x)) × g (x),

where ∆g = g(x + ∆x) − g(x) is the increment in g(x) corresponding to x → x + ∆x.

Derivative of a ratio The derivative of 1/x is −1/x2 , such that the derivative of the
function 1/f is ′
f ′ (x)

1 1
=− 2 × f ′ (x) = − 2 .
f (x) f (x) f (x)
As a consequence, the derivative of the ratio of the functions f and g is
′  ′
f ′ (x)g(x) − f (x)g ′(x)
 
f (x) ′ 1 g (x)
= f (x) × + f (x) × − 2 = .
g(x) g(x) g (x) g 2 (x)

Derivative of an inverse function If y = f (x), the inverse function f −1 , when it exists,


is defined by x = f −1 (y). Do not confuse the inverse function f −1 with 1/f !. In order to
define the inverse of a function, one needs a one-to-one mapping between x and y. This is
usually the case on a given interval for x at least.
The derivative of the inverse is then
′ f −1 (y + ∆y) − f −1 (y)
f −1 (y) = lim
∆y→0 ∆y

7
x + ∆x − x
= lim
∆x→0 f (x + ∆x) − f (x)
1
= ′
,
f (x)

where ∆x is defined such that y + ∆y = f (x + ∆x).

2.3 Polynomial functions


A polynomial function of x is of the form
n=N
X
P (x) = an xn ,
n=0

where an are the coefficients and N is the degree of the polynomial.


If N is odd, the polynomial has at least one zero. Indeed, we have then

lim P (x) = −∞ and lim P (x) = +∞,


x→−∞ x→+∞

such that the line representing y = P (x) cuts at least once the axis y = 0, since the
polynomial is a continuous function.
A polynomial of degree 2 can have two poles, but might not have any (real) pole:

• P (x) = a(x − z1 )(x − z2 ) has two poles z1 , z2 . The pole is double if z1 = z2 ;

• Q(x) = ax2 + bx + c has no pole if b2 − 4ac < 0.

A polynomial of degree 3 has either one pole or three poles, and can be written, for all x,

• P (x) = a(x − z1 )(x − z2 )(x − z3 ) if P has three poles;

• Q(x) = (x − z)(ax2 + bx + c), with b2 − 4ac < 0, if Q has one pole z.

In general, any polynomial function can be written

P (x) = (x − z1 ) · · · (x − zn ) × (a1 x2 + b1 x + c) · · · (am x2 + bm x + cm ),

where zi , i = 1, ..., n are the poles of the polynomial, b2j − 4aj cj < 0 for all j = 1, ..., m,
and n + 2m is the degree of the polynomial.

2.4 Rational functions


A rational function is the ratio of two polynomial functions P and Q, and has the form,
for each x,
P (x)
R(x) = .
Q(x)

8
y

z z z x
1 2 3

Figure 2: A polynomial function of degree 5, with three poles z1 , z2 , z3 .

z1 z2 z3 z4 x

Figure 3: A polynomial function of degree 6, with four poles z1 , z2 , z3 , z4 .

9
1
M
sin x

cos x 1

Figure 4: The coordinates of M on the trigonometric circle are (cos x, sin x).

If the degree of P is less than the degree of Q, It is always possible to reduce R as a sum
of irreducible rational functions of the form a/(x − z) or (ax + b)/(x2 + cx + d).

Example The fraction (x + 2)/(x2 + 5x + 4) can be written

x+2 x+2 a b
= = + ,
x2 + 5x + 4 (x + 1)(x + 4) x+1 x+4

where a(x + 4) + b(x + 1) = x + 2, such that a + b = 1 and 4a + b = 2, which gives a = 1/3


and b = 2/3. Finally,
x+2 1/3 2/3
2
= + .
x + 5x + 4 x+1 x+4

2.5 Trigonometric functions


For a given angle 0 ≤ x ≤ 2π, sin x and cos x are defined as the coordinates of the point
M at the intersection of the straight line (OM) with the trigonometric circle (see fig(4)).

Property Using Pythagoras’ theorem, we have sin2 x + cos2 x = 1.

Trigonometric formula It will be shown in the chapter on vector calculus (subsection

10
6.2) that the sine and cosine of the sum of two angles are given by

sin(a + b) = sin a cos b + sin b cos a


cos(a + b) = cos a cos b − sin a sin b. (4)

Important limit We will now show, geometrically, that


sin x
lim = 1,
x→0 x
and this limit will be very useful in deriving fundamental properties of the trigonometric
functions.
Proof: From the definition of sine and cos, one can see on fig.(5) that

sin x ≤ x ≤ sin x + 1 − cos x. (5)

But one can also see that

0 ≤ sin2 x + (1 − cos x)2 ≤ x2 ,

such that
x2
0 ≤ 1 − cos x ≤ .
2
Using this in the inequalities (5), we obtain
sin x sin x x
≤1≤ + ,
x x 2
sin x
and the only possibility for this to be valid in the limit x → 0 is to have x
→ 1.

Derivative of trigonometric functions The first important consequence of the previous


limit is the calculation of the derivative of the sine. From eq.(4) we have
sin(x + ∆x) − sin x
sin′ x = lim
∆x→0 ∆x
sin x cos(∆x) + sin(∆x) cos x − sin x
= lim
∆x→0
 ∆x 
sin(∆x) cos(∆x) − 1
= lim cos x + sin x .
∆x→0 ∆x ∆x
We have seen that 1 − cos(∆x) is of order ∆x2 , and therefore the second term vanishes in
the limit ∆x → 0, whereas the first term leads to

(sin x)′ = cos x.

In the same way, one can easily show that (cos x)′ = − sin x. As a consequence, we also
have (tan x)′ = 1 + tan2 x.

11
x

a
c

Figure 5: On the figure: a = sin x, b = 1 − cos x and c2 = a2 + b2

3 Integration
The integration corresponds to the inverse operation of the differentiation: F is a primitive
of f if Z
F (x) = f (x)dx ⇒ F ′ (x) = f (x).

We have Z b
f (x)dx = F (b) − F (a),
a
and therefore Z x
f (u)du = F (x) − F (0).
0
Make sure never to use the same name for the variable of integration and the limit of the
integral.
From the linearity of the differentiation, integrals have the following properties:
Ra Rb
• b f (x)dx = − a f (x)dx
Rc Rb Rc
• a f (x)dx = a f (x)dx + b f (x)dx
Rb Rb Rb
• a [c1 f1 (x) + c2 f2 (x)]dx = c1 a f1 (x)dx + c2 a f2 (x)dx, where c1 , c2 are constants.

12
f(xk )

a xk b
dx

Figure 6: Riemann definition of the integral

3.1 Interpretation of the integral


Rb
As explained on fig.(6), the Riemann definition of a f (x)dx, b > a, corresponds to the
surface area between the line y = f (x) and the straight line y = 0, from x = a to x = b.
Indeed, this area can be seen as the sum of the infinitesimal areas dx × f (x), and we have
Z b ( n−1
)
b−aX
f (x)dx = lim f (xk )
a n→∞ n k=0

where
b−a
xk = a + k , k = 0, ..., n − 1,
n

Equivalence with the definition based on the derivative. We show here that the
Riemann definition of the integral, as a surface area, is equivalent to the definition given
previously. From the Riemann interpretation, the quantity
Z x
F (x) = du f (u)
a

corresponds to the surface area of between the lines y = f (x) and y = 0, from a to x. The
integral from a to x + ∆x is then
Z x+∆x
F (x + ∆x) = du f (u),
a

13
and the derivative of the function F is
Z x+∆x Z x 
′ 1
F (x) = lim du f (u) − du f (u)
∆x→0 ∆x a a
Z x+∆x
1
= lim du f (u).
∆x→0 ∆x x

The latter expression corresponds to the surface area between the lines y = f (x) and y = 0
from x to x + ∆x, which is equal to ∆x × f (x)+ higher powers in ∆x. As a consequence,
we obtain the expected result:
1
F ′ (x) = lim ∆xf (x) + (∆x)2 · · · = f (x).

∆x→0 ∆x

As a consequence of this interpretation of the integral, if two functions f, g satisfy


f (x) ≤ g(x) for a ≤ x ≤ b,
then Z b Z b
f (x)dx ≤ g(x)dx.
a a

3.2 Integration by part


The derivative of the product of two functions f, g is (f g)′ = f ′ g +f g ′, such that we obtain,
after integration Z Z
f (x)g(x) = f ′ (x)g(x)dx + f (x)g ′(x)dx,

which can be helpful to calculate one of the integrals on the right hand side, if we know
the other: Z b Z b
′ b
f (x)g(x)dx = [f (x)g(x)]a − f (x)g ′ (x)dx
a a

Example Integration by part is very useful for the integration of trigonometric functions
multiplied by power law functions, as
Z Z Z

dx x cos x = dx x(sin x) = x sin x − dx sin x = x sin x + cos x + c,

where c is a constant.

3.3 Change of variable


Suppose that one can write x = g(u), where u represents another variable with which the
integral can be calculated. We have then dx = g ′(u)du and
Z b Z g−1 (b)
f (x)dx = f (g(u))g ′(u)du,
a g −1 (a)

14
where g −1 represents the inverse function of g: x = g(u) ⇔ u = g −1 (x). For the change of
variable to be consistent, one must make sure that there is a one-to-one relation between
x and u in the interval [a, b].

Example In the following integral, one makes the change of variable u = sin φ,
for 0 ≤ φ ≤ π/2:
1 π/2 π/2
du cos φ dφ π
Z Z Z
√ = p = dφ = .
0 1 − u2 0 1 − sin2 φ 0 2

Note that, in the interval [0, π/2], we have


p
cos2 φ = | cos φ| = cos φ,

since cos φ > 0.

3.4 Improper integrals


The domain of integration of an integral might either contain a singular point, where
the function to integrate is not defined, or might not be bounded. In both cases, the
corresponding integral is said to be convergent if the result of the integration is finite, and
divergent if the result of the integration is infinite. We describe here this situation for the
integration of power law functions.

Case of a non-compact domain of integration We first show that the integral


Z ∞
dx
I1 =
1 x
diverges. For this, one can see on a graph that

X 1
I1 > ,
n=2
n

and we show, that the sum of the inverse of the integers is divergent.
Proof - from the 14th century! The sum of the inverses of integers, up to 2N , can be written:
2 N        
X 1 1 1 1 1 1 1 1 1 1
=1+ + + + + + + + +···+ +···
n=1
n 2 3 4 5 6 7 8 9 16

and satisfies
2 N        
X 1 1 1 1 1 1 1 1 1 1
>1+ + + + + + + + +···+ +···
n=1
n 2 4 4 8 8 8 8 16 16

15
The sum in each bracket is equal to 1/2, and there are N bracket, such that

2 N
X 1 N
>1+ ,
n=1
n 2

which shows that the sum goes to infinity when N goes to infinity.

As a consequence,

dx
Z
is divergent.
1 x

Consider now the integral, for a 6= 1,



dx x1−a − 1
Z
Ia = = lim
1 xa x→∞ 1 − a

As can be seen, the result depends on a:

• if a > 1 then Ia = 1/(a − 1) is finite;

• if a < 1 then Ia = +∞.

Since the integral Ia also diverges for a = 1, it converges only for a > 1.

Case of a singular point Consider the integral, for b 6= 1,


Z 1
dx 1 − x1−b
Jb = b
= lim
0 x x→0 1 − b

As can be seen, the result depends on the power b:

• if b < 1 then Jb = 1/(1 − b) is finite;

• if b > 1 then Jb = +∞.

The integral Jb also diverges for b = 1 (the surface area is the same as the previous case,
with a non-compact domain of integration), it therefore converges only for b < 1. In
general, we have: Z 1 
dx convergent if b < 1
is
z (x − z)
b divergent if b ≥ 1

Example Consider the integral



dx
Z

1 (x − 1)b (2x + 3)a

16
• at x = 1: the integrand is equivalent to 5−a /(x − 1)b , such that there is convergence
if b < 1;

• at x = ∞: the integrand is equivalent to 2−a /xa+b , such that there is convergence if


a + b > 1;

As a consequence, the integral is convergent only if b < 1 and a + b > 1 simultaneously.

17
4 Logarithm and exponential functions
4.1 Logarithm
We have seen that, for a 6= −1,

xa+1
Z
xa dx = a 6= −1,
a+1
and we still have to define this integral for a = −1. For this, we introduce the logarithm
as Z x
du
ln x = ,
1 u
so that the logarithm gives the surface area between the function 1/u and the horizontal
axis, from 1 to x > 0. The real logarithm is not defined for x < 0, since the corresponding
surface area would be infinite. The number e is defined by ln e = 1 and e ≃ 2.718281828.

Properties:
R∞ R1
• We have seen that the integrals 1
dx/x and 0
dx/x both diverge, such that

lim ln x = +∞ and lim ln x = −∞


x→∞ x→0

• From the definition of the logarithm, one can see that


Z ab Z a Z ab Z b
du du du dv
ln(ab) = = + = ln a + = ln a + ln b, (6)
1 u 1 u a u 1 v

where we make the change of variable u = av.

• One can also see that


xa x
du dv
Z Z
a
ln(x ) = = a = a ln x, (7)
1 u 1 v
where we make the change of variable u = v a .

• We have in general, for any differentiable function f ,

f ′ (x)
Z
dx = ln |f (x)| + c,
f (x)

where c is a constant

18
Logarithm in base a The logarithm in base a is defined as
ln x
loga (x) = ,
ln a
and is equal to 1 when x = a. Note that ln x = loge (x).
R
Integral of the logarithm To calculate ln x dx, one uses an integration by parts:
Z Z Z
ln x dx = (x) ln x dx = x ln x − x(ln x)′ dx = x ln x − x + c,

where c is a constant.

Limits
• When x → +∞: We show here the important limit
ln x
lim = 0, a > 0 (8)
x→+∞ xa

which means that any (positive-) power law goes quicker to infinity than the loga-
rithm, when x → +∞.
Proof For any u ≥ 1 and for any a > 0, we have
1 1
≤ 1−a/2 .
u u
Integrating this inequality from 1 to x leads to
2 2
0 < ln x ≤ (xa/2 − 1) < xa/2 .
a a
Dividing by xa gives the expected result:
ln x 2
0 < a ≤ x−a/2 → 0 when x → +∞.
x a
• When x → 0: Another important limit to know is
lim xa ln x = 0, a > 0, (9)
x→0

which means that any (positive-) power law kills the divergence of the logarithm at
x = 0.
Proof For any u satisfying 0 < u ≤ 1 and any a > 0, we have
1 1
≤ 1+a/2 .
u u
Integrating this inequality from x to 1, we obtain
2 2
0 < − ln x ≤ (x−a/2 − 1) < x−a/2 .
a a
a
Multiplying by x gives the expected result:
2
0 ≤ xa | ln x| ≤ xa/2 → 0 when x → 0.
a

19
4.2 Exponential
The exponential is defined as the inverse function of the logarithm:

y = ln x ⇐⇒ x = exp y = ey

From property (6), if we note u = ln a and v = ln b, we have

exp(u + v) = (exp u) × (exp v),

and from property (7), if we note y = ln x, we have


 a
exp y = exp(ay).

Derivative of the exponential one can differentiate the definition exp(ln x) = x, which,
using the chain rule, leads to exp′ (ln x) = x. We therefore conclude that the derivative of
the exponential is the exponential itself:

exp′ x = exp x.

Exponential of base a This function is defined as

ax = exp(x ln a),

which is consistent with the properties of the logarithm and the exponential. It’s derivative
is then
(ax )′ = (ln a)ax .
One can also define the function xx , with derivative

x ′ d 
(x ) = exp(x ln x) = (1 + ln x)xx .
dx
Limits

• From the limit (8), if we note y = ln x and b = 1/a > 0, we have


exp y
lim = +∞,
y→+∞ yb
and the exponential goes to infinity quicker than any power law.

• From the limit (9), if we note y = | ln x| and b = 1/a > 0, we have

lim y b exp(−y) = 0,
y→+∞

and the decreasing exponential kills the divergence of any power law.

20
4.3 Hyperbolic functions
The hyperbolic functions are defined as

• hyperbolic cosine: cosh x = (ex + e−x )/2;

• hyperbolic sine: sinh x = (ex − e−x )/2;

• hyperbolic tangent: tanh x = sinh x/ cosh x;

• hyperbolic cotangent: coth x = cosh x/ sinh x,

and their derivatives are given by

cosh′ x = sinh x
sinh′ x = cosh x
tanh′ x = 1 − tanh2 x
coth′ x = 1 − coth2 x

It can easily be seen that, from their definition, the functions cosh and sinh satisfy, for all
x,
cosh2 x − sinh2 x = 1.
Also, it can be easily checked that

cosh(2x) = cosh2 (x) + sinh2 (x)


sinh(2x) = 2 sinh(x) cosh(x)

21
5 Taylor expansions and series
5.1 Approximation of a function around a value of the argument
It is sometimes useful to approximate the value f (x) of a function f around f (x0 ). The
first approximation consists in replacing f (x) by a linear function p1 (polynomial of first
order, representing a straight line) in a small interval around x0 :
f (x) ≃ p1 (x) = a0 + a1 (x − x0 ).
In order to find the coefficients a0 , a1 , one imposes the constraints p1 (x0 ) = f (x0 ) and
p′1 (x0 ) = f ′ (x0 ), such that a0 = f (x0 ) and a1 = f ′ (x0 ). If one wants a better approximation,
one can choose to approximate f locally by a quadratic function p2 (polynomial of second
order, representing an arc of parabola), which is better than a straight line. One writes
then
f (x) ≃ p2 (x) = a0 + a1 (x − x0 ) + a2 (x − x0 )2 ,
and imposes the additional constraint p′′2 (x0 ) = f ′′ (x0 ), such that f ′′ (x0 ) = 2a2 . If one
wishes to push further the precision of the approximation, one can take the third order
polynomial
f (x) ≃ p3 (x) = a0 + a1 (x − x0 ) + a2 (x − x0 )2 + a3 (x − x0 )3 ,
and impose the additional constraint p′′′ ′′′ ′′′
3 (x0 ) = f (x0 ), leading to f (x0 ) = 2 × 3 × a3 , and
so on...
Going on like this finally leads to the Taylor expansion of the function f :
1 1
f (x) ≃ f (x0 ) + (x − x0 )f ′ (x0 ) + (x − x0 )2 f ′′ (x0 ) + (x − x0 )3 f ′′′ (x0 ) + · · ·,
2! 3!
where the dots represent higher powers in the difference x − x0 , which are smaller and
smaller as the order of the Taylor expansion increases. Obviously, such an expansion is
valid only if the function is differentiable a number of times large enough to reach the
desirable order.
Note that a polynomial function of order N is exactly equal to its Taylor expansion of
order N.
The power n of the first neglected term in the expansion of a function around x0 is denoted
O(x − x0 )n , and means “terms which are at least of the power n”.

5.2 Radius of convergence and series


For many functions, the Taylor expansion around x0 can be pushed to an infinite order, at
least in a vicinity of f (x0 ): if |x − x0 | < R, where R is the radius of convergence, then the
series is convergent and one can write

X 1 (n)
f (x) = f (x0 )(x − x0 )n ,
n=0
n!

22
where f (n) (x0 ) denotes the n-th derivative of f at x0 .
PN −1 n
Ratio convergence test Consider the geometric series S = n=0 q . An expression for
N
this sum can be obtained by noting that qS = S − 1 + q , and hence
1 − qN
S = 1 + q + q 2 + · · · + q N −1 =
1−q
From this expression, we see that, if q < 1, then limN →∞ S = 1/(1 − q) is finite, and if
q ≥ 1, then S diverges when NP→ ∞.
More generally, for any series n an , one can compare the ratio of two consecutive terms,
and conclude, from the behaviour of the geometric series, the following ratio convergence
test:
• if limn→∞ |an+1 /an | < 1, the series is (absolutely) convergent;

• if limn→∞ |an+1 /an | > 1, the series is divergent;

• if limn→∞ |an+1 /an | = 1, one cannot conclude, and each case has to be looked at
individually.
The convergence of the Taylor series of a function f about x0 therefore depends on |x−x0 |,
and the radius of convergence of the series is defined by
(n+1)
f (x0 ) R
lim (n) = 1. (10)
n→∞ f (x0 ) n + 1

5.3 Examples
By calculating the different derivatives of the following functions at x = 0, one can easily
see that


X x2n
cos x = (−1)n , R = ∞;
n=0
(2n)!

X x2n+1
sin x = (−1)n , R = ∞;
n=0
(2n + 1)!

X xn
exp x = , R = ∞;
n=0
n!

1 X
= (−1)n xn , R = 1;
1+x n=0

X xn+1
ln(1 + x) = (−1)n , R = 1.
n=0
n+1

23
Counter example. Consider the function f (x) = exp(−1/x). If we note y = 1/x > 0,
we have

f (0) = lim exp(−y) = 0


y→+∞
1
f ′ (0) = lim exp(−1/x) = lim y 2 exp(−y) = 0
x→0 x2 y→+∞
 
1 2
f ′′ (0) y 4 − 2y 3 exp(−y) = 0

= lim 4
− 3 exp(−1/x) = lim
x→0 x x y→+∞
etc...

As a consequence,
x2 ′′ x3
f (0) + xf ′ (0) + f (0) + f ′′′ (0) + · · · = 0,
2! 3!
and no Taylor expansion of f can be defined around 0, whereas f (0) = 0 is defined.

5.4 Expansion for a composition of functions


Suppose that two functions f1 , f2 have the following expansions around x = 0, to the order
x3 :

f1 (x) = a1 + b1 x + c1 x2 + d1 x3 + O(x4 )
f2 (x) = a2 + b2 x + c2 x2 + d2 x3 + O(x4 )

The expansion of the product f1 f2 can then be obtained up to the order 3 maximum, and
is

f1 (x)f2 (x) = a1 a2 +(a1 b2 +b1 a2 )x+(a1 c2 +b1 b2 +c1 a2 )x2 +(a1 d2 +b1 c2 +c1 b2 +d1a2 )x3 +O(x4 )

Example To calculate the expansion of tan x up to the order x5 , we first expand the
inverse of cos x to the order x5 :
−1
x2 x4

1
= 1− + + O(x6 )
cos x 2 24
x2 5
= 1+ + x4 + O(x6 ),
2 24
and then multiply by the expansion of sin x to the order x5 :
x3 x5 x2
  
5 4
tan x = x− + 1+ + x + O(x7 )
6 120 2 24
3
x 2
= x+ + x5 + O(x7 )
3 15

24
6 Vector calculus
6.1 Vectors
A vector u has a direction, given by the unit vector û, and a modulus |u|, and can be
written
u = |u|û.
n vectors u1 , · · ·, un are said to be linearly independent if
a1 u1 + · · · + an un = 0 ⇒ a1 = · · · = an = 0,
which means that these vectors point in different directions, and none of them can be
obtained by a linear combination of the others.
A vector space V of dimension d is set of vectors spanned by d independent vectors,
and is group for the addition. A set of basis vectors in V is made of d linearly independent
vectors i1 , · · ·, id , and any other vector can be decomposed onto this basis:
u = a1 i1 + · · · + ad id ,
where (a, · ··, ad) are the coordinates of u in this basis. A change of basis leads to a change
of coordinates.

Addition of vectors Vectors can be added according to the rule (for example in three
dimensions)
u1 + u2 = (x1 i + y1 j + z1 k) + (x2 i + y2 j + z2 k)
= (x1 + x2 )i + (y1 + y2 )j + (z1 + z2 )k.

Example The set of polynomials of order N is an (N + 1)-dimensional vector space.


Proof Consider the polynomials pn (x) = xn , n = 0, · · · , N, and a set of constants cn such
that, for any x, we have c0 p0 (x) + c1 p1 (x) + · · · + cN pN (x) = 0. Then we necessarily have
cn = 0, for all n, since a polynomial of degree N has at most N zeros. As a consequence,
the polynomials pn are linearly independent, and span an N-dimensional vector space,
where each vector can be written
n=N
X
P = an pn
n=0
and an are the coordinates of P on the basis {pn , n = 0, · · · , N}.

6.2 Rotations in two dimensions


(i, j) form an orthonormal basis in a plane. After a rotation of angle α, the basis has
changed to (i′ , j′ ) where (see fig.7)
i′ = cos α i + sin α j
j′ = − sin α i + cos α j. (11)

25
α

j
j’

i’ α

Figure 7: Rotation of the unit vectors

From these relations, one can easily express the vectors i, j in the basis (i′ , j′ ) by making
the inverse rotation (α → −α), which leads to
i = cos α i′ − sin α j′
j = sin α i′ + cos α j′ . (12)
The vector u = (a, b) is then transformed into the vector u′ = (a′ , b′ ) such that
u′ = a i′ + b j′ = (a cos α − b sin α)i + (a sin α + b cos α)j = a′ i + b′ j,
and therefore
a′ = a cos α − b sin α
b′ = a sin α + b cos α.
Equivalently, we also have
a = a′ cos α + b′ sin α
b = −a′ sin α + b′ cos α.
Trigonometric formulas One way to find the expression for sin(α + β) and cos(α + β)
in terms of sin α, cos α, sin β, cos β is to perform two consecutive rotation, of angle α and
β respectively, and identify the result with a rotation of angle α + β. We have seen that a
rotation of angle α of the basis vectors (i, j) gives
i′ = cos α i + sin α j
j′ = − sin α i + cos α j

26
A second rotation, of angle β, leads to

i′′ = cos β i′ + sin β j′


= (cos β cos α − sin β sin α)i + (cos β sin α + sin β cos α)j
′′
j = − sin β i′ + cos β j′
= (− sin β cos α − cos β sin α)i + (− sin β sin α + cos β cos α)j.

This must be equivalent to

i′′ = cos(α + β) i + sin(α + β) j


j′′ = − sin(α + β) i + cos(α + β) j,

such that

cos(α + β) = cos α cos β − sin α sin β


sin(α + β) = sin α cos β + cos α sin β.

Don’t learn this by heart, but rather remember how to get the result.

6.3 Scalar product


Let u and v be two vectors in a plane, with coordinates (a, b) and (c, d) respectively. From
these two vectors, one wishes to construct a quantity which is unchanged after a rotation
(= a scalar). The scalar product of u and v is defined as

u · v = |u||v| cos(u, v),

and is indeed unchanged after a simultaneous rotation of both vectors u and v. One can
easily express the scalar product in terms of the coordinates of the vectors, by doing the
following. Let’s denote by (a′ , b′ ) and (c′ , 0) the coordinates of u and v respectively, in
the orthonormal basis (i′ , j′ ) where i′ is along v. In the basis (i′ , j′ ), the scalar product is
obviously given by u · v = a′ c′ , with

a′ = a cos α − b sin α
b′ = a sin α + b cos α
c′ = c cos α − d sin α
0 = c sin α + d cos α.

Together with
c
cos α = √
c2 + d 2
−d
sin α = √ ,
c2 + d 2

27
one easily obtains a′ c′ = ac + bd. The scalar product is then given by the expression
u · v = ac + bd.
More generally, in d dimensions, the scalar product of u = (x1 , ..., xd ) and v = (y1 , ..., yd )
is
Xd
u·v = xi yi .
i=1

Example Find the equation of the plane perpendicular to the vector u = (1, 2, 1), and
containing the point A of coordinates (3, 4, 2).
Any point M of coordinates (x, y, z) of this plane is such that AM · u = 0, which reads
(x − 3) + 2(y − 4) + (z − 2) = 0 or x + 2y + z = 13.

6.4 Cross product


One often needs to define, from two vectors u, v, a third vector which is perpendicular to
u and v. The cross product u × v is
u × v = |u||v| sin(u, v)n,
where n is the unit vector perpendicular to the plane spanned by u, v, which defines the
anticlockwise direction. If (i, j, k) form the usual orthonormal basis, we have
i×j = k
j×k = i
k × i = j.
From this, it is easy to find the coordinates of the vector product of
u = (a1 , a2 , a3 ) times v = (b1 , b2 , b3 ), which are
 
a2 b3 − a3 b2
u × v =  a3 b1 − a1 b3  .
a1 b2 − a2 b1
Note that the cross product is a vector, unlike the scalar product which is a number. Finally,
the cross product is not commutative, since
u × v = −v × u

6.5 Scalar triple product


If (u, v, w) are three vectors, one defines the scalar triple product by u · (v × w), and one
can check that a cyclic permutation does not change the result:
u · (v × w) = w · (u × v) = v · (w × u)

28
e
θ

er

r
M

j θ

O i

Figure 8: Polar coordinates (r, θ) of the point M. The orientation of the basis vectors er
and eθ depend on the position of M, such that er is always along OM and eθ is the image
of er in a rotation of angle π/2.

6.6 Polar coordinates


We denote O the origin of space and (i, j, k) the orthogonal and unit basis vectors of
Euclidean coordinates (x, y, z). Points in the plane (O, i, j) can also be labeled by the
polar coordinates (r, θ) (see fig.8), such that
p
r = x2 + y 2 with 0 ≤ r < ∞
y
tan θ = with 0 ≤ θ < 2π.
x
The orthogonal and unit basis vectors (er , eθ ) in polar coordinates are defined by

er = cos θi + sin θj
eθ = − sin θi + cos θj.

Note that
der
= eθ

deθ
= −er .

29
7 Complex numbers
7.1 Introduction
Complex numbers can be seen as two-dimensional vectors in the complex plane, spanned
by the basis (1, i), where i2 = −1. In Cartesian coordinates, a complex number z can be
written
z = a × 1 + b × i = a + ib,
where a is the real part of z and b the imaginary part. The complex conjugate z ⋆ is then
defined as
z ⋆ = a − ib.
Complex numbers can be added, or multiplied, to give a new complex number:

z1 + z2 = (a1 + ib1 ) + (a2 + ib2 ) = a1 + a2 + i(b1 + b2 )


z1 z2 = (a1 + ib1 )(a2 + ib2 ) = a1 a2 − b1 b2 + i(a1 b2 + a2 b1 ).

This is because the set of complex numbers C is a group for both the addition and multi-
plication. Finally, the modulus of z is defined as
√ √
|z| = |z ⋆ | = a2 + b2 = zz ⋆ .

7.2 Complex exponential


Complex numbers, seen as two-dimensional vectors, can be expressed using polar coordi-
nates (r, θ):
z = r(cos θ + i sin θ).
Using the series expansion for cosine and sine, we find
∞ 
θ2n θ2n+1
X 
n
z = r (−1) + i(−1)n
n=0
(2n)! (2n + 1)!

(iθ)2n (iθ)2n+1
X  
= r +
n=0
(2n)! (2n + 1)!

X (iθ)n
= r
n=0
n!
= r exp(iθ).

r is the modulus of the complex z, and θ is its argument, and the last result leads to the
Euler’s formula:
cos θ + i sin θ = exp(iθ). (13)

30
From this, it is easy to find the de Moivre’s formula: noting that [exp(iθ)]m = exp(imθ),
where m is any integer, we have

(cos θ + i sin θ)m = cos(mθ) + i sin(mθ).

Example The number −1 has modulus 1 and argument π (in the interval [0; 2π[), and can
therefore be written
−1 = eiπ
This equation relates three fundamental numbers, which are 1, e, π.
One also has i = eiπ/2 , such that

ii = exp(i ln i) = exp(i × iπ/2) = e−π/2 ≃ 0.208. (14)

Note that the logarithm of a complex number z is a multi-valued function: its definition
depends on the range of angles in which the argument θ of z is considered. Indeed, if
θ → θ + 2kπ, where k is an integer, z is invariant, but its logarithm changes as:

ln z → ln z + 2ikπ.

As a result, ii as given in eq.(14) is the value when the argument of complex numbers are
defined in [0; 2π[.

7.3 Trigonometric formula


From the Euler’s formula (13), one can express cosine and sine with complex exponentials:

eiθ + e−iθ
cos θ =
2
eiθ − e−iθ
sin θ = ,
2i
and therefore one can also express the nth power of cosine and sine, in terms of cosine and
sine of n times the argument. For example:
1 2iθ 1 1
(cos θ)2 = (e + e−2iθ + 2) = + cos(2θ)
4 2 2
i 3iθ
(sin θ)3 = (e − e3iθ − 3eiθ + 3e−iθ )
8
3 1
= sin θ − sin(3θ). (15)
4 4
These formulas are useful when one needs to integrate expressions involving powers of
cosine or sine. Do not learn these expressions by heart, but derive them whenever you need
them.

31
7.4 Roots of complex numbers
Consider the equation z n = A, where A is a given complex number and z is the unknown.
In order to solve this equation, one writes

A = ρ exp(iφ)
z = r exp(iθ).

The equation to solve is then r n exp(inθ) = ρ exp(iφ), which leads to, after identification
of the modulus and the argument of both sides of the equation z n = A,

r = ρ1/n = n ρ
φ 2kπ
θ = + ,
n n
where k = 0, 1, ..., n − 1. Therefore a complex number has n roots of order n.
For example, the nth roots of the unity are
 
k
zk = exp 2iπ k = 0, 1, ..., n − 1.
n

7.5 Relation to hyperbolic functions


We have seen that a function can usually be expanded as a series of powers of the argument.
Since complex numbers can be multiplied and added, one can express a Taylor expansion
for a complex variable. It is therefore possible to understand a function of a complex
variable in terms of a series expansion. We give here two examples.
From eqs.(15), we have for any real x

sin(ix) = i sinh x
cos(ix) = cosh x,

which gives a formal way to define trigonometric functions with complex arguments.

32
8 Linear differential equations
A differential equation gives a relation between a function f and its derivatives f ′ , f ′′ , ....
This relation must be valid for any value of the argument x of f , which implies that f
must have a specific form.

8.1 First order, homogeneous


Let us consider the homogeneous equation
f ′ (x) = a(x)f (x), (16)
valid for any value of the argument x of f , and where a is a given function of x. Suppose
that f1 is a solution of eq.(16), and suppose that f2 is another solution. We have then
f1′ (x) f ′ (x)
= 2 ,
f1 (x) f2 (x)
such that, after integration,
ln |f2 (x)| = ln |f1 (x)| + k
where k is a constant. Taking the exponential of this, one finds
f2 (x) = cf1 (x),
where c = ± exp(k), and therefore f2 and f1 are proportional: the set of solutions for the
equation (16) is a one-dimensional vector space.
For the equation (16), the solution can be derived by using the separation of variables
method, which consists in writing the equation in the form
df
= a(x)dx,
f (x)
which, after integration, leads to
  x
f (x)
Z
ln = a(u)du,
f0 x0

where f0 = f (x0 ), such that


Z x 
f (x) = f0 exp a(u)du .
x0

Example Consider the equation


f ′ (x) = af (x) + b,
where a, b are constants. If one defines g(x) = f (x) + b/a, one sees that g satisfies g ′(x) =
ag(x) and one can use the previous result to find
b
f (x) = g0 exp(ax) − ,
a
where g0 = f (0) + b/a is a constant of integration.

33
8.2 Variation of parameters method
We consider now the non-homogeneous equation

f ′ (x) = a(x)f (x) + h(x), (17)

where h is a given function of x. If we suppose that f1 is a specific solution of eq.(17), we


have
[f (x) − f1 (x)]′ = a(x)[f (x) − f1 (x)],
such that the general solution of eq.(17) can be written
Z x 
f (x) = c exp a(u)du + f1 (x),
x0

where c = f (x0 ) − f1 (x0 ). In order to find a specific solution f1 , one can try
Z x 
f1 = φ(x) exp a(u)du ,
x0

where φ(x) is a function to be found. Plugging this ansatz into eq.(17), one finds
 Z x 

φ (x) = h(x) exp − a(u)du ,
x0

which, after an integration, gives the function φ.

Example Consider the equation

f ′ (x) = af (x) + 2xeax ,

where a is a constant. The general solution of the homogeneous equation is A exp(ax),


and the variation of parameters method consists in finding a specific solution of the form
φ(x) exp(ax), which leads to
φ′ (x) = 2x.
The general solution is therefore

f (x) = (A + x2 ) exp(ax).

8.3 Second order, homogeneous


We consider the following differential equation

f ′′ (x) + a(x)f ′ (x) + b(x)f (x) = 0, (18)

where a, b are functions of x. We will see with several examples that it is possible to find
a least two linearly independent solutions f1 , f2 of eq.(18). Suppose that f3 is a third

34
solution: we show now that, necessarily, f3 is a linear combination of f1 and f2 .
Proof From eq.(18), we find easily
 
fi (x)f3′′ (x) − f3 (x)fi′′ (x) + a(x) fi (x)f3′ (x) − f3 fi′ (x) = 0 i = 1, 2,

which, in terms of the Wronskians Wi (x) = fi (x)f3′ (x) − f3 (x)fi′ (x), read

Wi′ (x) + a(x)Wi (x) = 0 i = 1, 2.

These equations can be integrated to give


 Z 
Wi (x) = Ai exp − a(x)dx i = 1, 2,

and we conclude that


   
′ ′ ′ ′
A1 f2 (x)f3 (x) − f3 (x)f2 (x) = A2 f1 (x)f3 (x) − f3 (x)f1 (x) .

This equation can be written

f3′ (x) A1 f2′ (x) − A2 f1′ (x)


= ,
f3 (x) A1 f2 (x) − A2 f1 (x)

and leads, after integrating and taking the exponential, to

f3 (x) = C1 f1 (x) + C2 f2 (x),

where Ci are constants. This shows that f3 is necessarily in the vector space spanned by
f1 and f2 .

Example Consider the following differential equation

f ′′ (x) + 2af ′ (x) + bf (x) = 0, (19)

where a, b are constants. In order to find two independent solutions of this equation, we
assume the following x-dependence

f (x) = exp(zx),

where z is a constant, which can be complex. This assumption leads to

z 2 + 2az + b = 0,

which has the following solutions:

35
• if a2 > b:
z± = −a ± k,

where k = a2 − b. The general solution of the differential equation (19) is then
 
f (x) = exp(−ax) A exp(kx) + B exp(−kx)
 
= exp(−ax) C cosh(kx) + D sinh(kx) ,

where C = A + B and D = A − B are constants.

• if a2 < b
z± = −a ± ik,
and the general solution is
n o
f (x) = exp(−ax)Re à exp(ikx) + B̃ exp(−ikx)
 
= exp(−ax) A cos(kx) + B sin(kx) ,

where Ã, B̃ are complex constants, and A =Re{Ã + B̃}, B =Im{B̃ − Ã}. The latter
expression can also be written

f (x) = f0 e−ax cos(kx + φ0 ),



where f0 = A2 + B 2 and tan φ0 = −A/B.

• if a2 = b. In this case, z+ = z− and the assumption f (x) = exp(zx) gives one solution
only, which is exp(−ax). In order to find a second linearly independent solutions of
the differential equation (19), we assume the form

f (x) = x exp(wx),

where w is a constant, which leads to

2(w + a) + (w 2 + 2aw + b)x = 0.

This equation must be valid for any x, such that necessarily

w+a=0 and w 2 + 2aw + b = 0,

for which the only solution is w = −a. Finally, the general solution of the differential
equation (19) is
f (x) = (A + Bx) exp(−ax),
where A, B are constants.

36
8.4 Second order, non-homogeneous
We consider now the equation

f ′′ + a(x)f ′ + b(x)f = g(x), (20)

where g is a given function of x, and suppose that fs is a specific solution of the equation.
We have then
(f − fs )′′ + a(x)(f − fs )′ + b(x)(f − fs ) = 0,
and the results derived for a homogeneous differential equation hold for the difference
f − fs , such that the general solution of the equation (20) is

f (x) = Af1 (x) + Bf2 (x) + fs (x),

where A, B are constants, and f1 , f2 are linearly independent.

8.5 General properties


In general, the solution of a homogeneous linear differential equation of order n is an n-
dimensional vector space, spanned by n linearly independent specific solutions. The n
constants of integration can then be seen as the coordinates of the solutions in the basis
of the n linearly independent specific solutions, and their values are given by n boundary
conditions.

8.6 Separation of variables method


We finally give an example of non-linear differential equation, solved by the separation of
variables method. Consider the following equation,

f ′ (x) = x3 f 2 (x).

This can also be written, when f (x) 6= 0,


df
= x3 dx,
f2
such that the left hand side has the variable f only and the right-hand side has the variable
x only. Both sides can then be integrated separately, which leads to
1 1 x4
− + = ,
f f0 4
where f0 = f (0), and the solution is finally
f0
f (x) =
1 − f0 x4 /4

37
9 Linear algebra
9.1 Linear function
A linear function l of a variable x satisfies, by definition,
l(ax + by) = al(x) + bl(y),
for any constants a, b and any variables x, y. If x is a number, the only possibility is
l(x) = kx, (21)
where k is a constant. We will now generalize this to linear functions applied to vectors.

9.2 Matrices
We have seen in section 6 that the rotation of angle α of the vector of coordinates
u = (u1 , u2 ) in the plane leads to the vector u′ = (u′1, u′2 ) with
u′1 = u1 cos α − u2 sin α
u′2 = u1 sin α + u2 cos α.
A rotation is linear, and in order to generalize eq.(21), we would like to write it in the form
u′ = R · u,
where R represents the rotation. This can be satisfied if R is a 2×2 array with components
Rij , with i, j = 1, 2 such that
R11 = cos α R12 = − sin α R21 = sin α R22 = cos α,
where i represents the line and j represents the row. We have then
u′1 = R11 u1 + R12 u2
u′2 = R21 u1 + R22 u2 ,
which can be written     
u′1 R11 R12 u1
= ,
u′2 R21 R22 u2
where the multiplication rule is
j=2
X
u′i = Rij uj .
j=1

More generally, any linear transformation of a n-dimensional vector u = (u1 , ..., un ) can be
written in the form
j=n
X

ui = Mij uj for i = 1, ..., n,
j=1

38
where Mi,j are the components of a matrix M which represents the linear transformation.
Besides rotations, other linear transformations can be: projections, scalings, ... as well as
compositions of these.

A matrix S is said symmetric if Sij = Sji, and a matrix A is said antisymmetric if


Aij = −Aji . The product of a symmetric matrix with an antisymmetric matrix is zero.

9.3 Determinants
Suppose one has the following system of equations

x′ = ax + by
y ′ = cx + dy (22)

which can be written


     
x′ x a b
=M , with M= .
y′ y c d

One wishes to find (x, y) in terms of (x′ , y ′ ), if possible, and therefore the inverse M−1 of
the linear transformation represented by M:
   ′ 
x −1 x
=M .
y y′

The system of equations (22) is equivalent to

(ad − bc)x = dx′ − by ′


(ad − bc)y = ay ′ − cx′ , (23)

and leads to the following two cases

• if ad−bc = 0, the previous set of equations is equivalent to dx′ = by ′ , or ay ′ = cx′ , such


that the two equations of the system (22) are equivalent. There is thus an infinity
of solutions (x, y), corresponding to the straight line of equation ax + by = x′ , or
equivalently cx + dy = y ′ . In this case, the matrix M has no inverse, since there is no
one-to-one relation between (x, y) and (x′ , y ′). A typical example of such a situation
is a projection on a given straight line, since all the points on a perpendicular straight
line are projected on the same point.

• if ad − bc 6= 0, there is one solution only to the system (23), which is

dx′ − by ′ ay ′ − cx′
x= y= . (24)
ad − bc ad − bc

39
Therefore it is essential, in order to find a unique solution to the system of equations (22),
and therefore to find an inverse of the matrix M, that the determinant ad − bc of M is not
zero.
det M = ad − bc 6= 0,
or in other words: a linear function represented by the matrix M has an inverse, represented
by the matrix M−1 , if and only if det M 6= 0. From the solution (24), one can see that the
inverse of the matrix M is then
 
−1 1 d −b
M =
det M −c a

More generally, a n × n matrix has an inverse if and only if its determinant is not zero.
The expression for the determinant involves sums of products of n elements of the matrix.

9.4 Composition of linear functions


Given the two linear functions f1 and f2 , represented by the matrices M1 and M2 , with
   
a1 b1 a2 b2
M1 = M2 = ,
c1 d 1 c2 d 2

we wish to represent the composition of functions

w = f2 (v) = f2 (f1 (u)).

We have, with u = (x, y),


   
v1 a1 x + b1 y
v = M1 · u = = ,
v2 c1 x + d 1 y

and therefore
   
w1 (a1 a2 + c1 b2 )x + (b1 a2 + d1 b2 )y
w = M2 · v = = .
w2 (a1 c2 + c1 d2 )x + (b1 c2 + d1 d2 )y

This can also be written


w = M2 · M1 · u,
where the product of matrices M = M2 · M1 is defined by
X
Mi,j = M2 ik M1 kj , i, j = 1, 2
k=1,2

such that  
a1 a2 + c1 b2 b1 a2 + d1 b2
M=
a1 c2 + c1 d2 b1 c2 + d1 d2

40
Remark In general, the two operations do not commute: f2 (f1 (u)) 6= f1 (f2 (u)), and thus

M2 M1 6= M1 M2 .

Determinant of a product The determinant of M = M2 M1 is

det M = (a1 a2 + c1 b2 )(b1 c2 + d1 d2 ) − (a1 c2 + c1 d2 )(b1 a2 + d1 b2 )


= (a1 d1 − b1 c1 )(a2 d2 − b2 c2 ),

such that
det (M2 M1 ) = det M2 × det M1 = det (M1 M2 )

The previous properties are also valid for n × n matrices, and the determinant of a matrix
is also noted  
a11 · · · a1n a11 · · · a1n

det  .. = ..
. .
 


an1 · · · ann an1 · · · ann

9.5 Eigenvectors and eigenvalues


Given a matrix M, an eigenvector e of M satisfies, by definition,

M · e = λe, with e 6= 0 (25)

where the real number λ is the eigenvalue of M corresponding to e. Therefore the effect
of the matrix M on its eigenvector e is simply a rescaling, without change of direction.
A n × n matrix, operating on a n-dimensional vector space, can have at most n linearly
independent eigenvectors. In this case, these vectors can constitute a basis (e1 , ..., en ), and
the corresponding matrix, in this basis, is diagonal, with the eigenvalues being its diagonal
elements:  
λ1 0 · · · 0 0
 0 λ2 0 ··· 0 
 
∆=
 . .. 

 
 0 · · · 0 λn−1 0 
0 ··· ··· 0 λn
In this case, the determinant is simply the product of the eigenvalues

det ∆ = λ1 λ2 · · · λn

In order to find the eigenvalues of a matrix, the first step is to write the system of
equations (25) in the following way:

[M − λ1] e = 0,

41
where 1 is the unit matrix. If the corresponding matrix M − λ1 had an inverse, the only
solution to this system of equations would be e = 0. But if the initial matrix M has
eigenvectors, these are not zero, and as a consequence M − λ1 has no inverse. Therefore
its determinant vanishes:
det [M − λ1] = 0.
This determinant is polynomial in λ, and the solutions to this equation give the eigenvalues
which are expected.

Example For a 2 × 2 matrix, we have



a−λ b
= (a − λ)(d − λ) − bc = 0,
c d−λ

such that the eigenvalues λ, if there are, satisfy a quadratic equation.

42
10 Functions of several variables
10.1 Partial differentiation
If f is a function of two variables, and associates the value z = f (x, y) to the pair (x, y),
one can define the partial derivative of f with respect to x, for a fixed value y, and the
partial derivative of f with respect to y, for a fixed value x. These partial derivatives are
denoted
∂f f (x + ∆x, y) − f (x, y)
= lim
∂x ∆x→0 ∆x
∂f f (x, y + ∆y) − f (x, y)
= lim .
∂y ∆y→0 ∆y
An important property of partial derivatives concerns their commutativity:
∂2f ∂2f
= .
∂x∂y ∂y∂x
Proof From their definition, the partial derivatives satisfy
∂2f
 
1 ∂f ∂f
= lim (x, y + ∆y) − (x, y)
∂y∂x ∆y→0 ∆y ∂x ∂x
1
= lim lim [f (x + ∆x, y + ∆y) − f (x, y + ∆y) − f (x + ∆x, y) + f (x, y)]
∆y→0 ∆x→0 ∆y∆x
 
1 ∂f ∂f
= lim (x + ∆x, y) − (x, y)
∆x→0 ∆x ∂y ∂y
∂2f
= .
∂x∂y

Example For the function f (x, y) = xn cos(ay), where n and a are constants, we have
∂f
= nxn−1 cos(ay)
∂x
∂f
= −axn sin(ay),
∂y
and of course
∂2f ∂2f
= −anxn−1 sin(ay) = .
∂y∂x ∂x∂y

Nabla operator One defines the differential operator ∇ as the symbolic vector of com-
ponents  
∂ ∂ ∂
∇= , , ,
∂x ∂y ∂z

43
which has to be understood as an operator applied to a scalar quantity φ or a vector E
depending on the coordinates x, y, z:
 
∂φ ∂φ ∂φ
∇φ(x, y, z) = , ,
∂x ∂y ∂z
∂Ex ∂Ey ∂Ez
∇ · E(x, y, z) = + +
∂x ∂y ∂z
 
∂Ez ∂Ey ∂Ez ∂Ez ∂Ey ∂Ey
∇ × E(x, y, z) = − , − , −
∂y ∂z ∂x ∂x ∂x ∂x

10.2 Differential of a function of several variables


We consider here the example of two variables x, y, and formally use the notations dx and
dy for the infinitesimal limits of the increments ∆x and ∆y.
If f depends on two variables x, y, the change in f (x, y) has two contributions: one from
the cange ∆x and one from the change ∆y. A Taylor expansion on both variabls leads to
∂f
f (x + ∆x, y + ∆y) = f (x, y + ∆y) + ∆x (x, y + ∆y) + O(∆x)2
∂x
∂f ∂f  
= f (x, y) + ∆y (x, y) + ∆x (x, y) + O (∆x)2 , (∆y)2 , ∆x∆y
∂y ∂x

such that, if we note ∆f = f (x + ∆x, y + ∆y) − f (x, y), we have

∂f ∂f
∆f = ∆x + ∆y + ···, (26)
∂x ∂y
where dots represent higher orders in ∆x and ∆y. In the limit where ∆x → 0 and ∆y → 0,
we obtain the definition of the differential
∂f ∂f
df = dx + dy, (27)
∂x ∂y
which is an exact identiy, and can be interpreted as a vector in a two dimensional vector
space spanned by dx and dy, with coordinates ∂f /∂x and ∂f /∂y.

Remark It is important to distinguish the symbols for partial and total derivatives. In-
deed, in eq.(27), if y is a function of x, one can consider the function F (x) = f (x, y(x)),
which, using the chain rule, has the following derivative
df ∂f dy ∂f
F ′ (x) = = +
dx ∂x dx ∂y
∂f ∂f
= + y ′ (x) .
∂x ∂y

44
As a consequence,
∂f df
6=
∂x dx

Finally, if a function depends on N variables, one can define the partial derivatives with
respect to any of these variables, and these partial derivatives will commute among each
other.

10.3 Implicit functions


If the variables x, y, z are related by an equation of the form g(x, y, z) = 0, where g is a
differentiable function, on can define each variable as a function of the other two (besides
possible singular points). We can show then that
   −1
∂x ∂y
= ,
∂y z ∂x z
where the variable in subscript represents the one kept constant in the differentiation.
Proof Since g(x, y, z) = 0, we have
∂g ∂g ∂g
dg = dx + dy + dz = 0,
∂x ∂y ∂z
and if we consider the case z= constant, we have dz = 0, such that
   −1  −1
∂x dx ∂g . ∂g dy ∂y
= =− = =
∂y z dy dz=0 ∂y ∂x dx dz=0 ∂x z

Another important property is


     
∂x ∂y ∂z
= −1
∂y z ∂z x ∂x y

Proof We have
     
∂x ∂g . ∂g ∂y ∂g . ∂g ∂z ∂g . ∂g
=− =− =− ,
∂y z ∂y ∂x ∂z x ∂z ∂y ∂x y ∂x ∂z

such that the product of these three derivatives is -1.

10.4 Double integration


If f is a function depending on two variables x, y, one can define the function F (x) as
Z d
F (x) = f (x, y)dy,
c

45
and then the integral of F over an interval [a, b]
Z b Z b Z d  Z b Z d
I1 = F (x)dx = f (x, y)dy dx = dx dy f (x, y).
a a c a c

The product dxdy represents an infinitesimal surface are in the plane (0, x, y), and the
integral is thus the volume between the rectangular area of surface |b − a||d − c| and the
surface defined by z = f (x, y).
In the simple case where f is a product f (x, y) = φ(x)ψ(y), the latter integral is just a
product of integrals
Z b Z d Z b  Z d 
I1 = dx dy φ(x)ψ(y) = φ(x)dx × ψ(y)dy .
a c a c

More generally, one can define a double integral over any area D which is not rectangular
by Z Z
I2 = f (x, y)dxdy
D
In this case, one can perform the integrals in whichever order: first over x and then over
y or the opposite: !
Z x2 Z y2 (x)
I2 = f (x, y)dy dx,
x1 y1 (x)

where the values y1 (x), y2 (x) are the boundaries of the domain D for a given value of x, or
!
Z Zy2 x2 (y)
I2 = f (x, y)dx dy,
y1 x1 (y)

where the values x1 (y), x2 (y) are the boundaries of the domain D for a given value of y.

Example Calculate the volume of a pyramid whose base is an equilateral triangle of sides
a , and the three other faces, of equal surface area, have edges which meet orthogonally.
For this problem, let’s consider the top of the pyramid at the centre of coordinates, such
that the axises (Ox), (Oy), (Oz) are along the edges which meet orthogonally. The base is
then
√ perpendicular to the vector (1, 1, 1), and intersects√
the previous edges at the distance
a/ 2 from the top. Its equation is thus x + y + z = a/ 2. The volume is then
√ √
a/ 2 a/ 2−y  
a
Z Z
V1 = dy √ −x−y
0 0 2
Z a/√2  2
1 a
= dy √ −y
0 2 2
3
a
= √ . (28)
12 2

46
rdΘ

dr

Figure 9: The infinitesimal surface area in polar coordinates is rdrdθ

Double integral in polar coordinates The infinitesimal surface area in polar coordi-
nates is dr × rdθ (see fig(9)), and an integral over a domain D is thus
Z Z
J= f (r, θ)rdrdθ.
D

Example Calculate the volume of half a solid ball of radius R.


A sphere of radius R, centered on the origin, is given by the equation x2 + y 2 + z 2 = R2 .
This volume of half the ball is then
Z Z Z Z p
V2 = z(x, y)dxdy = R2 − x2 − y 2dxdy,
C C

where C is the disc of radius R, centered in the origin. A change of variables to polar
coordinates gives
Z R Z 2π √
V2 = rdr dθ R2 − r 2
0 0
Z R √
= 2π rdr R2 − r 2
0
 R
1 2 2 3/2
= 2π − (R − r )
3 0
2π 3
= R.
3

47
z

rd Θ
dr
Θ

r sinΘ dφ

Figure 10: The infinitesimal volume in spherical coordinates is r 2 dr sin θdθdφ

10.5 Triple integration


Triple integration is a straightforward generalization of double integration, and it can
sometimes be useful to use spherical coordinates (r, θ, φ), if the function to integrate is
expressed in terms of spherically symmetric quantities. Using these coordinates, the in-
finitesimal volume is rdθ × r sin θdφ × dr = r 2 dr sin θdθdφ (see fig.10), and an integral over
a three-dimensional domain is then
Z Z Z
r 2 dr sin θdθdφ f (r, θ, φ).
D

Example The volume of half a solid ball of radius R, which was calculated before, is easier
to calculate using spherical coordinates, and is
Z R Z π/2 Z 2π
2
V2 = r dr dθ sin θ dφ
0 0 0
3
R π/2
= × [− cos θ]0 × 2π
3
2π 3
= R
3

48

You might also like