0% found this document useful (0 votes)
15 views94 pages

LectureNotesMA2 2023-02-08

This document is a course syllabus for Mathematics 2 taught at Hamburg University of Applied Sciences. It covers topics including integral calculus, applications of integrals such as calculating areas and volumes, integration techniques, and functions with multiple arguments and values. The syllabus is divided into sections covering definite and indefinite integrals, integration methods like substitution and integration by parts, and concepts for multi-variable functions including partial derivatives, gradients, and extrema. It provides an outline of the course material and objectives to be covered.

Uploaded by

Mkn Mnk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views94 pages

LectureNotesMA2 2023-02-08

This document is a course syllabus for Mathematics 2 taught at Hamburg University of Applied Sciences. It covers topics including integral calculus, applications of integrals such as calculating areas and volumes, integration techniques, and functions with multiple arguments and values. The syllabus is divided into sections covering definite and indefinite integrals, integration methods like substitution and integration by parts, and concepts for multi-variable functions including partial derivatives, gradients, and extrema. It provides an outline of the course material and objectives to be covered.

Uploaded by

Mkn Mnk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 94

Mathematics 2

Hamburg University of Applied Sciences,

Department of Information and Electrical Engineering

Robert Heß

February 8, 2023
Contents
1. Integral calculus 5
1.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2. Definite integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3. Properties of definite integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.4. Fundamental theorem of calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5. Indefinite integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.6. Elementary integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.7. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2. Application of integrals 13
2.1. Area of trapezium on abscissa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2. Area of triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3. Area of polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4. Area of discs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5. Volume of cones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.6. Volume of spheres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.7. Surface area of spheres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.8. Mean values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.8.1. Arithmetic mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.8.2. Root mean square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.9. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3. Integration techniques 20
3.1. Improper integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.1. Infinite domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.2. Integrand with infinite image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.3. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2. Integration by substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2.1. Integration of f (ax + b) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
′ (x)
3.2.2. Integration of φφ(x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.3. Integration of f [φ(x)]φ′ (x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2.4. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.3. Integration by parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.4. Integration of absolutes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.5. Integration of rational functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5.1. Single real poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.5.2. Multiple real poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5.3. Single complex conjugate poles . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5.4. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4. Functions with multiple arguments and values 30


4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2. Definition of multiple argument functions . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3. Visualization of functions with multiple arguments . . . . . . . . . . . . . . . . . . . . 30
4.3.1. Parametric plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

2 February 8, 2023
4.3.2. Surface plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.3. Contour plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.4. Vector plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.4. Continuity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.5. Partial derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.6. Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.7. Multiple partial derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.8. Extrema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.9. Multiple value functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.10. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5. Differential equations 40
5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2. Definition of differential equations, DE . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.3. Solutions of DEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.4. Creating DEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

6. First order differential equations 46


6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2. Geometric interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.3. Separation of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.4. Variation of parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.5. Linear inhomogeneous DE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.6. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.7. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

7. Higher order linear differential equations 51


7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.2. Second order homogeneous DE with constant coefficients . . . . . . . . . . . . . . . . . 52
7.2.1. Two different real constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.2.2. Pair of complex conjugate constants . . . . . . . . . . . . . . . . . . . . . . . . 52
7.2.3. Two equal real constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.2.4. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3. Higher order homogeneous DE with constant coefficients . . . . . . . . . . . . . . . . . 54
7.4. Higher order inhomogeneous DE with constant coefficients . . . . . . . . . . . . . . . . 55
7.4.1. Polynomial source term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.4.2. Exponential source term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.4.3. Trigonometric source term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4.4. Source term as a sum of functions . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4.5. DE in resonance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.5. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

8. Combinatorics 60
8.1. Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.2. Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3. Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.4. Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.5. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

9. Probability theory 64
9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.2. Sample, sample space and event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

February 8, 2023 3
9.3. Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
9.3.1. Frequentist probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
9.3.2. Probability axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
9.3.3. Calculating with probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
9.3.4. Conditional probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
9.3.5. Independence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
9.4. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

10.Stochastic 70
10.1. Random variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.1.1. Definition of random variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.1.2. Characteristics of random variables . . . . . . . . . . . . . . . . . . . . . . . . . 71
10.1.3. Modified random variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
10.1.4. Sum of random variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
10.2. Discrete random distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.2.1. Binomial distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.2.2. Poisson distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
10.3. Continuous random distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
10.3.1. Uniform distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
10.3.2. Normal distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
10.3.3. Exponential distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
10.4. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

A. Solutions 82
A.1. Integral calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
A.2. Application of integrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
A.3. Integration techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
A.4. Functions with multiple arguments and values . . . . . . . . . . . . . . . . . . . . . . . 84
A.5. Differential equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
A.6. First order differential equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.7. Higher order linear differential equations . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.8. Combinatorics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
A.9. Probability theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
A.10.Stochastic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

Index 91

4 February 8, 2023
1. Integral calculus
1.1. Introduction The 230 V is the DC-voltage having the same
effect to an absorber obeying Ohm’s law. The
Integral calculus was first motivated by the eval- absorbed power in such an absorber is
uation of an area underneath a curve of a func-
tion. For simple functions like a constant func- U (t) U 2 (t)
P (t) = U (t) · I(t) = U (t) · =
tion or a function with a constant slope the eval- R R
uation of the surface is obvious. However, for
where t is the time, P the absorbed power, U
arbitrary functions it becomes difficult.
the voltage, I the current through the absorber
and R the resistance of the absorber.
f (x)
To find this effective voltage Ueff we need to
find the area underneath the function

Up 2
U 2 (t) = Up 2 sin2 (2π f t) = (1 − cos(4π f t))
2
with Up as the peak-voltage of 325 V and f as
the frequency of 50 Hz.
a b x
U, U 2
A way to estimate the area underneath the U 2 (t)
function is to fill it with a large number of small
well defined rectangles or squares of known size. Ueff 2
E.g. we may start with squares of 1 m2 size. If Up Up2
we can’t place any more of these 1 m2 squares
we continue with 1 dm2 squares. We continue
in the same manner until we find a sufficient t
precise solution for the given purpose.
The field of integral calculus is not limited to
areas underneath functions curves.
U (t)
Example 1.1. E.g. the mains voltage in house-
holds is said to be 230 V. If you connect an
oscilloscope to it (be careful!) you will find What is the area underneath this function?
a sine-shaped signal oscillating with frequency We are lucky and see that the area above the
f = 50 Hz and a peak-voltage of Up = 325 V. dashed line fit into the area underneath the
But where do we find the stated of 230 V? dashed line not covered by the function. Hence
we get:
U
V Up 2
325 Ueff 2 =
2
230 Up 325 V
Ueff = √ = √ ≈ 230 V
2 2

t A general approach is to evaluate the integral


10 20 ms over a period T of the frequency f = T1 :
Z T
2 1
Ueff = U 2 (t) dt
T 0

February 8, 2023 5
For a sine wave we get: f (x) Riemann sum:

1 T 2 2
Z
2
Ueff = Up sin (2πf t) dt
T 0
Up2 T 1 1
Z
= − cos(4πf t) dt

∆x f (x0 )

∆x f (x1 )

∆x f (x2 )
T 0 2 2
Up2 T 1 Up2 T 1
Z Z
= dt − cos(4πf t) dt

...

...
T 0 2 T 0 2
Up2 T Up2 Up2 x0 =a x1 x2 x3 x4 x5 =b x
= · −
2 ·0=
T T 2 ∆x ∆x ∆x ∆x ∆x
Up
Ueff = √
2 f (x) upper sum:

There are many other applications in science


and engineering where we need integration as a
standard tool. This and the subsequent chap-
ters give an introduction into integral calculus.

x0 =a x1 x2 x3 x4 x5 =b x
1.2. Definite integral
f (x) lower sum:
We approach integral calculus by replacing the
investigated function by a series of rectangles.
The word definite in this context means that we
focus on a given interval on the abscissa, i.e. a
given start point a and a given end point b.
We define three types of rectangles to replace
the area underneath a function:

Definition 1.1 (Riemann sum). Let the do- x0 =a x1 x2 x3 x4 x5 =b x


main of the function f : [a, b] → R be subdi-
vided in n equal spaced steps ∆x = b−a n such The subdivisions do not necessary have to
that: xk = a + k∆x for k ∈ {0, 1, . . . , n}. We have equal size. However, for the sake of easy
define argument we stick to equal sized subdivisions.
n−1
X For the Riemann sum we defined the top left
Rf (n) = ∆xf (xk )
corner of each rectangle to meet the function
k=0
value. However, we may have taken any point
as the Riemann sum, at the upper edge to meet the function value.
For rectangles below the abscissa we take neg-
n−1
X ative values. I.e. we may get zero sum if the
Uf (n) = ∆x sup (f (x)) areas above and below the abscissa “compen-
k=0 [xk ,xk+1 ]
sate”.
as the upper sum and Example 1.2. What is the Riemann-, upper-
and lower sum for the function f : R → R, x 7→
n−1
X x2 on the interval [−2, 2] for four equal sized
Lf (n) = ∆x inf (f (x)) steps?
[xk ,xk+1 ]
k=0
b−a 2 − (−2)
∆x = = =1
as the lower sum. ◁ n 4
xk = a + k∆x = −2 + 1 · k = k − 2

6 February 8, 2023
Riemann sum: f (x) f (x)
4

−2 0 2 x

n−1 3 x
X X a b
Rf (4) = ∆xf (xk ) = 1 · (k − 2)2
k=0 k=0
f (x)
=4+1+0+1=6

upper sum:
f (x)
4

−2 0 2 x a b x

n−1
X Definition 1.2 (Convergent Riemann sum).
Uf (4) = ∆x sup f (x) Let f : [a, b] → R with the domain equally sub-
[xk ,xk+1 ]
k=0
divided into n intervals of length ∆x = b−a n .
= 4 + 1 + 1 + 4 = 10 If for increasing n the difference of the upper
and lower sum is convergent towards zero we
lower sum: f (x) say the sequence of Riemann sums (Rf (n)) is
4 convergent. I.e.

lim {Uf (n) − Lf (n)} = 0


2 n→∞

If (Rf (n)) is convergent, we say f is an inte-


x grable function. ◁
−2 0 2
Remark: There are integrable functions where
n−1
X the sequence of Riemann sums is not conver-
Lf (4) = ∆x inf f (x) gent. However, for our purposes the Riemann
[xk ,xk+1 ]
k=0 integral is a sufficient explanation. The inter-
=1+0+0+1=2 ested student may look for Lebesgue integration
to find more details.

Definition 1.3 (Definite integral). For a con-
Obviously the lower sum is less or equal to vergent sequence of Riemann sums (Rf (n)) we
the Riemann sum, which again is less or equal define the definite integral (or Riemann inte-
to the upper sum: gral ) with:
Z b
Lf (n) ≤ Rf (n) ≤ Uf (n)
f (x)dx = lim Rf (n)
a n→∞
If we increase the number of steps n to divide
the interval [a, b] the upper sum decreases and We call the function f (x) the integrand , the in-
the lower sum increases. The larger n becomes terval [a, b] the domain of integration and the
the closer the three sums converge towards the limits a and b the limits of integration or the
area underneath the curve. lower limit and upper limit, respectively. ◁

February 8, 2023 7
n−1
Now we want to evaluate the definite integral X
of some integrands by applying the Riemann = ∆x(a + k∆x)
k=0
sum:
n−1
X n−1
X
Example 1.3. What is the definite integral of = ∆x a 1 + ∆x2 k
a constant function f (x) = 1 over the interval k=0 k=0

[a, b]? n(n − 1)


= ∆x a n + ∆x2
2
b − a 2 n(n − 1)
 
f (x) b−a
= an +
n n 2
1 2 2
(b − a) n − n
= (b − a)a + · 2
2 | n
{z }
−→ 1
n→∞

2ba − 2a2 b2 − 2ba + a2


a x −→ +
b n→∞ 2 2
b2 − a2
Geometrically we see that the surface under- =
2
neath the curve equals b−a. However, we apply
b
b2 − a2
Z
the Riemann integral: I.e. x dx = ◁
a 2
Z b n−1
Example 1.5. What is the definite integral of
X
f (x)dx = lim Rf (n) = lim ∆xf (xk )
a n→∞ n→∞
k=0 f (x) = x2 over the interval [a, b]?
n−1
f (x)
X
b−a
= lim n f (a + k b−a
n )
n→∞
k=0
n−1
X n−1
X
b−a
= lim n = lim b−a 1
n→∞ n→∞ n
k=0 k=0
= lim b−a n = lim (b − a)
n→∞ n n→∞
=b−a
Z b
a b x
I.e. 1 dx = b − a ◁
a
We again apply the Riemann integral:
Example 1.4. What is the definite integral of
f (x) = x over the interval [a, b]? n−1
X n−1
X
Rf (n) = ∆xf (xk ) = ∆x xk 2
f (x) k=0 k=0
n−1
X
= ∆x(a + k∆x)2
k=0
n−1
X
= ∆x (a2 + 2ak∆x + k 2 ∆x2 )
k=0
n−1
X n−1
X
2 2 3
= ∆xa n + 2a∆x k + ∆x k2
x k=0 k=0
a b
after some conversion:
(b−a)2 a
We again apply the Riemann integral: = (b − a)2 + (b − a)2 a − n
(b−a)3 (b−a)3 (b−a)3
n−1
X n−1
X + 3 − 2n + 6n2
Rf (n) = ∆xf (xk ) = ∆x xk 3
−→ (b − a)2 + (b − a)2 a + (b−a)
3
k=0 k=0 n→∞

8 February 8, 2023
b3 − a3 0 1
Z Z
= =− x dx + x dx
3 −1 0
2
0 − (−1)2 12 − 02
b
b3 − a3
Z
I.e. 2
x dx = ◁ =− +
3 2 2
a 1 1
= + =1
Could it be, that we found some sort of pat- 2 2
tern Z b
bn+1 − an+1 |x|
xn dx = ?
a n+1 1
We will see later that it is true.

Theorem 1.4 (Continuous functions are inte-


grable). For continuous functions f : [a, b] →
R the sequence of Riemann sums (Rf (n)) is −1 0 1 x
convergent, i.e. continuous functions are inte-
grable. ◁ ◁

Remark: However, not all integrable functions Example 1.7. Integrate the function f over
are continuous. We look at this later. the interval [0, 2]: f : R → R, x 7→ 3x2 − 2
Z 2 Z 2 Z 2
1.3. Properties of definite 3x2 − 2 dx = 3 x2 dx − 2 dx
0 0 0
integrals 23 − 03
=3 − 2(2 − 0) = 4
3
We now derive some properties of definite inte-
grals: f (x)
Theorem 1.5 (Properties of definite integrals).
Let I ⊂ R be a closed interval, a, b, c ∈ I with 10
a < b < c, λ ∈ R and f, g : I → R be integrable
functions. We then have negative
5 area
Z b Z c Z c
• f (x)dx + f (x)dx = f (x)dx
a b a
1 2 x
Z b
• (f (x) + g(x))dx 0
a Z b Z b
= f (x)dx + g(x)dx ◁
a a
Z b Z b
• λf (x)dx = λ f (x)dx 1.4. Fundamental theorem of
a a
calculus
Z b Z b
• f (x)dx ≤ |f (x)| dx
a a We now take the upper limit as a variable x
and replace the lower limit a by x0 . Hence, the
Z b Z a
• f (x)dx = − f (x)dx integral becomes a function of x:
a b Z x
◁ F (x) = f (x′ )dx′
x0

Example 1.6. Integrate the function f over If we rewrite the results of the previous three
the interval [−1, 1]: f : R → R, x 7→ |x| examples we get:
Z 1 Z 0 Z 1 Z x
|x| dx = −x dx + x dx ex. 1.3: 1 dx′ = x − x0
−1 −1 0 x0

February 8, 2023 9
x
x2 − x0 2 x2 x0 2
Z
ex. 1.4: x′ dx′ = = − sign(x)
x0 2 2 2 1
x
x3 − x0 3 x3 x0 3
Z
ex. 1.5: x′2 dx′ = = −
x0 3 3 3 x
An interesting fact is, that the first deriva- −1
tives of the results bring us back to the func-
tions we integrated in the first place. Please
note that this is true for any lower limit x0 . F (x)

d(x − x0 )
example 1.3: =1
dx
2 2
d x −x
2
0
example 1.4: =x
dx
3 3
d x −x 0 x
example 1.5: 3
= x2
dx

This leads us to the first part of the funda-
mental theorem of calculus: Hence, the first part of the fundamental the-
orem of calculus is limited to continuous func-
Theorem 1.6 (First fundamental theorem of tions.
calculus). Let f : [a, b] → R be a continuous The second part of the fundamental theorem
function. If of calculus avoids differentiation and, hence, can
Z x be extended to any integrable function:
F (x) = f (x′ ) dx′
a Theorem 1.7 (Second fundamental theorem of
then we have for any x ∈ (a, b) calculus). Let f : [a, b] → R be an integrable
function and F : [a, b] → R,
d Z x
F (x) = f (x)
dx F (x) = f (x′ )dx′
x0

be an integral of f . Then we have for any x0 ∈
The fundamental theorem of calculus states, [a, b]:
that integration is somehow the inversion of dif- Z b
ferentiation. The only difference is at some dis- f (x)dx = F (b) − F (a)
a
continuities where the integral is defined but the ◁
derivative of the integral does not lead us back
to the original function.
Example 1.8. For the function 1.5. Indefinite integral
Yet we integrated functions over intervals with

 R→R
lower and upper limits. Now we want to find

x 7→ 1 for x > 0

sign(x) : a more general way to integrate functions. To

 x 7→ 0 for x = 0

x 7→ −1 for x < 0 do so we first need the so called primitive of a
function:
the integral F (x) with lower limit zero is
Definition 1.8 (Primitive function). For a
Z x
function f : [a, b] → R any function F : [a, b] →
F (x) = sign(x′ ) dx′ = |x|
0 R with derivative equal to f is called a primitive
function of f , i.e.
The derivative of F is not defined for at x = 0
since is it not possible to evaluate the slope at d
F (x) = f (x)
x = 0. dx
dF (x) Other terms for F are antiderivative and in-
= sign(x) for x ̸= 0 verse derivative. ◁
dx

10 February 8, 2023
When searching for a primitive F of a given 1.6. Elementary integrals
function f we remember that the derivative f
at any point x gives the slope of F at this point. Elementary integrals can be derived by invert-
But since we do not know the value F at this ing derivatives. Some of them are listed in the
point we may draw little lines indicating the table below. The constant C has been left out
slope at different values of F . A primitive then and must be added to all integrals except the
is a curve having the desired slope at all values first.
of x. Unfortunately there are many primitives
fulfilling these requirements: f (x) F (x) =
R
f (x) dx
y 0 C
xa+1 for a ∈ Z, a ̸= −1
xa
f a+1 or a ∈ R, a ̸= −1, x ≥ 0

F3 √ 2 x3
x for x ≥ 0
3
1
F2 ln |x|
x
x ex ex
F1 ax
ax for a ∈ R, a > 0
ln a
ln x x ln x − x for x > 0
cos(x) sin(x)
We take the notation we used earlier: sin(x) − cos(x)
Z x
F (x) = f (x′ )dx′ cosh(x) sinh(x)
x0 sinh(x) cosh(x)
Since the upper limit is given in the integral 1
arctan(x)
function we may write: x2 + 1
−1
Z
2
arccot(x)
F (x) = f (x)dx x +1
x0

A change of the lower limit x0 results in an Remark: For a definite integral we write:
offset C to the primitive. I.e. when changing
the lower limit, the primitive remains the same
Z b h ib
f (x) dx = F (x) = F (b) − F (a)
except for a vertical shift. a a
Z
f (x) dx = F (x) − F (x0 ) = F (x) + C Here the constant C cancels out.
x0

We remove the lower limit and take the constant


C as a reminder. This leads us to the indefinite 1.7. Problems
integral:
Z
f (x)dx = F (x) + C Problem 1.1: For f : R → R, x 7→ sin(x)
evaluate the Riemann-, upper- and lower-sum
Remark: From mathematical point of view the on the interval [0, π] in four equal sized steps.
constant C acts rather as a reminder than a
mathematical variable. E.g. under some cir- Problem 1.2: Evaluate the Riemann-, upper-
cumstances we add two of these constants into and lower sum for the function f : R → R, x 7→
a new constant with the same name: 2x on the interval [0, 4]. Divide the domain into
Z Z Z 4 sub-intervals of equal size.
(f1 + f2 )dx = f1 dx + f2 dx
Problem 1.3: Repeat the previous problem
= (F1 + C) + (F2 + C) for 1, 10, 100, 1000 and infinite number of sub-
= (F1 + F2 ) + C intervals.

February 8, 2023 11
Z Z
Problem 1.4: For x ∈ R solve the following 2. a dx 6. π x dx
integrals by applying Riemann sums. Z Z
Z 3 Z 2 3. (x2 − 1) dx 7. 2 cosh(x) dx
1. 2x dx 5. (x2 + x) dx Z Z
1 0
Z 2 Z b 4. 3ex dx 8. 1
2 sinh(x) dx
2. 5x dx 6. (2x2 − x) dx
0 0
Z 4 Z b
3. x dx 7. (x2 + 2) dx Problem 1.9: For x ∈ R solve the following
−1 a integrals.
Z 3 Z a
(x − 1) dx (x2 + 2) dx
Z 3 Z π
4. 8.
2 b 1. |x − 1| dx 5. sin |x| dx
0 −π
Z 2 Z
Problem 1.5: For x ∈ R solve the following 2. |x2 − 1| dx 6. cos(2π x) dx
integrals. Consider the properties of definite in- Z −2
Z
tegrals. 2
3. |x | dx 7. ej x dx
Z 3 Z 2
1. |x| dx 5. (x2 − |x|) dx 4
Z Z
−2 −2 4. e|x| dx 8. (1 + tan2 (3x)) dx
Z −2 Z −1 −1
2. |x| dx 6. |x| dx
3 1
Z 3 Z 2b Problem 1.10: For x ∈ R>0 solve the follow-
3. | − x| dx 7. x dx ing integrals.
−2 a

Z Z
Z 1 Z b 1
4. (|x| + x) dx 8. x2 dx 1. x dx 5. √
3
dx
x 2
−1 −a Z √ Z
2. x3 dx 6. ln(x) dx
Problem 1.6: For t ∈ R solve the following Z Z
integrals. Consider the fundamental theorem of 1
3. √ dx 7. log10 (x) dx
calculus. x

Z Z
Z x Z x 3
4. x dx 8. log2 (x) dx
1. 3 t2 dt 5. 2π cos(2π t) dt
x0 x0
Z x Z x
2. cos(t) dt 6. 2jπf e2jπf t dt
x0 x0
Z x Z x
2t cos t2 dt

3. sin(t) dt 7.
Zx0x Zx0x
et dt 3t2 sin t3 dt

4. 8.
x0 x0

Problem 1.7: For x ∈ R find a primitive for


each of the following functions:
f1 (x) = 1 f5 (x) = sin(x)
f2 (x) = 2x f6 (x) = cos(x)
2
f3 (x) = x f7 (x) = ex
f4 (x) = x3 f8 (x) = x2 − x + 1

Problem 1.8: For x ∈ R solve the following


integrals.
Z Z
1. 0 dx 5. 5x dx

12 February 8, 2023
2. Application of integrals
In this chapter we want to apply integrals to The results must be taken with care: If the
some geometric applications. Some of them can points are below the abscissa, the area is nega-
be solved without integral calculus, however, we tive:
still try to solve them with integrals. y
x1 x2
2.1. Area of trapezium on x
A is negative
abscissa y2
p2
A trapezium has four edges with two of them y1
p1
being parallel. We want to analyse a trapezium
with one edge on the abscissa of a Cartesian co- Positive points integrated from right to left,
ordinate system and two other edges being per- i.e. with x1 > x2 will also result in a negative
pendicular on the abscissa. Hence, two corners area:
have a right angle.
y integration direction
y
p1
p2 y1
y2 p2
y2
p1 A is negative
y1
x2 x1 x
A
Finally, if one of the points is above and the
x1 x2 x other below the abscissa, parts of the area are
negative and other parts are positive:
We express the line between the two points y integration direction
p1 and p2 by a linear function:
p2
y2
f (x) = mx + b
positive area
y2 − y1
m=
x2 − x1 x1 +
y1 x2 − y2 x1 x2 x
b = y1 − mx1 = −
x2 − x1
negative area
Now we evaluate the area underneath the func- y1
p1
tion by taking the definite integral between x1
and x2 : integration direction
y
Z x2 Z x2
A= f (x) dx = (mx + b) dx p1
x1
y1
Z x2 Zx1x2 negative area
=m x dx + b dx
x1 x1 x2 −
x2 2 − x12
x1 x
=m
2
+ b(x2 − x1 ) +
··· positive area
y2
A = 12 (y2 + y1 )(x2 − x1 ) p2

February 8, 2023 13
Although the linear function between p1 and We come to the same result, if we write the
p2 is not defined for x1 = x2 , the integral re- three points into a 3 × 3-Matrix and evaluate 21
mains valid and results in zero: of the determinant:
 
x1 = x2 ⇒ A=0 1 x1 y1
1
A = det  1 x2 y2 
2
1 x3 y3
2.2. Area of triangles 
1 1 1

1
= det  x1 x2 x3 
What is the area of a triangle with its corners 2
y1 y2 y3
being at arbitrary points p1 , p2 and p3 ?

y 2.3. Area of polygons


p3
y3
We may extend the previous result to polygons
with an arbitrary number of corners.
y2 p2
y
y1 p5
p1 y5
p4
y4
x1 x3 x2 x
y3 p3
For a triangle as sketched above we take the y1
p1
area A as a combination of the three partial y2
p2
areas A1 , A2 and A3 :
x1 x5 x2 x4 x3 x
y y y
p3 p3 p3
f2 We have to add the integrals of all linear func-
f1 p2 p2
f3
p2
tions connecting the points:
p1 p1 p1
A1 A2 A3
x x x Z xn n−1
X Z xk
A= fn (x) dx + fk (x) dx
x1 k=1 xk+1
n−1
(
1 X
A = A1 + A2 − A3 = y1 (xn − x2 ) + yk (xk−1 − xk+1 )
Z x3 Z x2 2
k=2
= f1 (x) dx + f2 (x) dx )
x1 x3
Z x2 + yn (xn−1 − x1 )
− f3 (x) dx
x1
Z x3 Z x2 Again, with points arranged counter clock-
= f1 (x) dx + f2 (x) dx wise we get a positive area and a negative area
x1 x3
Z x1 for points arranged clockwise. If some of the
+ f3 (x) dx lines connecting the points cross each other, we
x2
get positive and negative area fractions.
= 12 {(y3 + y1 )(x3 − x1 ) + (y2 + y3 )(x2 − x3 )
+ (y1 + y2 )(x1 − x2 )}
y1 (x3 − x2 ) + y2 (x1 − x3 ) + y3 (x2 − x1 ) 2.4. Area of discs
=
2
From textbooks we know the area A of a disc
The area is positive if the points are arranged with radius r to be:
counter clockwise, and negative if the points are
arranged clockwise. A = πr2

14 February 8, 2023
r
where π is the ratio of the circumference of a With ∆r = n and rk = k∆r we get:
disc to its diameter. But where does this equa-
tion come from? We want to use infinite sums n−1
X n−1
X
and integral calculus to derive this equation. AL (n) = 2πrk ∆r = 2π k∆r∆r
k=0 k=0
y n−1
X r2 n(n − 1)
= 2π∆r2 k = 2π ·
n2 2
k=0
r n−1
= πr2 −→ πr2
n n→∞
n n
x X X
AU (n) = 2πrk ∆r = 2π k∆r∆r
k=1 k=1
n
X r2 n(n + 1)
= 2π∆r2 k = 2π ·
n2 2
k=1
n+1
We split the disc into n rings: = πr2 −→ πr2
n n→∞
y
Since the true surface of the disc Adisk is not
less than AL and not larger than AU we were
r1 able to prove:
r2

x Adisk = πr2

Another approach is to plot the circumference


as a function the radius:

The surface of a ring Ar with radii r1 and r2 f (x)


is limited by:
2πr
2πr1 (r2 − r1 ) ≤ Ar ≤ 2πr2 (r2 − r1 )

The left term is the area of an rectangle of


length 2πr1 and width r2 − r1 . The right term
is the area of an rectangle of length 2πr2 and Adisc
width r2 − r1 .
0 x
0 r
left term: 2πr1
r2 − r1
The area under the function equals the area
right term: 2πr2 of the disc. Hence, we take the integral from
zero to the radius of the disc:
r2 − r1

r r
r 2 − 02
Z Z
The areas of the two rectangles act as a lower Adisc = 2πx dx = 2π x dx = 2π
and upper limit for the true area of the ring. 0 0 2
2
Adding the area of all rings based on the inner = πr
radius leads us to the total area AL which is not
larger than the true area of the disk Adisc . Again, we find the equation for the area of a
Adding the area of all rings based on the outer disc to be Adisc = πr2 . The application of inte-
radius leads us to the total area AU which is not gral calculus led us more rapid to the equation
less than the true area of the disk Adisc . under question.

February 8, 2023 15
2.5. Volume of cones given by x and y, respectively. Due to the
Pythagorean theorem we get
We assume a right circular cone with height h
and radius r, i.e. a cone with a disc of radius y 2 = r 2 − x2
r as base and the apex being with distance h
perpendicular above the centre of the base. x

r′
apex
h

y
base
r

We may imagine the cone as a pile of thin


discs with decreasing areas towards the apex of We integrate over all discs from −r to r:
the cone. Plotting the area of the discs as a Z r Z r
function of distance to the apex results in the 2
Vsphere = πy dx = π(r2 − x2 ) dx
parabola where the radius r′ of the discs in-
Z−r
r Z −r
r
crease with distance to the apex:
= πr2 dx − πx2 dx
−r −r
 rx 2 πr2 2
f (x) = πr′2 = π
Z r Z r
= x 2
h h2 = πr dx − π x2 dx
−r −r
A r3 − (−r)3
= πr2 (r − (−r)) − π
3
Abase 3 2 3 4 3
= 2πr − 3 πr = 3 πr

2.7. Surface area of spheres


Vcone Let us first evaluate the volume of the mantle of
a sphere (like the skin of a football). The vol-
0 x
0 h ume of the mantle is the volume of the sphere
surrounding the mantle minus the the volume
We now integrate from the apex to the base: of the sphere inside the mantle. With r as the
outer radius of the mantle and ∆r as the thick-
Z h 2
πr2 h 2
Z
πr 2 ness of the mantle we get:
Vcone = 2
x dx = 2 x dx
0 h h 0
4π 3 4π
πr2 h3 − 03 1 Vmantle = r − (r − ∆r)3
= 2 · = πr2 h 3 3
h 3 3
This is the equation for the volume of a right
circular cone with height h and base radius r. r
∆r
It is one third of the volume of a cylinder with
same height and radius.

2.6. Volume of spheres


We imagine a sphere with radius r as a pile For a thin mantle we may approximate the vol-
of discs. Position and radius of the discs are ume of the mantle by the outer surface area of

16 February 8, 2023
the sphere multiplied by the thickness of the 2.8.1. Arithmetic mean
mantle:
What is the average income of an electrical en-
Vmantle
Vmantle ≈ Asphere ∆r ⇒ Asphere ≈ gineer in his/her first job? What is the mean
∆r temperature in my office during the day?
When reducing ∆r towards zero we get a precise For questions like this the arithmetic mean x
relationship: is the value of interest. For discrete values xk ,
Vmantle k = 1 . . . n the arithmetic mean is defined by:
Asphere = lim
∆r→0 ∆r n
4π r3 − (r − ∆r)3 1X
= lim · x= xk
∆r→0 3 ∆r n
k=1
4π 3r2 ∆r − 3r∆r2 + ∆r3
= lim To evaluate the arithmetic mean y of a func-
3 ∆r→0 ∆r
4π tion y(x) an integral must be resolved:
= lim 3r2 − 3r∆r + ∆r2 = 4πr2
3 ∆r→0 Z x2
1
Another approach is to integrate directly over y= y(x) dx
x2 − x1 x1
the surface. We subdivide the surface into an
infinite number of rings. Each ring has a width For functions with positive and negative val-
dw, a circumference lC and an area dA. The ues sometimes the absolute of the functions is
total surface area of the sphere is the integral used to evaluate the arithmetic mean:
over the ring surfaces dA. Z x2
1
y y= |y(x)| dx
x2 − x1 x1
dw
E.g. what is the arithmetic mean of a sine wave
dφ with amplitude y = ŷ sin(x)? The sine wave is
r r′ periodic, hence, integrating over one period 2π
φ is sufficient. Not taking the absolute of y would
x result in a zero mean value:
Z 2π
1 ŷ
y= ŷ sin(x) dx = [− cos(x)]2π
0
2π 0 2π

= (−1 + 1) = 0

Here we must integrate over the absolute of the
sine wave:
dw = rdφ
lC = 2πr′ = 2πr sin φ
Z 2π
1
y= |ŷ sin(x)| dx
dA = lC dw = 2πr sin φ rdφ = 2πr2 sin φ dφ 2π 0
Z π Z 2π
Z π Z π ŷ ŷ
Asphere = dA = 2πr 2
sin φ dφ = sin(x) dx + − sin(x) dx
0 0
2π 0 2π π
= 2πr 2
[− cos φ]π0 = 2πr2 [1 + 1] = 4πr2 ŷ ŷ
= [− cos(x)]π0 + [cos(x)]2π
π
2π 2π
ŷ ŷ 2ŷ
2.8. Mean values = (1 + 1) + (1 + 1) = ≈ 0.634 ŷ
2π 2π π
In many situations mean or average values are of
2.8.2. Root mean square
interest. Examples are the average salary, the
mean temperature, the mean voltage or mean In engineering often not a signal itself but the
absorbed dose. effect of a signal is of interest. In many situa-
Depending on the type of question different tions the effect of a signal is proportional to its
types of mean values are required. In this sec- square value. Here the root mean square value
tion two types of mean values are investigated. is a useful quantity. The term describes the

February 8, 2023 17
equation to evaluate the root mean square ỹ of 25 cm
a function y(x):

s Z x2
1
ỹ = y 2 (x) dx 15 cm
x2 − x1 x1

As an example we want to evaluate the root


mean square value of a sine wave with ampli-
tude ŷ. Since the sine wave is periodic it is Problem 2.2: Find the area of a regular oc-
sufficient to integrate over one period: tagon with an outer diameter of 8 cm. (Hint:
Make use of the symmetry of the octagon.)
s
Z 2π
1
ỹ = ŷ 2 sin2 (x) dx
2π 0
s 8 cm

ŷ 2
Z
1
= (1 − cos(2x)) dx

0 2
s Z
2π Z 2π
ŷ 2

= 1 dx − cos(2x) dx
4π 0 0
Problem 2.3: Find an equation for the area
v
u
u ŷ 2  2π !
2π 1 of a regular polygon with n corners placed on a
= t [x]0 − sin(2x)
4π 2 0 circle with diameter d. (Hint: Make use of the
r symmetry of regular polygons.)
ŷ 2
= (2π − 0 + 0 − 0) n=3 n=4 n=5 n=6 n=7
r 4π
ŷ 2 ŷ d
= = √ ≈ 0.707 ŷ
2 2

This is an important relationship in electrical Problem 2.4: We derived the volume of a


engineering: Connecting an AC-voltage with right circular cone with height h and base ra-
amplitude û to a resistor will absorb the same dius r as V = 13 πr2 h by a definite integral. Ver-
amount of power ify this equation by applying upper- and lower
√ as connecting a DC-voltage
with value û/ 2 to the same resistor. sums for a pile of discs and decreasing its thick-
ness towards zero (i.e. increasing the number of
In Germany the mains voltage in households
disks toward infinity).
is ũ = 230 V. This is the root mean square
value of the supplied AC-voltage. Hence, √ the Problem 2.5: Evaluate the volume of a right
amplitude of the AC voltage is: û = ũ · 2 ≈ circular frustum with height h, base radius r1
325 V, see example 1.1. and radius of upper plane r2 by integral calcu-
lus.
r2

2.9. Problems
h
r1
Problem 2.1: You order 500 fancy post cards
printed on 120 g/m2 carton. The shape of the
cards are given by the following drawing, where
the thin grid lines have a distance of 1 cm. What Problem 2.6: For a sphere with radius r we
is the mass m of all postcards in kg? know the surface area to be A = 4πr2 . The

18 February 8, 2023
volume of a sphere may be evaluated by a sum
of empty spheres with increasing radius rk and
wall thickness ∆r.

1. Find the equation for the lower sum VL (n)


by using the surface area 4πrk2 and wall
thickness ∆r.

2. Find the equation for the upper sum VU (n).

3. Evaluate the limit towards zero wall thick-


ness ∆r → 0 to verify the volume of a
sphere to be V = 43 πr3 .

4. Derive the volume of the sphere by inte-


grating the surface area over the radius.

Problem 2.7: For a square signal u(t) with


amplitude ±û evaluate the arithmetic mean and
the root mean square value.

u(t)

0
t

Problem 2.8: For a triangle signal u(t) with


amplitude ±û evaluate the arithmetic mean and
the root mean square value.

u(t)

0
t

February 8, 2023 19
3. Integration techniques
3.1. Improper integrals the upper limit towards infinity:
Z ∞ Z b
When integrating functions we sometimes have 1 1
dx = lim dx
to deal with an infinite domain or image. In 1 x b→∞ 1 x
both cases the integral may or may not con- = lim [ln |x|]b1
verge. We investigate the limit towards these b→∞

points to study the behaviour of the integrals. = lim (ln |b| − ln |1|)
b→∞
=∞−0=∞
3.1.1. Infinite domain
y
To demonstrate the behaviour of integrals with
infinite domain we show two examples, one be- 2
ing convergent, the other divergent:
Z ∞
Example 3.1. e−x dx =?
0 1
We take the limit of the definite integral with
the upper limit towards infinity:
Z ∞ Z b 0 x
e −x
dx = lim e −x
dx 0 1 b
0 b→∞ 0
b
= lim −e−x 0 ◁

b→∞
In this example we again have a function that
 
−b −0
= lim −e − (−e )
b→∞
  approaches zero towards infinity, however, here
= lim 1 − e−b = 1 − 0 = 1 the integral is infinite. It depends on how the
b→∞ function tends towards zero. The exponential
y function e−x converges faster towards zero than
the reciprocal function x−1 .
1
3.1.2. Integrand with infinite image
Care must be taken at points of discontinuity.
For finite values the integral is convergent. For
infinite values the integral may or may not con-
verge.
0 x The next two examples show integrals with
0 b infinite values, one of them being convergent the
other being divergent. We use limits towards

the point of discontinuity.
Although the interval on the domain is infi- Z 2
1
nite the integral in this example is finite. Is this Example 3.3. √ dx =?
0 x
because the function approaches zero, i.e. has We take the limit of the definite integral with
a limit of zero towards infinity? Let’s look at the lower limit towards zero:
another example: Z 2 Z 2
1 1
Z ∞
1 √ dx = lim √ dx
Example 3.2. dx =? 0 x a→0+ a x
1 x  √ 2
We take the limit of the definite integral with = lim 2 x a
a→0+

20 February 8, 2023
 √ √ 
= lim 2 2 − 2 a We are tempted to use the integral ln |x| + C
a→0+
√ √ and to evaluate the difference of the integral at
= 2 2 − 0 = 2 2 ≈ 2.828 the upper and lower limit ln |1| − ln | − 1| =
0. But this is wrong! We have to analyse the
y
integral stepwise at its discontinuous points:
2 Z 1 Z 0 Z 1
dx dx dx
= +
−1 x −1 x 0 x
Z b Z 1
1 dx dx
= lim + lim
−1 x a x
b→0 − a→0+

= −∞ + ∞ ⇒ undefined!
0 x
a 2 Hence, care must be taken when integrating
over discontinuous points.
◁ y
Z 2
1
Example 3.4. dx =? 2
0 x
We take the limit of the definite integral with
the lower limit towards zero: 1
Z 2 Z 2 −1 b
1 1
dx = lim dx a x
0 x a→0+
a x 1
= lim [ln |x|]2a −1
a→0+
= lim (ln |2| − ln |a|)
a→0+ −2
= ln |2| − (−∞) = ∞

y
2
3.2. Integration by substitution
From differential calculus we know a number of
1 basic functions with its derivatives. We further
know some techniques to differentiate any com-
bination of these functions.
0 x For integral calculus we also know the a num-
a 2
ber of basic functions and its integrals. How-
◁ ever, not all combinations of these functions are
integrable analytically.
In this section we show a technique to inte-
3.1.3. Summary
grate more complex integrands called integra-
To study integrals with infinite domain or infi- tion by substitution. This integration technique
nite values we use limits towards these points. is derived from the chain-rule of differential cal-
For integrands with points of discontinuity we culus. We start with the basic theorem:
have to separate the integral into a sum of in-
Theorem 3.1 (Integration by substitution).
tegrals each of them being continuous.
Let I be an interval, f : I → R a continuous
Care must be taken for definite integrals with
function and φ : [a, b] → I a continuously dif-
known primitives containing poles within their
ferentiable function (i.e. its derivative is contin-
domain. We can not simply take the difference
uous). We then have
of the primitive at the two limits, see the fol-
Z b Z φ(b)
lowing example: ′
f [φ(x)]φ (x) dx = f (φ) dφ
Z 1 a φ(a)
dx
Example 3.5. =? ◁
−1 x

February 8, 2023 21

Z Z
Proof. Let F be a primitive of f . We differen- = f (φ) dφ = φ dφ
tiate F [φ(x)] with respect to x by applying the
chain rule: 2p 3
= φ +C
3
d 2p 2
F [φ(x)] = F ′ [φ(x)]φ′ (x) = f [φ(x)]φ′ (x) = (3x + 1)3 + C
dx 3
We now evaluate the definite integral: ◁
Z b
We now leave this general approach and look
′ at two special substitutions before we come back
f [φ(x)]φ (x) dx = F [φ(b)] − F [φ(a)]
a to the general case.
Z φ(b)
= f (φ) dφ
φ(a) 3.2.1. Integration of f (ax + b)
If we substitute φ(x) = ax + b we get the first
derivative φ′ (x) = a which makes substitution
We show the application of this theorem by very simple:
examples:
Corollary 3.2 (Integration of f (ax + b)). Let
Z b f : R → R be integrable, a, b, x1 , x2 ∈ R and
Example 3.6. 2 sin(2x) dx =? φ = ax + b. We then have:
a
We see that the 2 in front of the sine-function Z x2
1 ax2 +b
Z
is the first derivative of the argument of the f (ax + b) dx = f (φ) dφ
x1 a ax1 +b
sine-function. Hence, we take 2x as the inner
function φ(x): ◁

φ(x) = 2x φ′ (x) = 2 Proof. With φ : R → R, x 7→ ax + b we have:


f (φ) = sin(φ) dφ dφ
b Z b φ′ (x) = = a ⇒ dx =
Z dx a
2 sin(2x) dx = f (φ(x))φ′ (x) dx
a a Inserting into the integral we get:
Z x2
φ(b)
1 x2 ′
Z Z
= f (φ) dφ f (ax + b) dx = φ (x)f [φ(x)] dx
φ(a) x1 a x1
1 ax2 +b
Z φ(b) Z
= sin(φ) dφ = f (φ) dφ
φ(a) a ax1 +b
 φ(b)
= − cos(φ) φ(a)

= − cos(2b) − (− cos(2a)) We apply this corollary in two examples:

Z 2
= cos(2a) − cos(2b)
Example 3.8. 2x − 1 dx =?
1

a=2 b = −1
Remark: Integration by substitution applies
2√ x2 √
Z Z
also to indefinite integrals, see the following ex-
2x − 1 dx = ax + b dx
ample. 1 x1
1 2x2 −1 √
Z Z
p
Example 3.7. 6x 3x2 + 1 dx =? = φ dφ
a 2x1 −1
The first derivative of the argument of the 1 2 hp 3 i3
root equals the factor before the root, hence: = · φ
2 3 1
1 √ √
φ(x) = 3x2 + 1 φ′ (x) = 6x = ( 27 − 1)
√ 3
f (φ) = φ √ 1
= 3 − ≈ 1.399
3
Z p Z
6x 3x2 + 1 dx = φ′ (x)f [φ(x)] dx ◁

22 February 8, 2023
Z π x
2 = ln |φ| + C
Example 3.9. cos dx =?
0 3 = ln |φ(x)| + C
1
a= b=0
3
We show the application of this corollary with
π
Z
2
x Z x2 some examples:
cos dx = cos(ax) dx
0 3 x1
Z
2x
1
Z ax2 Example 3.11. dx =?
= cos(φ) dφ x2 − 1
a ax1 With φ(x) = x2 − 1 and φ′ (x) = 2x we get:
π
= 3 [sin(φ)]06 Z
2x
Z ′
φ (x)
π  2
dx = dx
= 3 sin = 1.5 x −1 φ(x)
6 = ln |φ(x)| + C

= ln |x2 − 1| + C
The substitution holds also for indefinite in-
tegrals: ◁
Z
Z tan(x)
Example 3.10. (3x − 2)6 dx =? Example 3.12. dx =?
3
We may solve this integral by expanding the With φ(x) = cos(x) and φ′ (x) = − sin(x) we
integrand. However, since this is a tiring pro- get:
cess we prefer integration by substitution:
− sin(x)
Z Z
tan(x) 1
Z Z dx = − dx
6 1 3 3 cos(x)
(3x − 2) dx = φ6 dφ Z ′
3 1 φ (x)
=− dx
1 φ7 3 φ(x)
= · +C
3 7 1
= C − ln | cos(x)|
(3x − 2)7 3
= +C
21 ◁

The corollary may also be applied to definite
φ′ (x) integrals:
3.2.2. Integration of φ(x)
Z 3
For this type of expression the outer function 2 x−1
Example 3.13. 2
dx =?
is f (φ) = φ1 with the integral ln |φ| + C which 1 2x − x
leads us to the following corollary: With φ(x) = 2x − x2 and φ′ (x) = 2 − 2x we

get:
Corollary 3.3 (Integration of φφ(x)(x)
). With φ :
3 3
x−1 2 − 2x
Z Z
[a, b] → R being a continuously differentiable 2 1 2
dx = − dx
function (i.e. its derivative is continuous) and 1 2x − x2 2 1 2x − x2
φ(x) ̸= 0 we have: 1
Z 3
φ′ (x)
2
=− dx
Z ′
φ (x) 2 1 φ(x)
dx = ln |φ(x)| + C 3
φ(x) = − 21 ln 2x − x2 12



Since the denominator of the integrand has no
1 zero within the domain we get:
Proof. With f (x) = we have
φ(x) 3
x−1
Z
2
Z ′ dx = − 12 (ln | 34 | − ln |1|)
2x − x2
Z
φ (x)
dx = φ′ (x)f (x) dx 1
= 12 ln 43 ≈ 0.1438

φ(x)
Z Z
1
= f (φ) dφ = dφ ◁
φ

February 8, 2023 23
Z (π)
3.2.3. Integration of f [φ(x)]φ′ (x) 1 4 √
= φ dφ
We now go back to the theorem at the beginning 2 (0)
 π
of this section: 1 2p 3 ( 4 )

= φ
Z b Z φ(b) 2 3 (0)
f [φ(x)]φ′ (x) dx = f (φ) dφ q π
a φ(a) 1 3
4
= tan (x)
3 0
Once we decided on the term to substitute a q 
1
q
3 π 3
safe technique to perform substitution is: = tan ( 4 ) − tan (0)
3
dφ 1
1. Differentiate φ: φ′ = =
dx 3
dφ ◁
2. Rewrite this for dx: dx =
φ′
3.2.4. Summary
3. Insert φ and dx into the integral.
We looked at three types of integrals where sub-
4. For a definite integral replace the limits a stitution helps to solve the integral. Depending
and b by φ(a) and φ(b), respectively. on the type of integral, we take the choice which
part of the integrand to substitute:
Now the first derivative should cancel out and
the required factors will remain. type of integral substitution
Z
2 − x2 f (ax + b) dx φ(x) = ax + b
Z
Example 3.14. dx =?
x3 − 6x
Z ′
f (x)
We set φ = x3 − 6x and get: dx φ(x) = f (x)
Z f (x)
dφ dφ f [g(x)]g ′ (x) dx φ(x) = g(x)
= 3x2 − 6 dx =
dx 3x2 − 6
For definite integrals the limits must be ad-
Z
2− x2
Z
2− x2 dφ justed by the substitution term or kept in brack-
dx = ets until back-substitution.
x3 − 6x φ 3x2 − 6
1
Z
3x2 − 6 dφ There are other ways to simplify integrals by
=− substitution. However, we limit ourselves to
3 φ 3x2 − 6
this three most common substitutions.
ln |φ|
Z
1 dφ
=− =C−
3 φ 3
1 3.3. Integration by parts
= C − ln |x3 − 6x|
3
With most integration techniques we try to con-
◁ vert complicated integrands into one or more
If we plan for a definite integral to perform easy to integrate parts. We again make use of a
a back-substitution at the end, we may leave rule from differential calculus: the product rule.
the limits as they are, and put brackets around Theorem 3.4 (Integration by parts). Let f, g :
them to indicate that we did not change them: [a, b] → R be differentiable and its derivative
Z π p continuous. We then have:
4 tan(x)
Example 3.15. 2
dx =? Z Z
0 2 cos (x) f (x)g(x) dx = f (x)g(x) − f (x)g ′ (x) dx

dφ 1 ◁
φ = tan(x), = , dx = cos2 (x)dφ
dx cos2 (x)
Proof. Integration by parts is the inverse of the
π p Z (π) √ product rule in differential calculus:
φ
Z
4 tan(x) 4
dx = cos2 (x) dφ
0
2
2 cos (x) (0) 2 cos2 (x) (f g)′ = f ′ g + f g ′

24 February 8, 2023
Z
f ′ g = (f g)′ − f g ′ Example 3.18. ln(x) dx =?
Z Z
f g dx = {(f g)′ − f g ′ } dx

With f ′ = 1 and g = ln(x) we get:
Z Z Z Z
= (f g) dx − f g ′ dx
′ ln(x) dx = 1 · ln(x) dx
Z
Z 1
= f g − f g ′ dx = x ln(x) − x dx
x
= x ln(x) − x + C
Z ◁
Example 3.16. cos(x) sin(x) dx =?
Integration by parts should be applied if the
With f ′ = cos(x) and g = sin(x) we get: remaining integral is less complex than the orig-
Z Z inal integral. E.g. products of polynomials with
cos(x) sin(x) dx = f ′ g dx a sine-, cosine- or exponential functions are can-
Z didates for integration by parts.
= f g − f g ′ dx
Z
2
= sin (x) − sin(x) cos(x)dx 3.4. Integration of absolutes
R For integrals where the integrand contains abso-
By adding sin(x) cos(x)dx to the left side we lutes the integral must be separated into parts
get: where the argument of the absolute does not
Z change sign. See the following examples:
2 sin(x) cos(x)dx = sin2 (x) Z 2
Example 3.19. |x − 1| dx =?
sin2 (x)
Z
0
sin(x) cos(x)dx = +C The argument of the absolute changes sign
2
at x = 1, hence, we separate the integral in two

Z parts:
ex (x2 + 2x) dx =?
Z 2 Z 1 Z 2
Example 3.17.
|x − 1| dx = |x − 1| dx + |x − 1| dx
With f ′ = ex and g = (x2 + 2x) we get: 0 0 1
Z For the left integral the argument of the abso-
ex (x2 + 2x) dx = ex (x2 + 2x) lute is always negative, hence, we remove the
Z absolute by changing the sign. For the right
− ex (2x + 2) dx integral the argument of the absolute is always
positive, hence, we remove the absolute without
For the latter integral we again set f ′ = ex and any further change:
g = 2x + 2 and get: Z 2 Z 1 Z 2
Z Z |x − 1| dx = (1 − x) dx + (x − 1) dx
e (2x + 2) dx = e (2x + 2) − ex 2 dx
x x 0 0 1
2 1
h i h 2 i2
= x − x2 + x2 − x
0 1
The latter integral can be integrated directly: 1
Z Z = (1 − 2) + ( 42 −2− 1
2 + 1) = 1
e 2 dx = 2 ex dx = 2ex + C
x
y
1
Now we combine the integrals:
Z
ex (x2 + 2x) dx = ex (x2 + 2x)

− ex (2x + 2) + 2ex
= ex x2 + C
0 x
◁ 0 1 2

February 8, 2023 25
◁ • multiple real poles
2
• single complex conjugate poles
Z
Example 3.20. |x2 − 2| dx =?
0
The argument • multiple complex conjugate poles
√ of the absolute is negative on
the
√ interval [0, 2) and positive on the interval We limit ourselves to the first three types of
( 2, 2]. Hence we separate the integral in two poles.
parts:
√ 3.5.1. Single real poles
Z 2 Z 2 Z 2
2
|x − 2| dx = 2 − x2 dx + √ x2 − 2 dx Theorem 3.5 (Single real pole). For a par-
0 0 2
A
h 3
i√ 2 h 3
i2 tial fraction of a single real pole of type x−x 0
,
= 2x − x3 + x3 − 2x √ A, x0 ∈ R we have:
0 2
 √   √ 
Z
A
23/2 8 23/2 dx = A ln |x − x0 | + C
= 2 2− 3 + 3 −4− 3 +2 2
x − x0

= 43 (2 2 − 1) ≈ 2.4379 ◁
If a rational function has only single real poles
y
we separate it into partial fractions of given type
2 and integrate the summands separately.
Z
3x + 9
Example 3.21. dx =?
x2 − 4
1 We find two poles at x1 = 2 and x2 = −2:
x2 − 4 = (x − x1 )(x − x2 ) = (x − 2)(x + 2)

0 Hence, our ansatz for partial fraction decompo-


√ x sition is:
0 1 2 2
3x + 9 A B
2
= +
◁ x −4 x−2 x+2
Multiplying by the denominator of the left term
(x − 2)(x + 2) we get:
3.5. Integration of rational
3x + 9 = A(x + 2) + B(x − 2)
functions
We find A and B by setting x to 2 and −2,
When analysing the frequency behaviour of sys- respectively:
tems one often gets to the point of integrating
3 · 2 + 9 = A(2 + 2) + B(2 − 2)
large rational functions of this type:
15
⇒A=
an xn + an−1 xn−1 + . . . + a1 x + a0 4
f (x) =
bm xm + bm−1 xm−1 + . . . + b1 x + b0 3 · (−2) + 9 = A(−2 + 2) + B(−2 − 2)
3
In order to be able to integrate high order ⇒B=−
rational functions we reduce them into a sum 4
of smaller rational functions by partial fraction This leads us to a simplified integral we are able
decomposition. If we then know the integrals of to integrate:
Z Z  
the partial fractions we are able to integrate the 3x + 9 15/4 3/4
dx = − dx
whole rational function. x2 − 4 x−2 x+2
To do so we assume m > n, an ̸= 0 and
Z Z
15/4 3/4
bm ̸= 0, i.e. the order of the denominator poly- = dx − dx
x−2 x+2
nomial is greater than the order of the numera- 15 3
tor polynomial. If not we first have to perform a = ln |x − 2| − ln |x + 2| + C
4 4
polynomial division which we have seen earlier. ◁
We remember four types of partial fractions
Remark: For a definite integral care must be
depending on the poles of the rational function:
taken at poles. If a pole is included in the inte-
• single real poles gration range the integral becomes improper.

26 February 8, 2023
Z  
3.5.2. Multiple real poles 1/9 8/9 4/3
= + + dx
x + 2 x − 1 (x − 1)2
Theorem 3.6 (Multiple real pole). For a par- Z Z Z
1 dx 8 dx 4 dx
tial fraction of a multiple real pole of type = + +
A 9 x+2 9 x−1 3 (x − 1)2
(x−x0 )n , A, x0 ∈ R, n ∈ N>1 we have: 1 8 4
= ln |x + 2| + ln |x − 1| − +C
9 9 3(x − 1)
Z
A A
n
dx = C −
(x − x0 ) (n − 1)(x − x0 )n−1 ◁
A(x − x0 )1−n
= +C
1−n 3.5.3. Single complex conjugate poles

We combine a pair of complex conjugate poles
If a rational function has only single and mul- into a single partial fraction:
tiple real poles we separate it into partial frac- Ax + B Ax + B
tions of given type and integrate the summands = 2
(x − z)(x − z) x + ax + b
separately.
Z 2
x + 2x + 1 Theorem 3.7 (Single complex conjugate pole).
Example 3.22. dx =?
x3 − 3x + 2 For a partial fraction of a single pair of complex
We find a single real pole at x1 = −2 and a conjugate poles of type x2Ax+B , A, B, a, b ∈ R
+ax+b
double pole at x2 = 1: we have:
x3 − 3x + 2 = (x − x1 )(x − x2 )2
Z
Ax + B A
2
dx = ln |x2 + ax + b|
= (x + 2)(x − 1)2 x + ax + b 2
 
2B − aA 2x + a
Hence, our ansatz for partial fraction decompo- +√ arctan √ +C
4b − a2 4b − a2
sition is:

x2 + 2x + 1 A B C
= + +
3
x − 3x + 2 x + 2 x − 1 (x − 1)2 If the denominator of a rational function con-
tains a pair of complex conjugate zeros, par-
Multiplying by the denominator of the left term tial fraction decomposition will contain a par-
(x + 2)(x − 1)2 we get: tial fraction of given type. We are then able to
x2 +2x+1 = A(x−1)2 +B(x+2)(x−1)+C(x+2) integrate this partial fraction.
x2 − 4
Z
We find A and C by setting x to −2 and 1, Example 3.23. dx =?
respectively: x3 − x2 + 2
We find a single real pole at x1 = −1 and com-
(−2)2 + 2(−2) + 1 = A(−2 − 1)2 plex conjugate poles at z = 1 + j and z = 1 − j:
1 x3 − x2 + 2 = (x − x1 )(x − z)(x − z)
⇒A=
9
= (x + 1)(x − 1 − j)(x − 1 + j)
12 + 2 · 1 + 1 = C(1 + 2)
4 = (x + 1)(x2 − 2x + 2)
⇒C=
3 Hence, our ansatz for partial fraction decompo-
With known A and C we find B by setting x to sition is:
another value, e.g. x = 0:
x2 − 4 A Bx + C
= + 2
1 4 3
x −x +22 x + 1 x − 2x + 2
1= · (−1)2 + B · 2 · (−1) + · 2
9 3
8 Multiplying by the denominator of the left term
⇒B= (x + 1)(x2 − 2x + 2) we get:
9
This leads us to a sum of simple fractions we x2 − 4 = A(x2 − 2x + 2) + (Bx + C)(x + 1)
able to integrate:
Z 2 We find A by setting x to −1:
x + 2x + 1
dx (−1)2 − 4 = A((−1)2 − 2(−1) + 2)
x3 − 3x + 2

February 8, 2023 27
3 Z ∞ Z 2
⇒A=− dx
5 2. √ 6. xk dx for k > −1
1 x3 0
Z 2 Z 1
For x = 0 we find C: dx p
3. √
3
7. |x| dx
0 x −1
6
−4 = 2A + C = C − Z 1 Z e
5 4. x−1/2 dx 8. ln(|x|) dx
14 0 −e
⇒C=−
5
Finally, setting x to one we find B: Problem 3.2: Integrate by substitution:
Z Z
3 28 1. cos(x2 )2x dx 4. cos(sin x) cos x dx
1 − 4 = − + 2B −
5 5 Z Z
8 x
⇒B= 2. esin φ cos φ dφ 5. 2
dx
5 x +1
Z Z
This leads us to an expression we are able to 3. 3x2 sinh(x3 ) dx 6. exp(ax + b) dx
integrate:

x2 − 4
Z
dx Problem 3.3: Integrate by substitution of
x3 − x2 + 2 type f (ax + b):
!
− 35 8
5x − 5
14
Z
= + dx
Z Z 2√
x + 1 x2 − 2x + 2 1. 3 cos(3x + 1) dx 4. 2x − 2 dx
1
8x − 14
Z Z
3 1 1 π/6
=−
Z Z
dx + dx
5 x+1 5 2
x − 2x + 2 2. sin(1 − x) dx 5. e−jx dx
3 4 −π/6
= − ln |x + 1| + ln |x2 − 2x + 2| Z 1 √
Z
5 5 3. 3
x + 2 dx 6. 2πjf e2πjf t dt
6 −1
− arctan(x − 1) + C
5
◁ Problem 3.4: Integrate by substitution of
′ (x)
type φφ(x) :
3.5.4. Summary Z Z √
x 3 x + 4x
The integration of a large rational function is 1. 2
dx 4. √ dx
x +1 x3 + x2
performed by the following steps:
x − 2x3
Z Z
sinh(x)
2. dx 5. dx
1. If required perform polynomial division so cosh(x) x4 − x2
that the order of the numerator polynomial Z π/2 Z π/6
cos(x) dx
is less than the order of the denominator 3. cot(x) dx 6.
π/6 0 2 sin(x) + 1
polynomial.

2. For the remaining rational function per- Problem 3.5: Integrate by substitution:
form partial fraction decomposition.
Z 1 Z
2
3. Integrate all partial fractions separately by 1. 6x cos(3x ) dx 4. x2 sin(x3 ) dx
0
applying the integrals given above.
√ √ x3
Z 1 Z 1
2
2. xe dx 5. x ex dx
0 −1
3.6. Problems Z Z
sin(2x)
3. cos(x)esin(x) dx 6. dx
sin2 (x)
Problem 3.1: Solve the following improper
integrals: Problem 3.6: Integrate by parts:
Z ∞ Z ∞
dx dx
Z Z
1. 5. for k > 1 1. xex dx 4. x sinh(x) dx
1 x2 1 xk

28 February 8, 2023
Z Z
2. x3 e−x dx 5. πx eπx dx
Z Z
3. x2 cos(x) dx 6. sin2 (x) dx

Problem 3.7: Integrate the following func-


tions:
Z 1 Z 3
1. 1
x − 2 dx 4. x2 − 2x dx
0 0
Z 2 Z 2π
2
2. x − 1 dx 5. Im(ejx ) dx
−2 0
Z 2 Z π
3. 1 − x2 dx 6. sin2 (x) − 1
2 dx
−2 0

Problem 3.8: Integrate by partial fraction


decomposition:
1
1. f (x) =
x2 −1
2x + 3
2. f (x) =
x2 + 4x + 4
x2 + 1
3. f (x) =
x3 + 2x2 + 2x
x3 + x
4. f (x) =
x4 + 2x3+ x2 − 2x − 2

February 8, 2023 29
4. Functions with multiple arguments and values
4.1. Introduction E.g. a car with mass m = 1 t = 1000 kg and
velocity v = 36 km/h = 10 m/s has a kinetic
Yet we dealt with functions having one argu- energy of
ment and one value, i.e.
m 2
Ekin = f (m, v) = v
f :R→R 2
1000 kg
In this chapter we want to extend our view to = (10 ms )2 = 50 kJ
2
functions with n arguments and m values, i.e.

n m
f :R →R

Example 4.1. The absorbed power in a resis- 4.3. Visualization of functions


tor obeying Ohm’s law is given by with multiple arguments
U2
P = There are different ways to visualize a function
R with more than one argument.
The absorbed power depends on both: the ap- For a continuous function y = f (x) with one
plied voltage and the resistance of the resistor. in- and output we were able to illustrate it by
Hence, the function for the absorbed power is a a line in a Cartesian diagram. I.e. each tuple
function with two arguments and one value: (x, y) have a unique position in the diagram.
 2 In this section we look at some techniques to
R →R
P = f (U, R) : 2 visualize functions with more than one input.
U, R 7→ UR
◁ 4.3.1. Parametric plot
Some further examples are given in table 4.1. A first technique to visualize a function with
more than one input is to keep all inputs except
one constant and to plot it as a single argument
4.2. Definition of multiple function. To show the dependence on the other
argument functions arguments the plot is done several times for dif-
ferent values for the constant arguments.
Definition 4.1 (function with n arguments).
We call u a function with n arguments x1 , x2 , Example 4.3.
. . . , xn if u takes a unique value for each valid  2
combination of x1 , x2 , . . . , xn and write: R →R
f: p
(x, y) 7→ 2 + cos x2 + y 2
u = f (x1 , x2 , . . . , xn )

◁ f
3 y=0
y=π
Example 4.2. The kinetic energy Ekin of a
solid, not rotating body with mass m and ve- 2 y = 3π/2

locity v is given by:


y = 2π
1
m
Ekin = f (m, v) = v 2
2
0 x
A change of mass or velocity both influence the 0 π 2π
kinetic energy. For a given combination of m
and v we find a unique kinetic energy Ekin . ◁

30 February 8, 2023
R→R R → R2 R → R3
- voltage over time - curve on a plane - curve in space
- altitude over distance - position on surface over time - 3d positioning over time
- resistance over temperature

R2 → R R2 → R2 R2 → R3
- altitude map - surface vector field - surface in space
- grey scale picture - surface transformation - surface of geometrical bodies
- wind on earth’s surface

R3 → R R3 → R2 R3 → R3
- temperature in a solid - 3d to 2d projection - volume vector field
- mass density over volume - pressure and temperature - air flow in volume
over space

Table 4.1.: Examples for functions with multiple arguments and values

4.3.2. Surface plot f (x, y)


3
We may look at a function with two arguments
2
and one output z = f (x, y) as an infinite set of
3-tuples: 1
0 y
{x, y, f (x, y)}
π


Each tuple represents a point in space. Since π 2π
x
a three dimensional model is laborious to cre-
ate we look for two dimensional plots of such ◁
functions.
For continuous functions the set of all tuples 4.3.3. Contour plot
result in a surface in space. When drawing lines
Another technique to visualize functions with
with equal distance on the x-y plane and plot-
two arguments and one output is to use level
ting the function with f (x, y) above this plane,
curves like contour lines on maps, see the fol-
the function becomes visible.
lowing example.
Example 4.5. We visualize the function
 2
Example 4.4. The following plot visualizes the R →R
f:
function (x, y) 7→ x2 − y 2

by a contour plot over the range x, y ∈ [−1, 1].


To do so we resolve the function f (x, y) to
R2 → R

y(x, f ):
f: p
(x, y) 7→ 2 + cos x2 + y 2 p
f (x, y) = x2 − y 2 ⇒ y(x, f ) = ± x2 − f

We want to plot level curves at multiples of 0.2.


over the range x, y ∈ [0, 2π] as a surface plot. E.g. for the level curve at 0 we insert f = 0

February 8, 2023 31
into the equation and get y = ±x which are the
diagonals in the following plot:

−0.8
−0.6
−0.4
−0.2
y

0
0.
1
0.2
0.4
0.6
0.8

−1 1 x
Wikimedia Commons, Torsten Henning, public domain
0.8
0.6
0.4 ◁
0.2
−1
−0.2
−0.4
−0.6
−0.8

0.
0

4.3.4. Vector plot


To improve the impression in such a plot we
may colour the areas and add a legend to it: To visualize a function with two input- and two
output-values we may distribute arrows on a
y
Cartesian diagram. The position of the arrows
1 show the input values and the horizontal and
vertical size represent the output values.
0.8 to 1.0
0.6 to 0.8
0.4 to 0.6 Example 4.7. We visualize the function:
0.2 to 0.4
0.0 to 0.2
0 -0.2 to 0.0
R2 → R2

-0.4 to -0.2
-0.6 to -0.4 f:
-0.8 to -0.6 (x, y) 7→ (y, x)
-1.0 to -0.8

by a vector plot
−1
−1 0 1 x
y
◁ 2
Example 4.6. An application is to measure the
thermal emission of a house or a device. Dif- 1
ferent temperatures are illustrated by different
intensities or colours.
The image below shows the thermal emission x
−2 −1 1 2
of a coffee machine.
−1

−2

Example 4.8. A vector plot is useful to illus-


trate electric fields in space. The image below
shows the electric field of a dipole.

32 February 8, 2023
We are tempted to conclude that f is continuous
at x0 , but this would be wrong: If we take the
limit towards x0 along the curve x = y 2 , y > 0
we get:

lim f [(ε2 , ε)] = 1 ̸= 0


ε→0+

Hence, the investigated function f is not con-


tinuous at x0 = (0, 0).
y
ne
◁ t h is li
= 1 on
f
4.4. Continuity f = 0 elsewhere
x
For a function f with one argument we defined
a continuous point x0 by

lim f (x) = lim f (x) = f (x0 ) ◁


x→x0 + x→x0 −
It seems an unsolvable task to check continu-
In short we write ity with limits on any curve. A technique to do
so is to transform the Cartesian coordinates to
lim f (x) = f (x0 ) polar coordinates around the investigated point
x→x0
x0 . However, we do not apply this technique
implying that x → x0 includes both x → x0 + here.
and x → x0 − . I.e. the function value f (x0 ) The following theorem helps to analyse con-
must equal the limit from left (x < x0 ) and tinuity for most applications.
right (x > x0 ).
For functions with more than one argument Theorem 4.2 (Combined continuous func-
we define continuity by the same technique: tions). Let f, g : Rn → R be continuous. If
The function value must be equal to the limit defined (i.e. no division by zero), then f ± g,
from any direction. If we combine all arguments f · g, f /g and f ◦ g are continuous too. ◁
to a vector, i.e. x = (x1 , x2 , . . . , xn )T we write
in short:

 R2 → R
lim f (x) = f (x0 ) Example 4.10. f : sin(x) + y 2
x→x0  (x, y) 7→
The term x → x0 means that x approaches x0 ey
is continuous since the function is a valid com-
from all directions and on any curve. bination of continuous functions. ◁

Example 4.9. Is the following function contin-  R2 → R
uous at x0 = (0, 0)? Example 4.11. f : cos(xy)
 (x, y) 7→ 2
 2 x + y2
 R →R is continuous except for the point (0, 0) where
f: (x, y) 7→ 1 for x = y 2 , y > 0 the denominator is zero. ◁
(x, y) 7→ 0 else

The function value at x0 is zero since y = 0 ≯ 0. 4.5. Partial derivative


We check the x-axis:
For functions with one output the derivative
lim f [(x, 0)] = 0 somehow represents the slope at any point.
x→0
For functions with one in- and output we took
We check the y-axis: the derivative only in one direction: towards
positive arguments. Taking the derivative to-
lim f [(0, y)] = 0 wards negative arguments would change the
y→0

February 8, 2023 33
sign. E.g. driving up the hill means a posi- f (x, y)
tive slope whereas driving in the other direction ∂f
down the hill means a negative slope. ∂x ∂f
For a multiple input function we not only ∂y
have a the choice between positive and negative
direction but between an infinite number of di-
rections to take the derivative. Hence, we first y
introduce the directional derivative towards a
given direction a before we take a more general
approach. ey
ex
Definition 4.3 (Directional derivative). Let f :
Rn → R, (x1 , . . . , xn ) 7→ f (x1 , . . . , xn ) and a =
(a1 , . . . , an ) ∈ Rn . If it exits we call x

∂f f (x1 +ha1 ,...,xn +han ) − f (x1 ,...,xn )


= lim The partial derivative of a function f : Rn →
∂a h→0 h R again is a function with n arguments and one
directional derivative with respect to a. ◁ value.
To derive the partial derivative with respect
We may look at the directional derivative as to one argument we treat the other arguments
the slope on a hilly ground. Depending on as constants.
the direction the slope/derivative may turn out
quite different. Example 4.12. We evaluate all partial deriva-
tives of f (x, y, z) = xy + z 2 and get:
f (x, y)
∂f ∂f ∂f
=y =x = 2z
∂f ∂x ∂y ∂z
∂a ◁

Example 4.13. Theppartial derivatives of the


function f (x, y, z) = x2 + y 2 + z 2 are:
y
∂f 2x
= p
a ∂x 2 x2 + y 2
∂f 2y
= p
∂y 2 x2 + y 2
∂f
x = 2z
∂z
We have a special interest in the direction of ◁
the arguments of the function. I.e. we take Example 4.14. We evaluate all partial deriva-
the derivative w.r.t. one input while keeping tives of the function f (x, y, z) = x2 sin(y)ez and
the other inputs constant. These are the partial get:
derivatives of a function.
∂f
Definition 4.4 (Partial derivative). Let f : = 2x sin(y)ez
∂x
Rn → R, (x1 , . . . , xn ) 7→ f (x1 , . . . , xn ) be a ∂f
function with n arguments. If it exists we call = x2 cos(y)ez
∂y
∂f f (x + hek ) − f (x) ∂f
= lim = x2 sin(y)ez
∂xk h→0 h ∂z
f (x1 ,...,xk +h,...,xn ) − f (x1 ,...,xn ) ◁
= lim
h→0 h
Differentiability in general may be derived as
the partial derivative with respect to xk . ◁ for functions with one argument. However, as

34 February 8, 2023
for continuity we must take all directions and f (x, y)
all possible paths towards the investigated point
into account.
Another approach is to approximate the func-
tion at the point of interest by a plane and to
investigate whether the remaining error tends
towards zero by a higher order than one. y
It is left to the interested reader to study dif-
ferentiability by other sources.
x

4.6. Gradient The slope increases with distance to the z-


axis and points away from the z-axis.
Definition 4.5 (Gradient). Let f : Rn → R be
a differentiable function with n Cartesian argu- ∂ ∂
∇f = grad(f ) = f (x, y)ex + f (x, y)ey
ments. Combining all partial derivatives to a ∂x ∂y
vector gives us = 2xex + 2yey
 ∂f 
∂x1
The gradient grad(f ) has two in- and output
∂f ∂f .. values. We use a vector plot to illustrate the
e1 + . . . + en = 
 
∂x1 ∂xn . 
∂f gradient:
∂xn
y
which we call the gradient of a function f . In
short we write
 ∂ 
∂x1
∂ ∂ ..
grad = ∇ = e1 + . . . + en = 
 
∂x1 ∂xn . 

∂xn
x
with ∇ being the nabla-operator . We treat the
product of ∂x∂ k and f as the partial derivative
of f with respect to xk . ◁

The gradient grad(f ) of a function f at point


x gives the value and direction of maximum
slope of f . ◁

4.7. Multiple partial derivative


We now want to evaluate the second partial
derivative of a function. For n arguments we
find n2 possible second partial derivatives.

Example 4.16. For the function


 3
R →R
f:
Example 4.15. The shape of a parabola an- (x, y, z) 7→ xy 2 z 3
tenna may be expressed by:
we want to find all possible second partial

R×R→R derivatives. We first evaluate the first partial
f: derivatives:
(x, y) 7→ x2 + y 2
∂f ∂f ∂f
We express this function by a surface plot: ∂x = y2z3 ∂y = 2xyz 3 ∂z = 3xy 2 z 2

February 8, 2023 35
Now we take all second partial derivatives: Theorem 4.7 (Symmetry of second deriva-
tives). Let
∂2f ∂2f ∂2f
∂x2
=0 ∂x∂y = 2yz 3 ∂x∂z = 3y 2 z 2  n
R →R
∂2f ∂2f ∂2f f:
∂y∂x = 2yz 3 ∂y 2
= 2xz 3 ∂y∂z = 6xyz 2 (x1 , . . . , xn ) 7→ f (x1 , . . . , xn )
∂2f ∂2f ∂2f
∂z∂x = 3y 2 z 2 ∂z∂y = 6xyz 2 ∂z 2
= 6xy 2 z be a function with continuous second partial
derivatives. Then the order of partial differen-

tiation may be interchanged, i.e.
   
Remark: We read the denominator backward. ∂ ∂f ∂ ∂f
=
I.e. for the second derivative below we take first ∂xj ∂xk ∂xk ∂xj
the derivative w.r.t. x and the second w.r.t. y:
for j, k = 1, . . . , n. This symmetry of second
∂2f
 
∂ ∂f derivatives is also known as the Schwarz inte-
=
∂y∂x ∂y ∂x grability condition. ◁

Combining all second partial derivatives leads


us to the Hessian matrix: 4.8. Extrema
Definition 4.6 (Hessian matrix). The Hes- We remember, for a single in- and output func-
sian matrix combines all possible second partial tion f : R → R we have a local maximum at x0
derivatives of a multiple argument function into if all values f (x) in an environment x ∈ Uε (x0 )
a matrix. I.e. with around the maximum are less or equal than the
 n value of the maximum. I.e.
R →R
f:
(x1 , . . . , xn ) 7→ f (x1 , . . . , xn ) f (x0 ) ≥ f (x) for x ∈ Uε (x0 )
we get The corresponding is true for local minima.

∂2f ∂2f
 The same principle holds for multiple argument
∂x1 2
... ∂x1 ∂xn functions:

H= .. .. .. 
. . .

Definition 4.8 (Extrema of multiple argument
 
∂2f ∂2f
∂xn ∂x1 ... ∂xn 2 functions). Let D ⊆ Rn be the domain of a
multiple argument function f : D → R, x0 ∈ D

an element of the domain and Uε (x0 ) be the
epsilon neighbourhood around x0 .
Example 4.17. The function
• If there exist an ε > 0 with f (x0 ) ≤ f (x)
R3 for all x ∈ Uε (x0 ) we say x0 is a local min-

→R
f: imum of f .
(x, y, z) 7→ xy 2 z 3
• If there exist an ε > 0 with f (x0 ) ≥ f (x)
of the previous example results in the Hessian
for all x ∈ Uε (x0 ) we say x0 is a local max-
matrix:
imum of f .
2yz 3 3y 2 z 2
 
0
• If f (x0 ) ≤ f (x) for all x ∈ D we say x0 is
H =  2yz 3 2xz 3 6xyz 2 
a global minimum of f .
3y 2 z 2 6xyz 2 6xy 2 z
• If f (x0 ) ≥ f (x) for all x ∈ D we say x0 is

a global maximum of f .
The Hessian matrix of the previous example If x0 is a local minimum or a local maximum we
is symmetric. This is not always the case. How- call it a local extremum. If x0 is a global min-
ever, if all second partial derivatives of a func- imum or a global maximum we call it a global
tion are continuous, then the Hessian matrix is extremum. ◁
symmetric:

36 February 8, 2023
Theorem 4.9 (Condition for extremum). If a Example 4.19. We want to check the function
differentiable multiple argument function f :  2
Rn → R has a (local) extremum at x0 ∈ Rn R →R
f:
then all partial derivatives are zero at this point, (x, y) 7→ 2x − x2 + y − y 2 − 12
i.e.
∂f for extrema. As a necessary condition the first
=0 for k = 1, . . . , n partial derivatives must be zero, hence:
∂xk x0
◁ ∂f
= 2 − 2x = 0
∂x
Zeros for all partial derivatives are a neces- ∂f
sary condition for an extremum, but not a suf- = 1 − 2y = 0
∂y
ficient condition, see the following example.
Example 4.18. Does the function Both partial derivatives are zero at x0 = (1, 12 ).
 2 We create a contour plot around x0 :
R →R
f: y
(x, y) 7→ x2 − y 2 + 2
-0.25
1.5
has an extremum at x0 = (0, 0)T ? We investi- 0.0
gate the partial derivatives at this point: 0.25
0.5
∂f 1
= 2x|x=0 = 0
∂x x0
0.75
∂f 0.5
= −2y|y=0 = 0
∂y x0

The necessary condition is given, however, a 0 x


0.5 1 1.5 2
plot reveals that the function has no extremum
at x0 = (0, 0)T but a saddle point: −0.5
f (x, y)
4 Although a contour plot cannot serve as a
proof it becomes obvious that all function val-
3
ues around x0 are less than f (x0 ).
2 Another way to check the candidate x0 is to
add small values εx and εy to the values of x = 1
and y = 21 , respectively.
−1
− 21 f (1+εx , 12 +εy ) = 2(1+εx ) − (1+εx )2
−1
− 21
x 1
2 1 + ( 12 +εy ) − ( 12 +εy )2 − 1
2
1 1 2 y
= ... = 3
4 − ε2x − ε2y
Along the x-axis we find a minimum whereas For any combination of εx and εy except both
along the y-axis we find a maximum. There- being zero the function value becomes less than
fore, for any environment Uε (x0 ) we find values at x0 .
smaller and larger than the value at the inves- Hence, we found a maximum at x0 = (1, 21 )
tigated point. ◁ with value f (x0 ) = 0.75. ◁
How do we find out if a point x0 is an ex-
tremum and whether it is a maximum or a min- 4.9. Multiple value functions
imum? A technique we will not focus on is to
check whether the Hessian matrix is positive Yet we focussed on single valued functions.
definite or negative definite. However, for most However, the arguments of a function may in-
applications it can easily be checked if the func- fluence more than one value.
tion value f (x0 ) is less or greater than its local To differentiate a multiple value function we
surrounding Uε (x0 ). treat each value of the function separately. For

February 8, 2023 37
many questions we need the partial derivatives Problem 4.3: Draw vector plots for the fol-
for all values of the function which we combine lowing functions:
into a matrix:
f (x, y) = (−y, x)
Definition 4.10 (Jacobian matrix). Let f : g(x, y) = (x, y)
Rn → Rm be a function with n arguments
h(x, y) = (x, −y)
and m values and its component functions f =
(f1 , . . . , fm ), fk : Rn → R, k = 1, . . . , m. We
define the Jacobian matrix as the combination Problem 4.4: Which of the following func-
of all partial derivatives of the form: tions are continuous in their domain?
 ∂f   2
∂f1 ∂f1 R →R
∂x1
1
∂x2 · · · ∂x n 1. f :
 ∂f2 ∂f2
 ∂x1 ∂x2 · · · ∂x ∂f2 
 (x, y) 7→ x2 − y 2
n 
J =  . . . .. .
 2
R →R
 . .. . ..  2. f :
(x, y) 7→ ex sin2 (y)

∂fm ∂fm ∂fm
∂x1 ∂x2 · · · ∂xn (
R × R>0 → R
◁ 3. f :
(x, y) 7→ arctan(ln(y))
x2 +1
 3
Example 4.20. We want to derive the Ja- R →R
4. f :
cobean matrix for the function (x, y, z) 7→ x2 − y 2 + arctan(z)
(
 2 R3 → R
R → R2 5. f : 2 (x)+cos2 (y)
f:
(x, y) 7→ (x sin(y), y cos(x)) (x, y, z) 7→ sin sin(z)+2
 4
R →R
and get: 6. f :
(f, t, δ, γ) 7→ sin(2πf t)e−δt + γ
 
sin(y) x cos(y)
J=
−y sin(x) cos(x) Problem 4.5: Evaluate the first derivatives
◁ with respect to all arguments for the following
functions:

4.10. Problems 1. f (x, y, z) = x + y 2 + z 3


2. f (x, y, z) = sin(xy) + cos(z 2 )
Problem 4.1: Plot the following functions for ex+y
3. f (x, y, z) =
y-values of 0, 1, 2 and 3: z2 + z + 1
ab

(0, 1] × R → R 4. f (a, b, c, d) =
f: cd
(x, y) 7→ xy 5. f (u, v, w) = ln(uw) − evw

(0, 1] × R → R cos(2πα) + j sin(2πβ)
g: 6. f (α, β, γ) =
(x, y) 7→ xy/2 γ2

[0, 2π] × R → R
h:
(x, y) 7→ e−y/2 sin(x) Problem 4.6: Evaluate the first derivatives

[0, 2π] × R → R with respect to all arguments for the following
i:
(x, y) 7→ sin(xy/2) functions:
X
1. f (x, y) = (xk + y k )
Problem 4.2: Create contour plots with at k
least three contour levels for the following func- 2. f (x, y) =
X
(xy)k
tions: k
X
e−kxy
p
f (x, y) = 4 − x2 − y 2 3. f (x, y) =
p k
g(x, y) = x2 + y 2 X
2
4. f (a0 , a1 ) = (a1 xk + a0 − yk )2
h(x, y) = x − y k

38 February 8, 2023
Problem 4.7: Evaluate the gradient for the
following functions:

1. f (x, y) = x + y
p
2. f (x, y) = x2 + y 2
3. f (x, y, z) = x2 ey + x3 cos(z)

Problem 4.8: Draw the gradient vector field


for the following functions:

1. f (x, y) = |x + y|
p
2. f (x, y) = x2 + y 2
3. f (x, y) = sin(x) + y

Problem 4.9: Evaluate the Hessian matrix


for the following functions:

1. f (x, y) = x2 y 2
2. f (x, y) = xy
3. f (x, y) = sin(x) + cos(y)
4. f (x, y, z) = x2 ey + y 2 sin(z) + z 2 ex

Problem 4.10: Find extrema of the following


functions:

1. f (x, y) = x2 + y 2 − x − y + 1
2
2
2. f (x, y) = e−x − y 2 + 2y
3. f (x, y) = 2x − x2 + 4y − y 2

Problem 4.11: Evaluate the Jacobian matrix


for the following functions:
 2
x + y2

1. f (x, y) =
xy
 
sin(x) + cos(y)
2. f (x, y) =  x2 y 2 
e xy

x + y2 + z3
 

3. f (x, y, z) =  xey sin(z) 


x2 ey+z

February 8, 2023 39
5. Differential equations
5.1. Introduction Hence, we are searching for a function with the
first derivative being the function itself times a
Yet, when solving algebraic equations with un- negative factor of τ1 . We find a candidate to be:
knowns the task was to find values for the un-
knowns that fulfil the expression. E.g. the u = k e−t/τ u′ = − τk e−t/τ
equation
x2 − x = 2 To verify our ansatz we insert u and u′ into our
DE:
holds for x = 2 and x = −1.
In this chapter we extend our view on un- − τk e−t/τ = − τ1 k e−t/τ
knowns x to unknown functions y(x).
which is true for all t ∈ R.
Example 5.1. Imagine a capacitor with capac- Since the voltage of the capacitor is inert the
itance C that has been charged to a voltage U0 . voltage just after switching to the resistor still
is U0 , i.e. u(0) = U0 . Hence, k = U0 and we get
the solution:
u = U0 e−t/τ
U0 C R
u
U0
At time t = 0 the capacitor is switched to a
resistor with resistance R. How does the voltage
at the capacitor changes over time? I.e. we
search for the function u : R → R, t 7→ u(t).

iC iR
0
U0 C R u 0 τ t

The current into the resistor is given by:


5.2. Definition of differential
u
iR = equations, DE
R
The current into the capacitor is given by: In a differential equation (short: DE) the un-
known is a function y(x) rather than just a vari-
du able x. The DE contains the function y(x) and
iC = C = Cu′
dt some derivatives of this function.
The sum of both currents must be zero, i.e. Definition 5.1 (Differential equation). For I
being an interval a differential equation, DE is
iR + iC = 0
an equation containing one or more variables
u
+ Cu′ = 0 x1 , . . . , xp ∈ I, one or more functions of these
R
variables y1 , . . . , yq , I p → K and derivatives of
(n)
Resolved to u′ and τ = RC we get a differential these functions yk′ , . . . , yk , k = 1, . . . , q. For
equation DE: one variable and one function we write:

u′ = − τ1 u (DE) y (n) = F (x, y, y ′ , . . . , y (n−1) )

40 February 8, 2023
We call the order n of the highest occurring Definition 5.4 (Linear DE). With I being an
derivative the order of the differential equation. interval, ak , b : I → R, k = 0, . . . , n being con-
◁ tinuous and y : I → K, the equation
n
X
Example 5.2. Some differential equations: ak (x)y (k) = b(x), x∈I
k=0
1. y ′′ = y ′ − y + x
or
∂f ∂f
2. 2 − + f 2 + sin(x) − cos(y) = 0
∂x ∂y an y (n) + . . . + a1 y ′ + a0 y = b, x∈I

3. y ′ + y ′ − y + x = 0
p
is said to be a linear differential equation. ◁

D
4. y ′′ = − y
m Example 5.5. In example 5.2 the first and
◁ fourth DE are linear, whereas the second and
third are not linear. ◁

Definition 5.2 (Ordinary and partial DE).


A differential equation of a single argument Definition 5.5 (Homogeneous DE). If a dif-
function f (x) is called ordinary differential ferential equation (DE) can be expressed in the
equation, ODE . form
n
A differential equation of a multiple argument
X
ak (x)y (k) (x) = 0
function f (x1 , . . . , xn ) is called a partial differ- k=0
ential equation. ◁
we call it a homogeneous DE and an inhomoge-
neous DE otherwise. ◁
Example 5.3. In the previous example the
first, third and fourth DE are ordinary; only Remark: A similar definition holds for partial
the second DE is a partial DE. ◁ differential equations. There all combinations of
derivatives w.r.t. the arguments of the unknown
In this chapter we focus on ordinary differen- function must be taken into account. However,
tial equations, ODE. here the focus is on ODEs only.
Definition 5.3 (Explicit and implicit nota-
Example 5.6. In example 5.2 only the fourth
tion).
DE is homogeneous; all other DEs are inhomo-
An ODE resolved to its highest derivative is geneous. ◁
said to be in explicit notation, i.e.

y (n) = F (x, y, y ′ , . . . , y (n−1) ) 5.3. Solutions of DEs


Otherwise the notation is called implicit no- A solution of a DE is a function y(x) for which
tation and it is often noted as: the DE is true over the investigated interval.
However, the solution may include one or more
F (x, y, y ′ , . . . , y (n) ) = 0 parameters that influence the result.
In integral calculus, when integrating a func-

tion we have to add a unknown constant C. In-
tegrating a function n times leads to terms with
Example 5.4. In example 5.2 the first and n unknown constants.
fourth DE are in explicit notation, whereas the In the same manner the solution of an nth
third is in implicit notation. The second is a order DE leads to an expression with n un-
partial DE where we do not distinguish between knowns/parameters. The parameters may be
explicit and implicit notation. ◁ resolved by some boundary conditions for the
DE.

February 8, 2023 41
Definition 5.6 (General and particular solu- where λ indicates the proportionality. Since the
tion). We call the solution of an nth order DE DE is quite similar to the one in the introduc-
with n parameters a general solution of the DE. tory example we choose a similar ansatz:
If one or more of the parameters are set to
given values the solution is said to be a partic- N = c e−λt N ′ = −λc e−λt
ular solution of the DE. ◁
Inserting into the DE

Example 5.7. In the introductory example 5.1 −λc e−λt = −λ c e−λt


we found the solution u = k e−t/τ with the pa-
rameter k which we call general solution of the reveals that this is an appropriate solution. λ
DE. We then realized that the voltage at the is related to the half-life t1/2 :
capacitor at t = 0 is U0 and determined a par-
1 N (t1/2 ) c e−λt1/2
ticular solution to be u = U0 e−t/τ . ◁ = = = e−λt1/2
2 N (0) c e−λ·0
2 = eλt1/2
Theorem 5.7 (Number of parameters). An nth
order ODE without any further conditions has ln(2)
λ=
a general solution with n parameters. ◁ t1/2

For many applications some conditions are Hence, the general solution for the DE is:
given to further specify the solution of a DE.
N (t) = c exp(− ln(2)t
t )
For initial value problems some initial condi- 1/2

tions are given that define some or all of the pa-


Since the DE is of order one, the solution has
rameters of the general solution. The introduc-
also one parameter c. With the condition N0
tory example 5.1 belongs to this type of prob-
as the number of atoms at t = 0, i.e.
lems.
For boundary problems some conditions at the N0 = N (0) = c exp(− ln(2)·0
t )=c
1/2
boundary of the domain are given that further
specify the solution. we get the particular solution:
Example 5.8. Radioactive decay. N (t) = N0 exp(− ln(2)t
t )
1/2
Radioactive isotopes are unstable and their
nuclei change randomly by radioactive pro- N
cesses. E.g. the carbon isotope 14 C converts
to 14 N by beta decay. N0

14
6C → 14
7N + e− + ν̄
N0
2
In a given time interval there is a given prob-
ability that an atom decays. Experiments show
that 50% of a given number of 14 C atoms decay
0
in app. 5 730 years. We call this the half-life 0 t1/2 t
of the isotope since after this time one half of
original 14 C-isotopes converted into other iso- ◁
topes/elements.
Let’s say N is the number of atoms as a func- Example 5.9. Simple harmonic oscillator.
tion of time. A change of N means a beta de- In mechanics a simple harmonic oscillator is
cay including emission of electrons which can be made of mass mounted to a spring:
measured. The measured radiation is propor-
D m
tional the number of atoms of 14 C (e.g. double
mass results in double radiation). We get the
differential equation:
0 x
N ′ = −λ N

42 February 8, 2023
The force acting on the mass is proportional to to position x0 and release it at t = 0 with an
its displacement. When displaced by distance initial velocity of v0 = 0:
x(t) the force of the spring acting on the mass
is x(0) = x0
Fs = −Dx(t) v(0) = x′ (0) = v0 = 0

with D being the spring constant. In turn, We get:


the force of inertia is the negative product of
mass m and acceleration a(t) which is the sec- x(t) = x0 sin(ωt + π2 ) = x0 cos(ωt)
ond derivative of the displacement x(t):
x0 cos(ωt)
2 2π
d x(t) T =
Fi = −ma(t) = −m = −mx′′ (t) ω
dt2 2
x0=2
The sum of two the forces must be zero at all
times which leads to a second order DE: 1
x0=1
Fs + Fi = 0
−Dx(t) − mx′′ (t) = 0 π
ω
2π t
ω
x′′ = − m
D
x x0=−1
−1
As an ansatz we choose: x0=−2
−2
x = x̂ sin(ωt + φ0 )

with x̂ ∈ R>0 as the amplitude of the displace-
ment, ω ∈ R>0 as the angular frequency and
φ0 ∈ (−π, π] as the phase at t = 0. This is one 5.4. Creating DEs
parameter more than the order of the DE, how-
ever, one of them will disappear during further We want to define a DE for a given general so-
calculations. We evaluate the second derivative lution. Although this is somehow the other way
round, we want to use this technique to get a
x′ = x̂ω cos(ωt + φ0 ) deeper understanding on differential equations.
x′′ = −x̂ω 2 sin(ωt + φ0 ) Example 5.10. What is the DE for all cosine
functions with angular frequency 1 and ampli-
and insert x and x′′ into the DE: tude c?
y = c cos(x)
x′′ = − m
D
x
−x̂ω 2 sin(ωt + φ0 ) = − m
D
x̂ sin(ωt + φ0 ) c cos(x)
ω2 = D c=2
m
c = 32
D
The chosen ansatz holds only for ω 2 = m , i.e. c=1
the mass oscillates with an angular frequency:
c = 12
r
D x
ω= −π π 2π
m c = − 12
Hence we found a general solution with the two c = −1
remaining parameters x̂ and φ0 : c = − 32
q c = −2
D
x = x̂ sin(ωt + φ0 ) with ω = m
First we take the first derivative of y:
For a particular solution we have to define two
independent conditions. E.g. we pull the mass y ′ = −c sin(x)

February 8, 2023 43
Then we resolve y = c cos(x) to c and insert it Problem 5.2: Study the following DEs with
into the equation for y ′ in order to eliminate the respect to order of DE, ordinary/partial DE,
parameter c: explicit/implicit notation, linearity and homo-
y geneity:
y′ = − sin(x) = −y tan(x)
cos(x) 1. my ′′ + ky ′ + Dy = sin(x)
y ′ + y tan(x) = 0 ∂f ∂f
2. − =0
∂x ∂y
This is a linear homogeneous ODE in implicit
∂f ∂2f
notation. (The second last row is the same DE 3. 2x + y 2 − + 2 =0
in explicit notation.) ◁ ∂x ∂y
′′ √
4. y = x + y
For a given solution with n parameters we n−1
create the DE by the following steps:
X
5. ak y (k) = y (n)
k=0
1. Evaluate n derivatives of the solution re-

sulting in n + 1 equations. 6. y − y 2 + x = 0

2. Eliminate the n parameters which results


Problem 5.3: Which of the following terms
in a single equation without parameters.
are general solutions and which of them are par-
Example 5.11. We take the general solution ticular solutions for the given DEs?
of the harmonic oscillator in problem 5.9 and 1. y ′ + ay = 0
take the first and second derivative:
a) y = C e−ax c) y = 3 e−ax
x = x̂ sin(ωt + φ0 )
b) y = C eax d) y = ec−ax

x = x̂ω cos(ωt + φ0 )
x′′ = −x̂ω 2 sin(ωt + φ0 ) 2. y ′ + y = e2x

The two parameters are x̂ and φ0 . We eliminate a) y = 3e−x + 13 e2x c) y = 4 e−x


them by inserting the equation for x into the b) y = e2x d) y = Ce−x + 13 e2x
equation for x′′ :
3. y ′ = x y 2
′′ 2
x = −ω x 2 2
a) y = − c) y =
This is a second order linear homogeneous ODE x2 C − x2
in explicit notation. ◁ C 2
b) y = 2 d) y =
x C + x2

5.5. Problems
Problem 5.4: Create a DE for the following
functions:
Problem 5.1: For I being an interval, x ∈ I
1. y(x) = c sin(x)
and y : I → R which of the following expres-
sions are differential equations? 2. y(x) = a cosh(x)
3. y(x) = c eωx
1. y ′′ − y ′ + xy = 1
4. y(x) = ax2
2
2. y − y + x = 0
3. y (2) − y + x = 0 Problem 5.5: Create a DE for all functions
p
4. y ′′ + 3xy = sin(x) that form straight lines through the origin of a
X n Cartesian coordinate system.
5. ak y (k) = 0, ak ∈ R
k=0 Problem 5.6: Create a DE for all parabo-
n 
X  las symmetric around the ordinate and pass-
6. y (n) + y (k−1) − y (k) = ex ing through the origin of a Cartesian coordinate
k=1 system.

44 February 8, 2023
Problem 5.7: Create a DE for all circles with
radius r around the origin of a Cartesian coor-
dinate system.

February 8, 2023 45
6. First order differential equations
6.1. Introduction The dashed line is an exponential function
which seems to fit quite well. Hence we choose
In the previous chapter we solved already some as an ansatz:
DEs. Yet, the ansätze were given by some un-
clear means. y = c ex y ′ = c ex
In this chapter we look at some approaches
to find such an ansatz for DEs. We limit our- The ansatz solves the DE for any c ∈ R:
selves to first order DEs. In the next chapter
y′ = y ⇒ c ex = c ex
we extend our view to higher order linear DEs
with constant coefficients. Hence, y = c ex is the general solution for the
In general we can express a first order differ- DE.
ential equation by For a particular solution we need a condition
like y(x0 ) = y0 . E.g. for y(0) = 15 we get the
F (y ′ , y, x) = 0 particular solution yp = 15 ex (dashed line in the
diagram). ◁
In explicit notation we write

y ′ = F (y, x) 6.3. Separation of variables


If it is possible to express a DE in the form of
6.2. Geometric interpretation
dy
y′ = = g(x)h(y)
We write the DE in explicit notation. In this dx
notation we can evaluate the slope (i.e. the we can separate the variables x and y and inte-
first derivative) for any combination of x and grate them separately:
y. Plotting the slopes for a number of points
gives an impression of the function y. 1 dy
= g(x)
h(y) dx
Example 6.1. We want to solve the DE: Z
1 dy
Z
dx = g(x) dx
h(y) dx
y′ = y Z
1
Z
dy = g(x) dx
h(y)
First we plot the slope field and plot a possible
solution into it:
Theorem 6.1 (Separation of variables 1). For
y I being an interval, g, h : I → R and y : I → K,
y ̸= 0 let
2 y ′ = g(x)h(y)
be a DE in explicit notation. Then the general
1
solution can be evaluated by:
Z Z
1
−2 −1 1 2 x dy = g(x) dx
h(y) ◁
−1
Example 6.2. What is the general solution of
−2
y ′ − x2 y 2 − x2 = 0 ?

46 February 8, 2023
We bring the equation into explicit notation and Theorem 6.2 (Separation of variables 2). For
separate the variables: I being an interval, g : I → R and y : I → K let
y ′ = x2 y 2 + x2 y ′ = g(x)y
y ′ = x2 (y 2 + 1)
be a linear homogeneous DE (in explicit nota-
1 dy
2
= x2 tion). We then get the general solution by:
y + 1 dx Z 
Z Z
1 dy
dx = x2 dx y = c exp g(x) dx
y 2 + 1 dx ◁
Z Z
1
dy = x2 dx
y2 + 1 Example 6.3. What is the general solution for
arctan(y) = 31 x3 + C
1 3
 y ′ = x2 y ?
y = tan 3x +C
We apply the second theorem for separation of
which is the general solution of the DE.
variables:
y Z 
3
2
x dx = c exp 31 x3 = c ex /3

y = c exp
2
C =1 y
1
3 c=3
C = 0.5
c = 2.5
C =0 x
− π2 π
2
2 c=2
C = −0.5
−1 c = 1.5
1 c=1
C = −1
−2 c = 0.5

−2 −1 0 1 2 x
◁ ◁

For a linear homogeneous DE


6.4. Variation of parameters
y ′ = g(x) y
the function h(y) is the unit function, i.e. A homogeneous DE is easier to solve than an in-
h(y) = y and we can further simplify: homogeneous one. However, an inhomogeneous
DE may be solved in two steps:
1 dy First we solve the corresponding homoge-
= g(x)
y dx neous DE and get the homogeneous solution yh .
Z Z
1 dy Second we treat the parameters of the homo-
dx = g(x) dx
y dx geneous solution yh as functions and and use
Z Z
1 the modified yh as ansatz to solve the inhomo-
dy = g(x) dx
y geneous DE.
Z
For an inhomogeneous first order DE we ap-
ln |y| + C = g(x) dx
ply the following procedure:
Z 
y = ± exp g(x) dx − C 1. Find the general solution yh of the corre-
Z  sponding homogeneous DE.
−C
= ±e exp g(x) dx 2. Treat the parameter c of yh as a function
c(x) (i.e. a parameter-function) and evalu-
The left factor ±e−C is the parameter c for the ate its first derivative.
general solution. The constant of the integral
in the exponential function may be neglected 3. Insert the modified solution and its deriva-
in this case since it acts like another constant tive into the DE and resolve the equation
factor outside the exponential function. We get: for the parameter-function c(x).

February 8, 2023 47
4. Combine the parameter-function c(x) with y
the general solution yh of the homogeneous
DE as the general solution of the inhomo- 2
geneous DE. C =3
1 C =2
Example 6.4. What is the general solution for

y′ = x + y ? C =1 x
−4 −2 2
We first evaluate the general solution for the −1
corresponding homogeneous DE y ′ = y which C =0
we found already in example 6.1: −2
x
yh = c e C = −2

C = −1

As an ansatz y for the inhomogeneous DE we


treat the parameter c as a function c(x) and 6.5. Linear inhomogeneous DE
evaluate the first derivative of y:
Theorem 6.3 (General plus particular solu-
y = c(x) ex y ′ = c′ (x)ex + c(x)ex tion). Let I be an interval, ak , f : I → R
(k = 0, . . . , n) be functions and y : I → K be
Inserting into the inhomogeneous DE results in:
the unknown function. Let further the linear
y′ = x + y inhomogeneous DE
c′ (x)ex + c(x)ex = x + c(x) ex n
X

c (x) = x e −x ak (x)y (k) (x) = f (x), x∈I
Z k=0
c(x) = x e−x dx
has a particular solution y(x) = yp (x) and the
corresponding homogeneous DE
We integrate by parts with e−x being the deriva-
tive: n
X
Z Z ak (x)y (k) (x) = 0, x∈I
c(x) = x e−x dx = −x e−x + e−x dx k=0

= −x e−x − e−x + C = C − e−x (x + 1) has the general solution y(x) = yh (x). Then
the sum the two solutions yh (x) + yp (x) is the
Inserting into the homogeneous solution results general solution of the inhomogeneous DE:
in
y(x) = yh (x) + yp (x)
y = c(x) ex = (C − e−x (x + 1)) ex ◁
x
=Ce −x−1
Proof. We insert the sum of the two solutions
which is the general solution of the inhomoge-
into the DE:
neous DE.
X  (k) 
To remove any doubts we perform a test by
X
ak (yh + yp )(k) = ak yh + yp(k)
inserting the solution and its first derivative into k k
the inhomogeneous DE: X (k)

= ak yh + ak yp(k)
y = C ex − x − 1 k
(k)
X X

y =Ce −1 x = ak yh + ak yp(k)
k k
y′ = x + y
= 0 + f (x) = f (x)
C ex − 1 = x + C ex − x − 1

which is true for any x ∈ R. Hence, with y = Example 6.5. We want to solve the DE:
C ex − x − 1 we found a general solution for the
inhomogeneous DE. y ′ + xy + x = 0

48 February 8, 2023
First we solve the corresponding homogeneous y
DE by separation of variables: C =2
1
y ′ + xy = 0 C =1

y = −xy −2 −1 1 2 x
Z 
C =0
yh = c exp −x dx = c e−x
2 /2 −1

−2 C = −1
Next we solve the inhomogeneous DE by varia-
tion of parameters: C = −2
−3

−x2 /2
y = c(x) e
2 /2 2 /2
y ′ = c′ (x) e−x − c(x)x e−x 6.6. Summary
Inserting into the DE: In this chapter we looked at some techniques to
find solutions for first order DEs.
2 /2 2 /2 2 /2
c′ e−x − c x e−x + x c e−x +x=0
′ −x2 /2 1. In explicit notation we gained a visual im-
c e +x=0
pression by a slope diagram.
2
c′ = −x ex /2
Z 2. For DEs of type y ′ = g(x)h(y) we per-
2
c = − x ex /2 dx formed separation of variables.

3. For DEs of type y ′ = g(x)y we found a


special form of separation of variables.
We substitute by u = x2 /2. Since we search for
a particular solution only we neglect the inte- 4. For inhomogeneous DEs we performed the
gration constant: variation of parameters.

x2 du 5. Finally we found the solution of a linear


u= u′ = x dx = inhomogeneous DE to be y(x) = yh (x) +
2Z x
du
Z
2
yp (x).
c=− x eu = − eu du = −eu = −ex /2
x
yp = c e−x
2 /2
= −ex
2 /2
e−x
2 /2
= −1 6.7. Problems
Inserting yp into the DE reveals that −1 indeed
Problem 6.1: Draw the slope field for the
is a particular solution of the DE.
following DEs:
To get the general solution of the inhomoge-
neous DE we sum up the general solution of the 1. y ′ y − 1 = 0
homogeneous DE and the particular solution of
2. y ′ x − x = 0
the inhomogeneous DE:
3. y ′ y + x = 0
2 /2
y = yh + yp = c e−x −1
Problem 6.2: Solve the following DEs by
We perform a test:
separation of variables:
2 /2 2 /2
y = c e−x −1 y ′ = −cx e−x 1. yy ′ − 1 = 0

y + xy + x = 0 2. yy ′ − x = 0
−x2 /2 −x2 /2
−cx e + x (c e − 1) + x = 0 3. xy ′ − y = 0
4. ey y ′ − 1 = 0
2 /2 2 /2
−cx e−x + xc e−x −x+x=0
sin(2x)
which is true for all x, c ∈ R. 5. y ′ + =0
y

February 8, 2023 49
6. y ′ + 2y 2 = 0

Problem 6.3: Solve the following DEs by


separation of variables:

1. y ′ + y = x2 y 4. y ′ + y sin(x) = 0
y′
2. xy ′ + 2x2 y = y 5. −y =0
cosh(x)

3. y ′ + 3y x = 0 6. 2xy ′ − y = 0

Problem 6.4: Solve the following inhomoge-


neous DEs by variation of parameters:

1. xy ′ − y = 1
2. xy ′ + y = ex
3. xy ′ + 2y = sin(x)

Problem 6.5: Solve by adding the general


homogeneous solution and a particular inhomo-
geneous solution:

1. xy ′ + y = 1
2. y ′ + 2y = cos(x)
3. y ′ − y = ejx

Problem 6.6: For k ∈ R, n ∈ Z, n ̸= −1 solve


the following DEs for y(x):

1. y ′ − 3y = 0 4. x2 y ′ − 2y = 0
2. y ′ + 3y = 0 5. y ′ − ky = 0
3. y ′ + x3 y = 0 6. y ′ − kxn y = 0

Problem 6.7: Solve the following DEs:


y+1
1. y ′ − y + x = 0 4. =x
y′
2. y ′ + 2y = x2 5. y ′ + y = x
y − 2x
3. x2 y ′ + y − 1 = 0 6. =1
y′

50 February 8, 2023
7. Higher order linear differential equations
7.1. Introduction Then any linear combination of the solutions

With I being an interval and ak , f : I → R y = C1 y1 + C2 y2 , C1 , C2 = const.


(k = 0, . . . , n) a higher order (n > 1) linear DE
is also a solution of the DE, i.e.
may be written as
n Pn (D)y = Pn (D)(C1 y1 + C2 y2 ) = 0
X
(k)

ak (x)y (x) = f (x)
k=0
Proof.
We are particularly interested in linear DEs
Pn (D)y = Pn (D) (C1 y1 + C2 y2 )
with constant real coefficients, i.e.
Xn
n
X = ak (C1 y1 + C2 y2 )(k)
ak y (k) (x) = f (x), ak ∈ R k=0
k=0 n
(k) (k)
X
= ak (C1 y1 + C2 y2 )
Many engineering problems result in DEs of this k=0
type. n n
(k) (k)
X X
We call f (x) the source term of the inhomo- = C1 ak y1 + C2 a k y2
geneous DE. For homogeneous DEs the source k=0 k=0
term is zero. = C1 Pn (D)y1 + C2 Pn (D)y2
d
With D = dx as the differential operator we = C1 · 0 + C2 · 0
write in short:
=0
n
X
ak D k y = f
k=0 Theorem 7.2 (Complex solution). Let I be an
n interval, u, v : I → R and y = u + jv be a
!
X
ak Dk y=f complex solution of a linear homogeneous DE
k=0 of order n, i.e.
(an Dn + . . . + a2 D2 + a1 D + a0 )y = f
Pn (D)y = Pn (D)(u + jv) = 0
In the brackets we find an nth
order polynomial
Then the real and imaginary parts are also so-
with coefficients ak , k = 0, . . . , n which we ab-
lutions of the DE, i.e.
breviate with Pn (D):
Pn (D)u = 0 and Pn (D)v = 0 ◁
Pn (D) y = f
Proof.
This is the inhomogeneous linear DE with con-
stant real coefficients. The corresponding ho- Pn (D)y = Pn (D)(u + jv)
mogeneous DE is given by: = Pn (D)u + jPn (D)v = 0
Pn (D) y = 0 Both, Pn (D)u and Pn (D)v are real. The sec-
ond term is multiplied by the imaginary unit j
Theorem 7.1 (Linear combination of solu- becoming a pure imaginary term. A complex
tions). Let y1 and y2 be two different solutions number is zero if the real and the imaginary
of a linear homogeneous DE of order n, i.e. part are zero, hence

Pn (D)u = 0 and Pn (D)v = 0


Pn (D)y1 = 0 and Pn (D)y2 = 0

February 8, 2023 51
7.2. Second order homogeneous The general solution is any linear combination
DE with constant of these solutions:

coefficients y = C1 ek1 x + C2 ek2 x (7.2)


It is always possible to bring the DE into this a1
r
a1 2
form: with k1,2 =− ± − a0
2 4
y ′′ + a1 y ′ + a0 y = 0
To solve an DE of this type the ansatz is: 7.2.2. Pair of complex conjugate
constants
y(x) = ekx , k∈K
The argument of the root in (7.1) is negative:
We take the first and second derivative and in-
sert it into the DE: a1 2
− a0 < 0 ⇔ a1 2 < 4a0
4
y = ekx y ′ = kekx y ′′ = k 2 ekx
For this important case in engineering we may
write:
y ′′ + a1 y ′ + a0 y = k 2 ekx + a1 kekx + a0 ekx
r
= ekx (k 2 + a1 k + a0 ) = 0 a1 a1 2
k1,2 = − ± − a0 = −σ ± jω
2 4
We call the second factor the characteristic r
polynomial : a1 a1 2
with σ = and ω = a0 − . The general
2 4
p(k) = k 2 + a1 k + a0 solution is:
The term ekx is never zero, hence, the charac- y = C1 ek1 x + C2 ek2 x
teristic polynomial must be zero:
= C1 e(−σ+jω)x + C2 e(−σ−jω)x
p(k) = k 2 + a1 k + a0 = 0 = e−σx (C1 ejωx + C2 e−jωx )
We call this the characteristic equation of the
With Euler’s formula ejωx = cos(ωx) + j sin(ωx)
DE. To find k we solve this second order poly-
we get
nomial and get:

y = e−σx C1 cos(ωx) + j sin(ωx)
r 
a1 a1 2
k1,2 = − ± − a0 (7.1)
2 4 + C2 cos(ωx) − j sin(ωx)


For real coefficients this equation can have three


= e−σx (C1 + C2 ) cos(ωx)
different types of solutions: 
+ (C1 − C2 ) j sin(ωx)
1. Two different real constants
= e−σx A cos(ωx) + jB sin(ωx)


2. A pair of complex conjugate constants


where A = C1 + C2 and B = C1 − C2 . Since for
3. Two equal real constants a complex solution the real and imaginary part
are both solutions of the DE we may write:
We have to treat these three types separately:
y = e−σx A cos(ωx) + B sin(ωx)

(7.3)
7.2.1. Two different real constants
r
The argument of the root in (7.1) is positive: a1 a1 2
with σ = and ω = a0 −
2 4
a1 2
− a0 > 0 ⇔ a1 2 > 4a0
4 7.2.3. Two equal real constants
In this case we found two independent solu- The argument of the root in (7.1) is zero:
tions for the DE, i.e.
a1 2
y1 = ek1 x and y2 = ek2 x − a0 = 0 ⇔ a1 2 = 4a0
4

52 February 8, 2023
For the constants k1 and k2 we get: sum must be zero. With v = dx ′
dt = x as the
2
a1 velocity and a = ddt2x = x′′ as the acceleration
k1 = k2 = −σ = − we get:
2
Applying the same technique as before would Fi + Ff + Fs = 0
result in the solution C e−σx with only one pa- −ma − V v − Dx = 0
rameter. This is not the general solution since
−mx′′ − V x′ − Dx = 0
we expect for a second order DE a general so-
lution with two parameters. x′′ + V ′
mx + D
mx =0
In order to find a general solution we apply
This is a second order linear homogeneous DE
the variation of parameters:
with constant real coefficients. For the coeffi-
y = Ce−σx cients k1 and k2 we get:
y ′ = C ′ e−σx − Cσ e−σx = (C ′ − σC)e−σx V D
′′ ′′ ′ −σx ′ −σx char. eq.: k2 + k+ =0
y = (C − σC )e − (C − σC)σe mr m
= (C − 2σC + σ C)e−σx
′′ ′ 2 V V2 D
k1,2 =− ± −
2m 4m2 m
Inserting into the DE gives:
Now we distinguish the three possible solutions:
′′ ′
y + a1 y + a0 y = 0 Two different real coefficients
(C − 2σC ′ + σ 2 C)e−σx +
′′
If the viscous damping coefficient V is com-
a1 (C ′ − σC)e−σx + a0 Ce−σx = 0 parable large, i.e.
C ′′ + (a1 − 2σ)C ′ + (σ 2 − a1 σ + a0 )C = 0 V2 D √
2
> ⇔ V > 2 Dm
4m m
With σ = a1 /2 and a1 2 = 4a0 the two brackets
become zero and we get then k1 and k2 are two different real num-
bers. We get
C ′′ = 0
x(t) = C1 ek1 t + C2 ek2 t
Integrating twice results in
with C1 and C2 being two real numbers.
C(x) = C1 x + C2
x |C1 | < |C2 |
and we get the general solution √
V > 2 Dm
a1
y = (C1 x + C2 )e−σx with σ = (7.4) |C1 | = |C2 |
2
Example 7.1. Damped harmonic oscillator. t
We want to analyse a damped harmonic oscilla- C1 < 0
|C1 | > |C2 | C2 > 0
tor with spring, mass and damper.
k1 > k2
D Fs
Fi
Pair of complex conjugate constants
m If the viscous damping coefficient V is com-
parable small, i.e.
x
V2 D √
V < ⇔ V < 2 Dm
Ff 4m 2 m
then k1 and k2 are a pair of complex con-
The damper adds the force of friction Ff .
jugate numbers. With
With the spring constant D in N/m, the vis-
cous damping coefficient V in Ns/m and the V
r
D V2
2
mass m in Ns σ= and ω= −
m =kg we get three forces which in 2m m 4m2

February 8, 2023 53
we get with the ansatz y = ekx which leads us to the
characteristic equation k 2 + a1 k + a0 = 0 which
x(t) = e−σt (C1 ejωt + C2 e−jωt ) we solve to:
r
or if we limit ourself to real functions: a1 a1 2
k1,2 = − ± − a0
2 4
x(t) = e−σt {A cos(ωt) + B sin(ωt)}
Depending on the argument of the root we dis-
a1
with C1 , C2 , A, B ∈ R. tinguish three types of solutions. With σ = ,
r 2
a1 2
x ω = a0 − and C1 , C2 , A, B ∈ R we get:
4

V < 2 Dm case solution
2
a1 > 4a0 y(x) = C1 ek1 x + C2 ek2 x
a1 2 < 4a0 y(x) = e−σx (C1 ejωx + C2 e−jωx )
t
y(x) = e−σx (A cos(ωx) + B sin(ωx))
a1 2 = 4a0 y(x) = (C1 + C2 x)e−σx

For the case a1 2 < 4a0 the first solution is a


complex valued function, i.e. y : I → C.
Two equal real coefficients
If√ the viscous damping coefficient is
2 Dm, i.e.
7.3. Higher order homogeneous
DE with constant
V2 D √
2
= ⇔ V = 2 Dm coefficients
4m m
then k1 and k2 are two equal real numbers: We apply the same approach as for a second
order DE. For an nth order linear homogeneous
V DE with constant real coefficients we write
k1 = k2 = −σ = −
2m
y (n) + an−1 y (n−1) + . . . + a1 y ′ + a0 y = 0
and we get
With the ansatz y = ekx we get an nth order
−σt −σt −σt characteristic polynomial :
x(t) = C1 e + C2 t e = (C1 +C2 t) e

with C1 and C2 being real numbers. p(k) = k n + an−1 k n−1 + . . . + a1 k + a0

Setting p(k) to zero gives the characteristic


x equation:
C2 = 2 √
V = 2 Dm
C2 = 1
σ=1 p(k) = k n + an−1 k n−1 + . . . + a1 k + a0 = 0
C2 = 0 C1 = 1 We now have to find the roots of the charac-
teristic polynomial, i.e. all possible solutions of
the characteristic equation. We know by the
t fundamental theorem of algebra that the equa-
C2 = −1 tion must have n zeros. For real coefficients we
will find real zeros or pairs of complex conjugate

zeros.
We now have to distinguish the different
7.2.4. Summary types of solutions for k:
We solve a second order linear homogeneous DE 1. For n different real zeros k1 , k2 , . . . , kn the
with constant real coefficients general solution is

y ′′ + a1 y ′ + a0 y = 0 y(x) = C1 ek1 x + C2 ek2 x + . . . + Cn ekn x

54 February 8, 2023
2. For a pair of complex conjugate zeros 7.4. Higher order inhomogeneous
DE with constant
kk = −σ + jω and kk+1 = −σ − jω
coefficients
we combine them to the term
We write the inhomogeneous linear DE with
e−σx {Ck cos(ωx) + Ck+1 sin(ωx)} constant real coefficients as

y (n) + an−1 y (n−1) + . . . + a1 y ′ + a0 y = s(x)


3. For multiple zeros, e.g. an m-fold zero kk
we use the term where we call s(x) the source term.
In the previous chapter we learned: For an in-
(Ck + Ck+1 x + . . . + Ck+m−1 xm−1 )ekk x homogeneous linear DE the sum of a particular
solution yp and the general solution yh of the
Example 7.2. The DE corresponding homogeneous DE is the general
solution of the investigated DE:
y ′′′ − 2y ′′ − y ′ + 2y = 0
y(x) = yh (x) + yp (x)
has the characteristic equation
This theorem holds for any order of the DE.
Hence, we use three steps to solve an inhomo-
k 3 − 2k 2 − k + 2 = 0
geneous linear DE:
with the zeros 1. Find the general solution yh of the corre-
sponding homogeneous DE.
k1 = −1, k2 = 1, k3 = 2
2. Find any particular solution yp of the inho-
and the solution mogeneous DE.

y(x) = C1 e−x + C2 ex + C3 e2x 3. Take the sum of the two solutions as the
◁ general solution of the inhomogeneous DE.

Example 7.3. We want to solve the DE The solution yh of the corresponding homo-
geneous DE may be evaluated as described in
4y (4) + 12y ′′′ + 17y ′′ + 14y ′ + 5y = 0 the previous section.
The ansatz to find a particular solution yp of
Dividing by 4 gives: the inhomogeneous DE depends on the source
term s(x) and there is no general technique to
17 ′′ 7 ′ 5
y (4) + 3y ′′′ + y + y + y=0 find an appropriate ansatz. Hence, we concen-
4 2 4 trate on some typical source terms.
The characteristic equation
7.4.1. Polynomial source term
17 7 5
k + 3k + k 2 + k + = 0
4 3
If the source term s(x) is an mth order polyno-
4 2 4
mial, i.e.
has zeros at:
s(x) = S0 + S1 x + S2 x2 + . . . + Sm xm
1
k1,2 = −1, k3,4 =− ±j
2 we choose as ansatz for the particular solution
yp an mth order polynomial too:
We have a double zero at −1 and a pair of com-
plex conjugate zeros − 12 ± j which we have to yp (x) = s0 + s1 x + s2 x2 + . . . + sm xm
treat separately. We get
We insert this polynomial into the DE to evalu-
y(x) = (C1 + C2 x)e−x ate the coefficients s0 , . . . , sm . In the ansatz all
+ e−x/2 {C3 cos(x) + C4 sin(x)} coefficients must be present, even if the source
◁ term does not include all coefficients S0 , . . . , Sm .

February 8, 2023 55
Example 7.4. We want to solve the DE 0 + 2s1 = x

y ′′ + 3y ′ + 2y = 2x − 1 This expression cannot be true for all x, hence


we choose an ansatz with increased order:
The corresponding homogeneous DE has the
characteristic equation k 2 + 3k + 2 = 0 with yp = s0 + s1 x + s2 x2
the two zeros at −1 and −2, which leads us to
yp′ = s1 + 2s2 x
the general homogeneous solution:
yp′′ = 2s2
−x −2x
yh = C1 e + C2 e 2s2 + 2(s1 + 2s2 x) = x
Since the source term of the inhomogeneous DE 4s2 x + (2s2 + 2s1 ) = x
is a first order polynomial we choose as ansatz a
first order polynomial too. We insert the ansatz Comparing the coefficients of the two polyno-
with its derivatives into the DE: mials results in two equations which we resolve
for s1 and s2 :
yp = s0 + s1 x yp′ = s1 yp′′ = 0
4s2 = 1 s2 = 14
0 + 3s1 + 2(s0 + s1 x) = 2x − 1 ⇒
2s1 + 2s2 = 0 s1 = − 14
2s1 x + (2s0 + 3s1 ) = 2x − 1
We get a particular solution:
Comparing the coefficients of the two polyno-
mials results in two equations which we resolve yp = 14 x2 − 41 x + s0
for s1 and s0 :
The particular solution is valid for any value of
2s1 = 2 s1 = 1
⇒ s0 . For convenience we set s0 to zero and get:
2s0 + 3s1 = −1 s0 = −2

which gives us the particular solution yp = 14 x2 − 41 x

yp = x − 2 The sum of the general homogeneous solution


and the particular inhomogeneous solution gives
The sum of the general homogeneous solution the general inhomogeneous solution:
and the particular inhomogeneous solution gives
the general inhomogeneous solution: y(x) = yh + yp = C1 e−2x + C2 + 41 x2 − 14 x

y(x) = C1 e−x + C2 e−2x + x − 2

7.4.2. Exponential source term
If the chosen polynomial leads to a contradic-
If the source term is an exponential function,
tion, we increase the order of the polynomial.
i.e.
Example 7.5. We want to solve the DE s(x) = A ebx

y ′′ + 2y ′ = x then we choose as ansatz for the particular so-


lution yp an exponential function with the same
The corresponding homogeneous DE has the exponent, i.e.
characteristic equation k 2 +2k = 0 with the two yp = a ebx
zeros at −2 and 0, which leads to the general
homogeneous solution: The ansatz equals the source term except for
another factor a. We insert the ansatz into the
yh = C1 e−2x + C2 DE to derive the factor a.

Since the source term of the inhomogeneous DE Example 7.6. We want to solve the DE
is a first order polynomial we choose as ansatz a
first order polynomial too. We insert the ansatz y ′′ − y = 4 e−3x
with its derivatives into the DE:
The corresponding homogeneous DE has the
yp = s0 + s1 x yp′ = s1 yp′′ = 0 characteristic equation k 2 − 1 = 0 with the two

56 February 8, 2023
zeros at ±1 which leads to the general homoge- yp′ = −2a sin(2x) + 2b cos(2x)
neous solution: yp′′ = −4a cos(2x) − 4b sin(2x)
yh = C1 e−x + C2 ex
Inserting into the DE gives:
We choose a e−3xas ansatz for the particular
y ′′ + 3y ′ + 2y = 5 cos(2x)
solution of the inhomogeneous DE and take two
derivatives: −4a cos(2x) − 4b sin(2x)
+3(−2a sin(2x) + 2b cos(2x))
yp = a e−3x yp′ = −3a e−3x yp′′ = 9a e−3x
+2(a cos(2x) + b sin(2x)) = 5 cos(2x)
Inserting into the DE gives: (6b − 2a) cos(2x)
y ′′ − y = 4 e−3x +(−6a − 2b) sin(2x) = 5 cos(2x)
9a e−3x − a e−3x = 4 e−3x This equation is true if it holds separately for
9a − a = 4 the sine and cosine terms. We get two equations
1 for two unknowns:
a=
2 −2a + 6b = 5 a = − 14
1 ⇒
yp = e−3x −6a − 2b = 0 b = 34
2
This leads us to the general solution of the in- yp = − 14 cos(2x) + 34 sin(2x)
homogeneous DE:
This leads us to the general solution of the in-
−x 1 homogeneous DE y = yh + yp :
y = yh + yp = C1 e + C2 e + e−3x
x
2 ◁
y = C1 e−x + C2 e−2x − 41 cos(2x) + 34 sin(2x)
7.4.3. Trigonometric source term ◁
If the source term is a trigonometric function,
i.e. 7.4.4. Source term as a sum of functions
s(x) = A cos(ωx) + B sin(ωx)
If the source term is a sum of two other known
then we choose as ansatz for the particular so- source terms we may treat them separately and
lution yp : add the particular solutions.
yp = a cos(ωx) + b sin(ωx) Theorem 7.3 (Sum of source terms). Let y1 (x)
and y2 (x) be solutions of a linear inhomoge-
The sine and cosine functions must be both
neous DE with constant coefficients and the
present, even if only one of them is present as
source terms s1 (x) and s2 (x), respectively:
source term. We evaluate the constants a and
b by inserting the ansatz into the DE. Pn (D)y1 = s1 and Pn (D)y2 = s2
Example 7.7. We want to solve the DE
Then y(x) = y1 (x) + y2 (x) is the solution of the
′′ ′ DE with the source term s(x) = s1 (x) + s2 (x),
y + 3y + 2y = 5 cos(2x)
i.e.
The corresponding homogeneous DE has the Pn (D)(y1 + y2 ) = s1 + s2 ◁
characteristic equation k 2 + 3k + 2 = 0 with
the two zeros at −1 and −2 which leads us to
the general homogeneous solution: Proof.

yh = C1 e−x + C2 e−2x Pn (D)y = Pn (D) (y1 + y2 )


n
We choose a cos(2x)+b sin(2x) as ansatz for the
X
= ak (y1 + y2 )(k)
particular solution of the inhomogeneous DE k=0
and take two derivatives: n
(k) (k)
X
= ak (y1 + y2 )
yp = a cos(2x) + b sin(2x) k=0

February 8, 2023 57
n n
X (k)
X (k) 7.4.5. DE in resonance
= a k y1 + ak y2
k=0 k=0 If the source term equals one of the particular
= Pn (D)y1 + Pn (D)y2 homogeneous solutions, the DE is said to be in
= s1 + s2 resonance.
The ansätze listed above will not lead to the
desired result. When inserting into the DE we
will end at a contradiction like 0 = f (x) or 0 =
Example 7.8. We want to solve the DE 1.
To solve the DE we use the appropriate
y ′′ + 2y ′ + y = e2x + x − 1 ansatz from above and perform variation of pa-
rameters.
The corresponding homogeneous DE has the
characteristic equation k 2 + 2k + 1 = 0 with a Example 7.9. We want to solve the DE
double zero at −1 which leads us to the general
y ′′ + 3y ′ + 2y = e−x
homogeneous solution:
The corresponding homogeneous DE has the
yh = (C1 x + C2 ) e−x characteristic equation k 2 + 3k + 2 = 0 with
the two zeros at −1 and −2 which leads to the
For the first summand of the source term: general homogeneous solution:

yp1 = a e2x ′
yp1 = 2a e2x ′′
yp1 = 4a e2x yh = C1 e−x + C2 e−2x

We first try the standard ansatz:


′′ ′ 2x
yp1 + 2yp1 + yp1 = e yp1 = ae−x ′
yp1 = −a e−x ′′
yp1 = a e−x
2x 2x 2x 2x
4a e + 2 · 2a e + ae =e
4a + 4a + a = 1 ′′ ′
1
yp1 + 3yp1 + 2yp1 = e−x
a= 9
1 2x
a e−x − 3a e−x + 2a e−x = e−x
yp1 = 9 e
a − 3a + 2a = 1
For the second summand of the source term: 0=1 ???

′ ′′ This is obviously wrong. We take the second


yp2 = s0 + s1 x yp2 = s1 yp2 =0
ansatz and treat the parameter a as a function:

yp2 = a e−x
′′ ′
yp2 + 2yp2 + yp2 = x − 1 ′
yp2 = a′ e−x − a e−x
0 + 2s1 + s0 + s1 x = x − 1 = (a′ − a) e−x
s1 x + 2s1 + s0 = x − 1 ′′
yp2 = (a′′ − a′ ) e−x − (a′ − a) e−x
s1 = 1 s1 = 1 = (a′′ − 2a′ + a) e−x

2s1 + s0 = −1 s0 = −3
yp2 = x − 3 ′′ ′
yp2 + 3yp2 + 2yp2 = e−x
The particular solution of the original DE is (a′′ − 2a′ + a) e−x + 3(a′ − a) e−x
+2a e−x = e−x
yp = yp1 + yp2 = 1
9 e2x + x − 3 (a′′ − 2a′ + a) + 3(a′ − a) + 2a = 1
a′′ + a′ = 1
The general solution y = yh + yp :
Since we are looking for a particular solution
y(x) = (C1 x + C2 ) e−x + 19 e2x + x − 3 yp (x) we try to find a simple solution for a(x).
◁ Integrating both sides ginves us a′ + a = x + C.

58 February 8, 2023
A simple solution is a(x) = x which we insert Problem 7.3: Solve the following DEs:
into the particular solution:
1. y ′′ + 3y ′ + 2y = 2x + 1
yp2 = x e−x 2. y ′′ + 2y ′ + y = x + 2
The general solution of the DE y = yh + yp2 is: 3. y ′′ + 2y ′ + 2y = 2(1 − x)
4. y ′′′ + y + 3(y ′′ + y ′ ) + x2 = 0
−x −2x −x
y(x) = C1 e + C2 e + xe
5. y (4) + 7y ′′ + 10y = 5 + 18y ′
−x −2x
= (C1 + x) e + C2 e
◁ 4y ′′
6. + x3 /y = 1
y

7.5. Problems
Problem 7.4: Solve the following DEs:

Problem 7.1: Solve the following DEs and 1. y ′′ + y ′ − 2y = 2 e3x


check your solution: 2. y ′′ + 4y = 8 e−2x
3. y ′′ − 4y ′ + 4y = 3e−x
1. y ′′ + y ′ − 2y = 0
2. y ′′ − y = 0 4. y ′′′ + y ′ = y ′′ + y + 3 e−2x
3. y ′′ − 2y ′ + y = 0 5. (2y ′′ − y ′ − y) e2x = 9
4. y ′′ + 2y ′ + 2y = 0
5. y ′′ = 4y Problem 7.5: Solve the following DEs:
y ′′ y
6. + ′ =1 1. y ′′ − 4y = 5 sin(x)
y′ 4y
2. y ′′ + y + 4 cos(x) = 2y ′
4y ′ 4y ′′
7. = +5 3. y ′′ + 4y = 5 cos(3x)
y y
8. 2y ′ = y ′′ + 10y 4. y ′′ − 2y ′ + 5y = sin(x) + 2 cos(x)
5. y ′ + y = sin(−2x)
6. y ′′′ + 3(y ′′ + y ′ ) + y = 2 cos(x) − 2 sin(x)
Problem 7.2: Solve the following DEs and
check your solution:
Problem 7.6: Solve the following DEs:
1. y ′′′ + 6y ′′ + 11y ′ + 6y = 0
2. y (4) − 5y ′′ + 4y = 0 1. y ′′ + 2y ′ − 3y = e−x − 3x
3. y ′′′ − y ′′ + y ′ − y = 0 2. y ′′ + 9y = 8 sin(x) + 6 e3x
4. y ′′′ + 3y ′′ + 4y ′ + 2y = 0 3. y ′′ + 4(x2 − y) + cos(x) = 0
5. y (4) + y = 2y ′′ 4. y ′′′ +4y ′′ +5y ′ +2y = 2x2 +10x+8+12 ex
6. y (4) + 2y ′′ + 5y = 8y ′
Problem 7.7: Solve the following DEs:

1. y ′ + 2y = e−2x
2. y ′′ + 4(y + cos(2x)) = 0
3. y ′′ + y ′ − 6y + 3 e−3x = 0
4. y ′′′ + 4y ′′ + 5y ′ + 2y = 2 e−x

February 8, 2023 59
8. Combinatorics
8.1. Permutations Theorem 8.4 (Permutations with multiple
multiples). The number of permutations for n
Definition 8.1 (Permutation). We call the ar- itemsPcontaining m ki -multiples, i = 1 . . . m
rangement of n items into a definite order per- with m i=1 ki = n is:
mutation. ◁
n!
Pn,k1 ,k2 ,...,km =
k1 !k2 ! . . . km !
Theorem 8.2 (Permutations of different
items). The number of permutations for n dif- ◁
ferent items is:
Pn = n! Example 8.5. For n = 4 balls with different
4!
colours there are 1!·1!·1!·1! = 24 options to bring
◁ them into an order, see figure 8.1 left.
If two of them have the same colour the num-
4!
Example 8.1. There are six options to bring ber of permutations reduce to 1!·1!·2! = 12, see
three different balls into an order: figure 8.1 middle.
If another two balls have the same colour
1 1 2 2 3 3 the number of permutations reduce further to
4!
2!·2! = 6, see figure 8.1 right. ◁
2 3 1 3 1 2
3 2 3 1 2 1 Example 8.6. In Germany playing lotto is
◁ about choosing six numbers out of 49 where the
Example 8.2. There are 6! = 720 different op- order of the chosen numbers do not play a role.
tions to place six students on six chairs. ◁ Let n = 49 be the number of all possible num-
bers, k1 = 6 be the number of chosen numbers
and k2 = 43 the number of not-chosen numbers.
Theorem 8.3 (Permutations with multiples).
The number of possible choices is:
The number of permutations of n items with k
of them being equal is. n! 49!
nchoices = = = 13 983 816
k1 !k2 ! 6! · 43!
n!
Pn,k = The chance of being the happy winner is:
k!
◁ 1
≈ 7 · 10−8 = 0.000 007%
nchoices
Example 8.3. For n = 3 different balls there ◁
are n! = 6 options to bring them into an order.
If k = 2 of the three balls have the same colour, 8.2. Combinations
there are only n!/k! = 3 options remaining:
Definition 8.5 (Combination). A combination
1 1 2 2 3 3 R G G is a selection of k items out of n different items
2 3 1 3 1 2 ⇒ G R G neglecting the order. We call it a combination
3 2 3 1 2 1 G G R of class k with or without replacement. ◁

Remark: With replacement means a selected
Example 8.4. A waiter wants to place 10 item is put back before the next selection takes
plates on a table. Six plates are white, the other place. Hence, the number of selections may be
plates are red, green, blue and yellow. There are larger than the total number of items.
10! Unlike to the previous section we neglect the
6! = 5040 options to lay out the table. ◁
order of the selected items.

60 February 8, 2023
4! 4! 4!
1!·1!·1!·1! = 24 1!·1!·2! = 12 2!·2! =6 ment is:
n!
1 2 3 4 1 2 3 4 1 2 3 4 Cn,k =
k!(n − k)!
1 2 4 3 1 2 4 3 1 2 4 3
1 3 2 4 1 3 2 4 1 3 2 4 ◁
1 3 4 2 1 3 4 2 1 3 4 2
1 4 2 3 1 4 2 3 1 4 2 3 Example 8.7. For an election of a steering
1 4 3 2 1 4 3 2 1 4 3 2 committee with four members out of 10 candi-
2 1 3 4 2 1 3 4 2 1 3 4 dates the number of different formations of the
2 1 4 3 2 1 4 3 2 1 4 3 committee is:
2 3 1 4 2 3 1 4 2 3 1 4 10!
2 3 4 1 2 3 4 1 2 3 4 1 C10,4 = = 210
4! · (10 − 4)!
2 4 1 3 2 4 1 3 2 4 1 3
2 4 3 1 2 4 3 1 2 4 3 1 ◁
3 1 2 4 3 1 2 4 3 1 2 4
3 1 4 2 3 1 4 2 3 1 4 2 Definition 8.7 (binomial coefficient). We de-
3 2 1 4 3 2 1 4 3 2 1 4 fine  
3 2 4 1 3 2 4 1 3 2 4 1 n n!
=
3 4 1 2 3 4 1 2 3 4 1 2 k k!(n − k)!
3 4 2 1 3 4 2 1 3 4 2 1 as the binomial coefficient and read ’n choose
4 1 2 3 4 1 2 3 4 1 2 3 k’. ◁
4 1 3 2 4 1 3 2 4 1 3 2
4 2 1 3 4 2 1 3 4 2 1 3 Example 8.8. We analyse again the German
4 2 3 1 4 2 3 1 4 2 3 1 lotto. Choosing k = 6 numbers out of n = 49 dif-
4 3 1 2 4 3 1 2 4 3 1 2 ferent numbers results for the number of com-
4 3 2 1 4 3 2 1 4 3 2 1 binations:
⇓ ⇓  
49 49!
Cn,k = = = 13 983 816
6 6!(49 − 6)!

Theorem 8.8 (Combinations with replace-


ment). The number of options to choose k items
out of n different items with replacement is:
 
n+k−1 (n + k − 1)!
Cn,k = =
k k!(n − 1)!

Example 8.9. What is the number of different


outcomes when throwing two six-sided dice?
Figure 8.1.: Permutations of 4 balls Here the items are the numbers one to six, i.e.
n = 6. The number of choices are the number
of throws, i.e. k = 2. Hence, the total number
of different outcomes is:
Theorem 8.6 (Combinations without replace-
ment). The number of combinations to choose
 
6+2−1 (6 + 2 − 1)!
k items out of n different items without replace- C6,2 = = = 21
2 2!(6 − 1)!

February 8, 2023 61
Example 8.11. A four bit binary number may
be looked at as four selections from the set
{0, 1} with replacement. I.e. either the one or
the zero is selected, but then replaced so that
both items are available for the next selection.
The number of variations is:

V2,4 = 24 = 16

0000 0100 1000 1100


0001 0101 1001 1101
0010 0110 1010 1110
◁ 0011 0111 1011 1111

8.3. Variations
8.4. Summary
Definition 8.9 (Variations). A variation is a
selection of k out of n different items with Summary of the equations for combinatorics:
or without replacement minding the order of
recurrence
items. I.e. variations are combinations minding
without with
the order of items. ◁
n!
permutations Pn = n! Pn,k =
k!
Theorem 8.10 (Variations without replace-    
ment). The number of variations for a selection n n+k−1
combinations Cn,k = Cn,k =
of k items out of n different items without re- k k
placement is:  
n
variations Vn,k = k! Vn,k = nk
 
n n! k
Vn,k = k! =
k (n − k)!

8.5. Problems

Example 8.10. We again look at an election Problem 8.1: How many options are there to
of a steering committee with four members out place eight people on eight chairs?
of 10 candidates. This time the roles within
Problem 8.2: For a race with ten participants
the steering committee are chairman, his/her
how many different placings are there for place
representative, the treasurer and the secretary.
one (fastest) to ten (slowest).
The number of different possible formations of
the committee is: Problem 8.3: How many options are there
to place two women and two men on six chairs
 
10 10!
V10,4 = 4! = = 5 040 w.r.t. to their gender?
4 (10 − 4)!
◁ Problem 8.4: How many different values can
a byte-variable (8 bits) have with exactly four
bits being one?
Theorem 8.11 (Variations with replacement).
The number of variations for a selection of k Problem 8.5: Assuming a painter has eight
items out of n different items with replacement different colours available and uses three differ-
is: ent of them to mix a new colour. If he always
Vn,k = nk takes the same amount of each colour (e.g. 1 ml
◁ from each of the three colours) how many dif-
ferent colours is he able to create?

62 February 8, 2023
Problem 8.6: Out of 9 different fruits you
choose four different to prepare a fruit salad.
How many options do you have?

Problem 8.7: Yahtzee (in Germany Kniffel )


is a famous game with five dice. How many dif-
ferent combinations are there for a single throw?

Problem 8.8: How many different outcomes


are expected throwing a coin six times neglect-
ing the order of outcomes?

Problem 8.9: How many different options


would the German lotto (6 out of 49 different
numbers) have if the order is minded?

Problem 8.10: For a hundred meter sprint


how many options are there for eight runners
to take the positions one, two and three?

Problem 8.11: For a number system with


base n, how many different numbers can be ex-
pressed with k digits?

Problem 8.12: A manager has to delegate


four different tasks to his twelve staff members.
Each task requires only one staff member and
a staff member may take more than one task.
How many options does the manager have?

February 8, 2023 63
9. Probability theory
9.1. Introduction Mercedes by the following game: You enter a
room with three doors. Behind one door there
When dealing with functions any valid input is the Mercedes, whereas each of the other two
leads to a unique output. E.g. sin(π/6) has the doors hide a goat. The rules of the game are as
unique value 21 and nothing else. Applying a follows:
function to an input is a deterministic process.
Throwing an unbiased six-sided die results in • First you choose one of the doors without
an unpredictable number between one and six. opening it.
We do not know in advance whether the number
one will appear, however, we expect on average • Then the show-master (who knows where
for every sixth throw a one. Throwing a die is the Mercedes is) opens one of the other
a stochastic process. doors with a goat behind it.

• Finally you can either open the door of


your first choice, or you change your mind
and open the other not yet opened door. If
you find the Mercedes, it’s yours!

The question is: Should you keep your first


choice, or should you open the other yet closed
door? Which door has the higher probability to
Example 9.1. Deterministic and stochastic in-
hide the Mercedes?
juries.
Suppose you chose door 1 and the show-
In medicine when exposed to some ionizing
master opened door 2 revealing a goat. You
radiation (e.g. x-rays) we distinguish between
then have the choice between door 1 or 3. Let
deterministic and stochastic injuries.
A1 , A2 and A3 be the events that the Mercedes
Deterministic injuries appear for higher ra-
is behind door 1, 2 and 3, respectively. Let fur-
diation doses and have symptoms like skin red-
ther be P(Ak ) the probability that the Mercedes
ness, skin burn etc. An increase of dose leads
is behind door k (k = 1, 2, 3). The question is:
to a higher degree of injury.
Stochastic injuries appear also for low dose • P(A1 ) > P(A3 ) ?
levels. In many cases the patient will experience
no symptoms at all. However, the risk to get • P(A1 ) = P(A3 ) ?
an injury like cancer increases. For a given dose
level the injury can not be predicted. However, • P(A1 ) < P(A3 ) ?
the probabilities are studied and are subject to
further investigations. ◁

Although we can not predict the particular


outcome of a stochastic process, it is possi-
ble to analyse the probability of such processes.
The knowledge of probabilities supports deci- 1 2 3
sion making in many situations. Here is one
example:

Example 9.2. Monty Hall problem.


In a famous quiz-show as the winner of the
day you get the chance to win a brand new Discuss with you neighbour! ◁

64 February 8, 2023
9.2. Sample, sample space and • the event of throwing different faces:
event Aunequal = {(H, T ), (T, H)} ⊆ Ω
When dealing with a stochastic process we per-
form some sort of experiment. Since the out- • the event of throwing heads first:
put of the process varies we perform a number
of experiments to gain an understanding of the AHX = {(H, H), (H, T )} ⊆ Ω
process.
For further discussion we first need to define Performing five experiments, i.e. throwing a
some terms: coin ten times in total may result in the samples
(T, T ), (T, H), (T, H), (H, T ) and (T, H). ◁
Definition 9.1 (Sample, sample space, event).
We call the outcome of a stochastic experi- Example 9.5. For the lifetime of light bulbs in
ment a sample ω. hours we have the sample space
The set of all possible different samples forms
the sample space Ω. Ω = R≥0
We call any subset of the sample space an
We may define the following events:
event A. ◁
• ADOA = {x ∈ R | 0 ≤ x < 100}
Example 9.3. A standard six-sided die has the the event of dead on arrival.
sample space
• Ashort = {x ∈ R | 100 ≤ x < 800}
Ω = {1, 2, 3, 4, 5, 6}. the event of short lifetime.

We now may define several events, e.g. • Atyp = {x ∈ R | 800 ≤ x < 1200}
the event of typical lifetime.
• the event of throwing an even number, i.e.
• Along = {x ∈ R | x ≥ 1200}
Aeven = {2, 4, 6} ⊆ Ω the event of long lifetime.

• the event of throwing an odd number, i.e. Investigating the lifetime of 100 light bulbs of a
particular type may result in:
Aodd = {1, 3, 5} ⊆ Ω
event samples
• the event of throwing a particular number: DOA 4
short 12
Ak = {k} ⊆ Ω for k = 1, . . . , 6 typical 71
long 13
• the event of throwing a number greater
than three: ◁

A>3 = {4, 5, 6} ⊆ Ω Definition 9.2 (finite, countable, continuous).


We call a sample space with finite (or infinite)
Performing experiments give particular sam- number of elements a finite sample space (or
ples. E.g. throwing a die ten times may give infinite sample space).
the samples 1, 4, 3, 2, 6, 4, 4, 6, 3 and 6. ◁ We call a infinite sample space Ω with count-
Example 9.4. Throwing a coin with heads and able (or uncountable) elements countable sam-
tails (H,T) twice has the sample space ple space (or uncountable sample space).
An infinite uncountable sample space is called
Ω = {(H, H), (H, T ), (T, H), (T, T )} continuous sample space.
A finite sample space or infinite countable
Some possible events are: sample space is called discrete sample space. ◁
• the event of throwing the same face twice:
Remark: A finite sample space implies a
Aequal = {(H, H), (T, T )} ⊆ Ω countable sample space.

February 8, 2023 65
Example 9.6. ◁

• The sample space when throwing a coin has


the two elements heads and tails, i.e.
Definition 9.3 (Mutual exclusivity). If the in-
Ω = {H, T } tersection of two events A and B is an empty
set, i.e.
It is a finite, hence discrete sample space.
A∩B =∅
• A standard six-sided die has the sample
space with six elements: then we say the two events are mutually exclu-
sive. I.e. a sample ω is either an element of
Ω = {1, 2, 3, 4, 5, 6}
A or an element of B but never an element of
It is a finite, hence discrete sample space. both. ◁

• The sample space for the number of mea-


sured quanta per second is the set of natu-
ral numbers including zero:
9.3. Probability
Ω = {0, 1, 2, 3, . . .} = N ∪ {0}
Although we can not predict the outcome of a
It is an infinite, countable and, hence, dis- stochastic experiment, we may know the proba-
crete sample space. bility of a given event.
• The time until disintegration of a radioac- E.g. for an unbiased six-sided die we expect
tive atom has the sample space the probability to throw a six to be 61 , i.e. 16 23 %.
On average every 6th throw should result in a
Ω = R≥0 six.
But what is probability and how can we de-
It is an infinite, uncountable and, hence,
fine it?
continuous sample space.


9.3.1. Frequentist probability
If we perform an experiment and get a sample
ω which is an element of the event A, i.e. ω ∈ A, Definition 9.4 (Frequentist probability). For
then we say: The event A took place. n experiments with n samples let nk be the
Since sample space Ω and events Axyz are number of samples being elements of the event
sets, we may apply the same calculation rules Ak . We define the probability P(Ak ) of the
as for sets. event Ak as
Example 9.7.
nk
With the definitions of example 9.3 we have: P(Ak ) = lim
n→∞ n
• A1 ∪ Aeven = {1, 2, 4, 6}

• Aeven ∩ A>3 = {4, 6}

• Aodd = Aeven = Ω \ Aeven = {1, 3, 5}


Example 9.8. When throwing an unbiased six-
• Aodd \ A1 = {3, 5}
sided die what is the probability Aeven of throw-
• 2 ∈ Aeven , 2∈
/ Aodd ing even numbers?
We perform an increasing number of experi-
• {1, 2} ⊆ Ω, {5, 6, 7} ⊈ Ω ments n and plot after every throw the quotient
• Aodd ∩ Aeven = {} = ∅ of the number of even numbers neven and the
total number of experiments n, i.e. neven
n into a
• Aodd ∪ Aeven = Ω diagram.

66 February 8, 2023
neven • P(A \ B) = P(A) − P(A ∩ B)
n
1 ◁

0.8 A B
0.6
A\B A∩B B\A
0.4

0.2
Example 9.9. For an unbiased six-sided die we
0
0 20 40 60 80 100 n have P(A6 ) = 16 as the probability to throw a
six, P(Aeven ) = 12 as the probability to throw an
The more experiments we perform, the closer we even number and P(A>4 ) = 13 as the probability
get to the precise probability of P(Aeven ) = 0.5. to throw a number greater than four.
◁ • The probability to throw a number less or
It becomes obvious that the probability has equal to four is
a value between zero an one: P(A>4 ) = 1 − P(A>4 ) = 1 − 1
= 2
3 3
0 ≤ P(A) ≤ 1
• Since A6 is a subset of A>4 we have
9.3.2. Probability axioms A6 ⊆ A>4 ⇒ P(A6 ) ≤ P(A>4 )
1 1
We now build our understanding of probability {6} ⊆ {5, 6} ⇒ 6 ≤ 3
on the three axioms by Andrey Kolmogorov:
• The probability to throw an even number
Definition 9.5 (Probability axioms). With or a number larger than 4:
X being a stochastic experiment with sample
space Ω and events Ak , k ∈ N we define the P(Aeven ∪ A>4 )
probability P(Ak ) by the following axioms: = P(Aeven ) + P(A>4 ) − P(Aeven ∩ A>4 )
1 1 1 2
Axiom 1: For all Ak ⊆ Ω we have = 2 + 3 − 6 = 3
P(Ak ) ∈ R≥0
• The probability to throw an even number
Axiom 2: that is not larger than 4:
P(Ω) = 1
P (Aeven \ A>4 )
Axiom 3: If A1 ∩ A2 = ∅ then = P(Aeven ) − P(Aeven ∩ A>4 )
P(A1 ∪ A2 ) = P(A1 ) + P(A2 ) = 1
− 1
= 1
2 6 3

9.3.3. Calculating with probabilities 9.3.4. Conditional probability


We now derive a number of calculation rules for Conditional probability is the probability of an
probability: event A under the condition, that event B is
given. We denote it by P(A|B) or PB (A).
Theorem 9.6 (Calculating with probabilities).
For two events A and B of a sample space Ω we Theorem 9.7 (Conditional probability). The
have: probability of an event A under the condition
of event B is given by
• P(A) = 1 − P(A)
P(A ∩ B)
• A ⊆ B ⇒ P(A) ≤ P(B) P(A|B) = for P(B) ̸= 0
P(B)
• P(A ∪ B) = P(A) + P(B) − P(A ∩ B) ◁

February 8, 2023 67
We can imagine conditional probability as the Example 9.11. In a company machines 1 and 2
probability with reduced sample space. It is a produce 30% and 70% of the overall production
reduced event A′ = A ∩ B in a reduced sample with 5% and 2% failure rate, respectively. a)
space Ω′ = B. What is the overall failure rate? b) For a failed
sample, what is the probability that it has been
Ω produced by machine 1?
A B Ω′ We define B1 and B2 as the events that a
⇒ A′ product is produced by machine 1 or 2, respec-
tively. We get

Example 9.10. What is the probability for an P(B1 ) = 0.3 P(B2 ) = 0.7
unbiased six-sided die to throw an even number
Any sample is either produced by machine 1
under the condition that the number must be
or by machine 2 – never by both, i.e. B1 and B2
larger than 3?
are mutually exclusive and their union equals
With Aeven as the event of throwing an even
the sample space.
number and A>3 as the event of throwing a
With the event of failure A we have the two
number larger than 3 we get:
conditional probabilities
1
P(Aeven ∩ A>3 ) 3 2
P(Aeven |A>3 ) = = 1 = P(A|B1 ) = 0.05
P(A>3 ) 2
3
P(A|B2 ) = 0.02
This is obviously true since in the set of num-
bers larger than 3 (i.e. {4, 5, 6}) two of three Question a):
numbers are even. ◁
P(A) = P(A ∩ B1 ) + P(A ∩ B2 )
There are situations where conditional proba-
= P(A|B1 )P(B1 ) + P(A|B2 )P(B2 )
bilities are given and unconditional probabilities
need to be evaluated. We rewrite the equation = 0.05 · 0.3 + 0.02 · 0.7 = 0.029 = 2.9%
of theorem 9.7 to:
Question b):
P(A ∩ B) = P(A|B) · P(B)
P(B1 ∩ A) P(A|B1 )P(B1 )
P(B1 |A) = =
If we want to know the probability of an event P(A) P(A)
A but we know only the probabilities under the 0.05 · 0.3 15
= = ≈ 0.52 = 52%
condition B and B we can use this method. 0.029 29
Since ◁
A = (A ∩ B) ∪ (A ∩ B)
and 9.3.5. Independence
(A ∩ B) ∩ (A ∩ B) = ∅
In the previous examples we saw that the condi-
we can write tional probability of an event A may differ from
P(A) = P((A ∩ B) ∪ (A ∩ B)) its unconditional probability. However, if the
unconditional probability of an event A equals
= P(A ∩ B) + P(A ∩ B) the probability of A under the condition of B,
P(A) = P(A|B)P(B) + P(A|B)P(B) then we say the two events A and B are inde-
pendent.
Theorem 9.8 (Sum of conditional probabili-
ties). If B1 , B2 , . . . are mutually exclusive and Definition 9.9 (Independence). Let A and B
their union equals the sample space, i.e. for be two events. If the probability P(A) equals
every experiment exactly one of the events the conditional probability P(A|B), i.e.
B1 , B2 , . . . must occur, then we have:
P(A) = P(A|B)
X X
P(A) = P(A ∩ Bk ) = P(A|Bk )P(Bk )
then we say A and B are independent events.
k k

68 February 8, 2023
Example 9.12. An aircraft passenger has been Problem 9.4: For the two events A and B
caught having a bomb (without fuse) in his lug- with the probabilities P(A) = 0.3, P(B) = 0.5
gage. When taken to task he replied: “I took and P(A ∩ B) = 0.2 resolve the following ex-
the bomb with me since it is more unlikely to pressions.
have two bombs on one plane than only one.”
1. P(A ∪ B) 4. P(A ∩ B)
Where is the mistake in his argument?
Let A be the event that a terrorist places a 2. P(A \ B) 5. P(A ∩ B)
bomb into the plane and B the event that the 3. P(B \ A) 6. P(A \ B)
passenger takes his bomb with him.
The passenger argues that
Problem 9.5: For the two events A and B
P(A ∩ B) ≤ P(A) with the probabilities P(A) = 0.3, P(B) = 0.5
and P(A ∩ B) = 0.2 find the conditional proba-
which is true since (A ∩ B) ⊆ A. However, as- bilities.
suming that the caught passenger and the po-
1. P(A|B) 2. P(B|A)
tential terrorist do not influence each other, the
two events A and B are independent and we
get: Problem 9.6: For the two mutually exclusive
P(A) = P(A|B) events A and B find the conditional probabili-
ties.
Hence, the caught passenger is wrong and he
can not influence the probability the terrorist 1. P(A|B) 2. P(B|A)
placing a bomb into the plane. ◁
Problem 9.7: The machines 1, 2 and 3 of a
9.4. Problems light bulb manufacturer produce 20%, 30% and
50% of the overall production with 5%, 3% and
2% failure rate, respectively.
Problem 9.1: For the sample space and the a) What is the overall failure rate?
events b) For a failed light bulb what are the prob-
abilities that it has been produced by machine
Ω = {1, 2, 3, A, B, C}
1, 2 or 3?
AL = {A, B, C}
AN = {1, 2, 3} Problem 9.8: The number of road deaths in
Germany split into age groups for 2010 were:
Ak = {k} for k = 1, 2, 3, A, B, C
no. age population road deaths
find the following sets in extensional definition. 1 < 15 10,941,200 104
2 15 − 25 9,136,400 791
1. AL ∪ AN 4. AB \ AN 3 25 − 65 44,829,800 1,842
2. AL ∩ AN 5. Ω \ AL 4 65 ≤ 16,844,300 910
3. A1 6. (AC ∪ AN ) \ A2 a) Find the probabilities for a person to be in
age group 1 to 4.
Problem 9.2: What does mutual exclusivity b) For each age group find the probability for
mean? a person to die due to road death.
c) Find the overall probability of road death
Problem 9.3: For the mutually exclusive by the results of a) and b).
events A and B with the probabilities P(A) = d) By the results of a) to c) what is the prob-
0.2 and P(B) = 0.3 resolve the following expres- ability of a road fatality to be in age group 1 to
sions. 4?

1. P(A) 4. P(A \ B) Problem 9.9: For the two events A and B we


2. P(A ∪ B) 5. P(B \ A) have P(A) = 0.5, P(B) = 0.3 and P(A ∩ B) =
0.15. Are the two events A and B indepen-
3. P(A ∩ B) 6. P(A \ B) dent?

February 8, 2023 69
10. Stochastic
10.1. Random variable The dots in the following diagram indicate func-
tion values at points of discontinuities:
10.1.1. Definition of random variables
F (x)
When dealing with stochastic processes we are 1
often interested in values of the random process
in terms of real numbers. E.g. when throwing
a six-sided die we are interested in the number
on the upper side.
Some stochastic outputs are no numbers, e.g.
favourite colours, types of mobiles produced or
the two faces of a coin. However, in many situ- 0 x
1 2 3 4 5 6
ations the outputs can be replaced by numbers.
E.g. for a coin heads may be given a one and ◁
tails a zero.
Definition 10.3 (Probability mass function).
Definition 10.1 (Random variable). We call
For a discrete random variable X with sample
a stochastic process with sample space Ω ⊆ R
space Ω we define the probability mass function
containing real numbers only a random vari-
p(x) as:
able. 
Ω→R
A random variable with discrete sample space p:
x 7→ P(X = x)
is called discrete random variable.
A random variable with continuous sample ◁
space is called continuous random variable. ◁
Example 10.2. An unbiased six sided die with
We denote a random variable by an upper the numbers 1 to 6 has the following probability
case letter, e.g. X. mass function:

Definition 10.2 (Cumulative distribution 1/6 for x = 1, 2, . . . , 6
p(x) =
function). We define the cumulative distribu- 0 otherwise
tion function or just distribution function F (x),
p(x)
x ∈ R of a random variable X by
1
F (x) = P(X ≤ x) 6

I.e. the cumulative distribution function F (x) 0


is the probability for X being less or equal to x. 1 2 3 4 5 6 x


Example 10.1. The cumulative distribution
function of an unbiased six-sided die with the Definition 10.4 (Probability density func-
numbers one to six is given by: tion). For a continuous random variable X with
 sample space Ω ⊆ R the probability density

 0 for x<1 function f : Ω → R is a function with its in-



 1/6 for 1 ≤ x < 2 tegral from −∞ to x being the cumulative dis-
 1/3 for 2 ≤ x < 3 tribution function F (x), i.e.


F (x) = 1/2 for 3 ≤ x < 4 Z x
2/3 for 4 ≤ x < 5 F (x) = f (x′ ) dx′






 5/6 for 5 ≤ x < 6 −∞

for 6 ≤ x ◁

1

70 February 8, 2023
Both, the probability mass function p(x) and ◁
the probability density function f (x) are non-
negative. For a continuous random process X the prob-
ability of the event a ≤ X ≤ b can be visualized
p(x) ≥ 0 f (x) ≥ 0 for all x ∈ Ω as the area between the abscissa and the prob-
ability density function on the interval [a, b]:
The sum of all probabilities of a probability
mass function p(x) must be one:
f (x)
X X
p(x) = P (x = X) = 1 P(a ≤ X ≤ b)
Ω Ω

The definite integral of a probability density


function f (x) over its entire sample space Ω ⊆ R
must be one:
Z
f (x) dx = 1 a b x

With f (x) = 0 for all x ∈


/ Ω we have: For a probability density function f (x) the
Z ∞ probability of a particular value x0 is zero:
f (x) dx = 1
−∞
P(X = x0 ) = 0
Example 10.3. A continuous random variable
X has the sample space Ω = [0, 2) with all val- Hence, for a continuous random variable X the
ues having the same probability. We then have probability of X being less than a limit x and
the cumulative distribution function F (x) and the probability of X being less or equal to x are
the probability density function f (x): the same:

 0 for x < 0 P(X < x) = P(X ≤ x) for X being cont.
x
F (x) = for 0 ≤ x < 2
 2
1 otherwise 10.1.2. Characteristics of random
 1
f (x) = 2 for 0 ≤ x < 2 variables
0 otherwise
Definition 10.5 (Expectation). The expecta-
tion µ of a discrete random variable X with
sample space Ω = {x1 , x2 , . . . , xn } and proba-
F (x) bility mass function p(x) is defined by
1
n
X n
X
µ = E(X) = xk P(X = xk ) = xk p(xk )
k=1 k=1

where E is the expectation operator .


The expectation µ of a continuous random
x variable X with sample space Ω = R and prob-
0 2 ability density function f (x) is defined by:
Z ∞
f (x)
µ = E(X) = x f (x) dx
−∞

1 ◁
2
The expectation of of a random variable X
yields no information about the variation of X.
A useful quantity is the average value of the
x square of the difference between X and its ex-
0 2 pectation µ:

February 8, 2023 71
Definition 10.6 (Variance and standard devi- x1 = 1 x2 = 2 x3 = 3
ation). For X being a random variable with ex- p(x1 ) = 1
p(x2 ) = 1
p(x3 ) = 1
2 3 6
pectation µ we define the variance σ 2 = Var(X) 3 3
as:
X X
µ = E(X) = xk P(X = k) = k p(k)
σ 2 = Var(X) = E[(X − µ)2 ] k=1 k=1
1 1 1
We =1· +2· 3 +3 · = 1 23
p call the square root of the variance σ = 2 6
Var(X) the standard deviation of X around X3
its expectation µ. ◁ σ 2 = Var(X) = (xk − µ)2 P(X = xk )
k=1
For a discrete random variable X with sample 3
X
space Ω = {x1 , x2 , . . . , xn }, probabilities p(xk ), = (k − 1 23 )2 p(k)
k = 1, 2, . . . , n and expectation µ we get: k=1
2 2 1 1 2 1 4 2 1
  
2
σ = Var(X) = E[(X − µ) ] 2 = 3 · 2 + 3 · 3 + 3 · 6
n 5
X =≈ 0.556
= (xk − µ)2 p(xk ) 9 √
k=1 p 5
σ = Var(X) = ≈ 0.745
3
For a continuous random variable X with

sample space Ω = R, probability density func-
tion f (x) and expectation µ we get: Example 10.6. A continuous random variable
X has the probability density function f (x):
σ 2 = Var(X) = E[(X − µ)2 ] 
Z ∞  1 + x for − 1 ≤ x < 0
= (x − µ)2 f (x) dx f (x) = 1 − x for 0 ≤ x < 1
0 otherwise

−∞

Both, variance and standard deviation cannot f (x)


be negative, i.e. σ 2 ≥ 0 and σ ≥ 0.
1
Example 10.4. For an unbiased six-sided die
with numbers one to six we have:

Ω = {1, 2, 3, 4, 5, 6}
xk = k for k = 1, . . . , 6 −1 0 1 x
6 6
X X 1 What is the expectation, variance and standard
E(X) = µ = xk P(X = xk ) = k
6 deviation?
k=1 k=1 Z ∞
1 6(6 + 1) µ = E(X) = x f (x) dx
= · = 3 12
6 2 −∞
6
Z 0 Z 1
= x(1 + x) dx + x(1 − x) dx
X
Var(X) = (xk − µ)2 P(X = xk )
−1 0
k=1 0 1
2 1 3 2 1 3
1 1
6 = 2x + 3x −1
+ 2x − 3x 0
X 1
= (k − 3 12 )2 = − 12 + 1
+ 1
− 1
=0
6 3 2 3
k=1 Z ∞
2
2 35 σ = Var(X) = (x − µ)2 f (x) dx
= (2.52 + 1.52 + 0.52 ) = ≈ 2.92 −∞
6 r 12 Z 0 Z 1
2
p
σ = Var(X) =
35
≈ 1.71 = x (1 + x) dx + x2 (1 − x) dx
12 −1 0
3
0  1 3 1 4 1
+ 14 x4
1
◁ = 3x −1
+ 3x − 4x 0
1 1 1
− +
= 3 4 3 − 41 = 1
6 ≈ 0.167
Example 10.5. For an unbiased six-sided die p 1
with numbers 1, 1, 1, 2, 2 and 3 we have: σ = Var(X) = √ ≈ 0.408
6
Ω = {1, 2, 3} ◁

72 February 8, 2023
10.1.3. Modified random variable What is the expectation µ, variance σ 2 and
standard deviation σ?
Theorem 10.7 (Modified random variable).
We realize that the probability density func-
Let X be a random variable with expectation
tion equals the one from example 10.6 except
µ, variance σ 2 and standard deviation σ. Let
for a factor a = 12 and an offset of b = 1. With
further be
µ′ , σ ′2 and σ ′ as the expectation, variance and
and standard deviation of example 10.6 we get:
X ′ = aX + b for a, b ∈ R
µ = 21 µ′ + b = 0 + 1 = 1
be a random variable equal to X scaled by a
σ 2 = ( 12 )2 σ ′2 = 41 · 16 = 24
1
≈ 0.042
with offset b.
We then have for the expectation µ′ , variance 1
σ = 21 σ ′ = √ ≈ 0.204
σ and standard deviation σ ′ of X ′ :
′2 2 6

µ′ = aµ + b σ ′2 = a2 σ 2 σ ′ = |a| σ
10.1.4. Sum of random variables

Theorem 10.8 (Expectation of two random
variables). With X and Y being two random
Example 10.7. An unbiased six-sided die has
variables we have
the numbers 0, 2, 4, 6, 8 and 10. What is the
expectation µ, variance σ 2 and standard devia- E(X + Y ) = E(X) + E(Y )
tion σ?
For an unbiased six-sided die Xprev with the ◁
numbers one to six we know from example 10.4
q Before analysing the variance of the sum of
µprev = 3 12 , σprev
2 = 35
12 and σprev = 35
12 . two random variables X and Y we have to in-
We realize that: troduce the concept of covariance:

X = aXprev + b with a = 2 and b = −2 Definition 10.9 (Covariance). With two ran-


dom variables X and Y and their expectations
Hence we get: µX and µY , respectively, we define

µ = aµprev + b = 2 · 3 21 − 2 = 5 Cov(X, Y ) = E[(X − µX )(Y − µY )]

σ 2 = a2 σprev
2
= 22 · 12
35
= 35
3 ≈ 11.67 as the covariance of X and Y . ◁
q q
σ = |a| σprev = 2 35 12 =
35
3 ≈ 3.416 A useful expression for the covariance is given
by

Cov(X, Y ) = E[(X − µX )(Y − µY )]
Example 10.8. A continuous random variable = E[XY − XµY − Y µX + µX µY ]
X has the probability density function f (x):
= E[XY ]−µY E[X]−µX E[Y ]+µX µY
 4x − 2 for 21 ≤ x < 1 = E[XY ] − µY µX − µX µY + µX µY

f (x) = 6 − 4x for 1 ≤ x < 32 = E[XY ] − µX µY


0 otherwise

= E[XY ] − E[X] E[Y ]

f (x)
2 Theorem 10.10 (Variance of two random vari-
ables). The variance of the sum of two random
variables X and Y is given by:

Var(X +Y ) = Var(X) + Var(Y ) + 2 Cov(X, Y )


1 3 x
2 1 2 ◁

February 8, 2023 73
Theorem 10.11 (Independent random vari- = (1 − 0.4)2 · 0.4 + (0 − 0.4)2 · 0.6 = 0.24
ables). With X and Y as two independent ran- 2
X
dom variables we have: σY2 = (yk − µY )2 (p1k + p2k )
k=1
Cov(X, Y ) = 0 = (1 − 0.61)2 · 0.61 + (0 − 0.61)2 · 0.39
Var(X +Y ) = Var(X) + Var(Y ) = 0.2379
q √
◁ σX = σX 2 = 0.24 ≈ 0.490
q √
σY = σY2 = 0.2379 ≈ 0.488
Definition 10.12 (Correlation). With X and
Y being two random variables with their stan- Covariance and correlation are given by:
dard deviations σX and σY , respectively, we de-
Cov(X, Y ) = E(XY ) − E(X)E(Y )
fine the correlation as
= x1 y1 p11 + x1 y2 p12 + x2 y1 p21
Cov(X, Y )Cov(X, Y )
Corr(X, Y ) = p = + x2 y2 p22 − µX µY
Var(X) Var(Y ) σX σY
= 1·1·0.28 + 1·0·0.12 + 0·1·0.33
We get: Corr(X, Y ) ∈ [−1, 1] ◁ + 0·0·0.27 − 0.61·0.4
= 0.28 − 0.244 = 0.036
Example 10.9. Let’s assume a survey under Cov(X, Y ) 0.036
all first term students about their attitude to- Corr(X, Y ) = q =√
σ2 σ2 0.2379 · 0.24
wards maths and whether they are musicians or X Y

not. The outcome of the survey was: ≈ 0.151


like math don’t like math For the sum of X and Y we have:
musician 28% 12% µX+Y = µX + µY = 0.4 + 0.61 = 1.01
not musician 33% 27% 2 2
σX+Y = σX + σY2 + 2 Cov(X, Y )
We define AX as the event to be a musician = 0.24 + 0.2379 + 2·0.036 = 0.5499
and AY as the event of loving math. We give be q √
σX+Y = σX+Y2 = 0.5499 ≈ 0.742
musician and like maths the value one and the
other the value zero to get two random variables Since Corr(X, Y ) ̸= 0 the two random variables
X and Y . With pXY we get: X and Y are statistically dependent. ◁
x 1 = y1 = 1 x2 = y2 = 0 Definition 10.13 (independent and identically
p11 = 0.28 p12 = 0.12 distributed). We call two random variables X
p21 = 0.33 p22 = 0.27 and Y independent and identically distributed ,
i.i.d., if their covariance is zero and they have
Expectation µ, variance σ 2 and standard devi- the same probability density function fX (x) and
ation σ for X and Y are: fY (x) or the same probability mass function
2
pX (x) and pY (x), i.e.
X
µX = xk (pk1 + pk2 ) Cov(X, Y ) = 0
k=1
fX (x) = fY (x) or pX (x) = pY (x)
= x1 (p11 + p12 ) + x2 (p21 + p22 )

= 1 · 0.4 + 0 · 0.6 = 0.4
2
X
µY = yk (p1k + p2k ) 10.2. Discrete random
k=1
= y1 (p11 + p21 ) + y2 (p12 + p22 )
distributions
= 1 · 0.61 + 0 · 0.39 = 0.61 10.2.1. Binomial distribution
2
Suppose we perform n i.i.d. experiments each of
X
2
σX = (xk − µX )2 (pk1 + pk2 )
k=1
them having the outcome success with a proba-

74 February 8, 2023
bility p. Let us assume the random variable X Example 10.11. Let X be the number of ones
gives the number of successes for n trials. I.e. thrown by two unbiased six-sided dice with the
we combine n experiments to one random vari- numbers 1−6. We have p = 61 as the probability
able X with sample space Ω = {0, 1, 2, . . . , n}. of throwing a one with one die. For the events
A0 , A1 and A2 of throwing zero, one or two ones
Theorem 10.14 (Binomial distribution). Let the probabilities are:
Xb be a random variable representing the num-
ber of successes of n i.i.d. experiments. Each  
2 1 0
experiment has a success probability p. Then P(A0 ) = ( ) (1 − 61 )2 = 25
≈ 69.4%
0 6 36
the probability P(Xb = k) for exactly k successes  
2 1 1
is given by P(A1 ) = ( ) (1 − 61 )1 = 10
≈ 27.8%
  1 6 36

n k
 
p (1 − p)n−k 2 1 2
P(Xb = k) =
k P(A2 ) = ( ) (1 − 61 )0 = 1
≈ 2.8%
2 6 36

 
n n! ◁
where =
k k!(n − k)!
We call this a binomial random variable with bi-
nomial distribution. Expectation and variance 10.2.2. Poisson distribution
are given by
As for a binomial distribution we perform n
µb = E(Xb ) = np identical experiments with the number of suc-
cesses being a random variable X.
σb 2 = Var(Xb ) = np(1 − p)
◁ We now increase the number of experiments
n and decrease the probability of success of a
single experiment p in a way that the product
Example 10.10. The following graphs show
λ = np remains constant. For the limit n → ∞
the binomial distribution for n = 10 experi-
the random variable X takes on the Poisson
ments and different single experiment probabil-
distribution:
ities p:

P(X = k) Definition 10.15 (Poisson distribution). A


0.6 random variable XP with sample space Ω =
p = 0.05
{0, 1, 2, . . .}, λ ∈ R>0 and probability mass
p = 0.1 function
0.4 p = 0.5 p = 0.8
p = 0.2
λk
p(k) = P(XP = k) = e−λ , k = 0, 1, 2, . . .
0.2 k!

is said to be a Poisson random variable with


0
0 2 4 6 8 10 k Poisson distribution. ◁

F (x)
Theorem 10.16 (Poisson distribution). With
1 p = 0.1 the conditions of the previous definition expec-
tation and variance are given by:
p = 0.2

0.5 E(XP ) = Var(XP ) = λ


p = 0.5 p = 0.8

0 2 4 6 8 10 k
Example 10.12. The following graphs show
◁ Poisson distributions for different λ:

February 8, 2023 75
P(X = k) 10.3. Continuous random
0.6 distributions
λ = 0.5

0.4 λ=1 10.3.1. Uniform distribution


λ=2 Definition 10.17 (Uniform distribution). For
λ=5 a, b ∈ R and a < b the continuous random vari-
0.2
able Xu with probability density function
 1
0.0
f (x) = b−a for a ≤ x < b
0 2 4 6 8 10 k 0 otherwise

F (x) is said to be a uniform random variable with


uniform distribution. ◁
1 λ=1
λ=2 Theorem 10.18 (Uniform distribution). For
the definition above expectation and variance
0.5 λ=5 λ=8 are given by
a+b
µu = E(Xu ) =
2
k (b − a)2
0 2 4 6 8 10 σu 2 = Var(Xu ) =
12
◁ ◁

Example 10.13. A shop expects Saturday af-


f (x)
ternoon on average four customers per minute.
1
The random variable X as the number of cus- b−a
tomers per minute then has a Poisson distribu-
tion. With λ = 4 we get the following probabil-
ities:
k P(X = k) k P(X = k) a b x
0 1.83% 7 5.95%
1 7.33% 8 2.98%
F (x)
2 14.65% 9 1.32%
3 19.54% 10 0.53% 1
4 19.54% 11 0.19%
5 15.63% 12 0.06%
6 10.42% 13 0.02%

P(X=k) x
a b
20%
Example 10.14. Pseudo random number gen-
erator
10% Many computer languages provide a so called
pseudo random number generator , PRNG to
generate some sort of random numbers. A
PRNG provides numbers on a given interval
0% with uniform distribution.
0 2 4 6 8 10 12 k Although talking about random numbers, a
PRNG is deterministic, i.e. starting the PRNG
◁ a second time with the same parameters will

76 February 8, 2023
result in exactly the same numbers. Neverthe- f (x)
less, the generated numbers behave like random
numbers in terms of probability, expectation √1
2π σ
and variance.
A simple implementation of a PRNG is a lin-
ear congruential generator : The next number
xk+1 is evaluated from the previous number xk
by
xk+1 = (a xk + c) mod m x
µ−2σ µ−σ µ µ+σ µ+2σ
with a, c, m ∈ N. The parameters a, c and m
must be chosen thoroughly to gain an accept- Example 10.15. We analyse a resistor with
able quality. R = 1 kΩ connected to a perfect constant cur-
In order to gain unpredictable random num- rent source with I = 1 mA and measure the
bers a useful technique is to initialize the ran- voltage u(t) across the resistor with an oscillo-
dom number generator by the actual time. I.e. scope.
the first random number x0 is set to a desired
value derived from the computer time. 1 mA
Strictly speaking a PRNG represents a dis-
crete random variable X with discrete sample
1 kΩ u(t)
space Ω = {0, 1, 2, . . . , xmax }. However, for
many applications the PRNG is sufficient as in-
put for a continuous random variable.
E.g. dividing the pseudo random variable X In theory we expect a perfect constant voltage
by the maximum value xmax provides a random u(t) = 1 V. However, amplifying the signal at
variable with values from zero to one with a the oscilloscope in AC mode we discover some
high density. ◁ sort of noise caused by atomic effects within the
resistor. The voltage may be looked at as a ran-
dom variable and we will discover normal distri-
10.3.2. Normal distribution bution. The expectation is µ = 1 V. Variance
Definition 10.19 (Normal distribution). For σ 2 and standard deviation σ depend on the con-
µ, σ ∈ R and σ > 0 a random variable Xn with struction of the resistor. ◁
probability density function
If Xn is a normal random variable with expec-
tation µ and standard deviation σ, then aXn +b,
(x − µ)2
 
1 a, b ∈ R, a > 0 again is a normal random vari-
f (x) = √ exp −
2π σ 2σ 2 able.
With a = σ1 and b = − σµ we get the standard
is said to be a normal random variable with normal random variable Xsn :
normal distribution. ◁
Xn µ Xn − µ
Xsn = − =
σ σ σ
Theorem 10.20 (Normal distribution). For
the definition above expectation and variance Definition 10.21 (Standard normal distribu-
are given by tion). We define a random variable Xsn with
probability density function
E(Xn ) = µ Var(Xn ) = σ 2
1 2
fsn (x) = ϕ(x) = √ e−x /2
◁ 2π

as a standard normal random variable with


The normal probability density function is a standard normal distribution. ◁
bell shaped function symmetric around x = µ:

February 8, 2023 77
ϕ(x) The cumulative distribution function Fn (x)
√1
of a normal distributed random variable Xn
2π with expectation µ and standard deviation σ
may be expressed by the cumulative distribu-
tion function Φ(x) of the standard normal ran-
dom variable Xsn :

Fn (x) = P(Xn ≤ x) = P (Xn − µ ≤ x − µ)


−2 −1 0 1 2 x  
Xn − µ x−µ
=P ≤
σ σ
The cumulative distribution function Φ(x) =
   
x−µ x−µ
Fsn (x) is the integral of the probability density = P Xsn ≤ =Φ
σ σ
function ϕ(x) from −∞ to x:
Typical questions are: What is the probabil-
Z x Z x
1 ′2 ity a for a standard normal random variable Xsn
Φ(x) = ϕ(x′ ) dx′ = √ e−x /2 dx′ to be larger than xa ?
−∞ 2π −∞
a = P(Xsn > xa ) = 1 − Φ(xa )
Φ(x)
Conversely we may ask: What is the value xa
1 for a standard normal random variable Xsn to
be larger than with a probability a? E.g. x0.1 =
1.282 is the value for a standard normal random
1
2 variable to be larger than with a probability of
10%.
ϕ(x)
−2 −1 0 1 2 x

For the random variable with standard nor-


mal distribution we have:
a
2
µsn = 0 σsn = σsn = 1

Values for the cumulative distribution func- xa x


tion may either be evaluated numerically or de-
rived from tables as the one below. Since ϕ(x) Example 10.16. What is the probability of a
is symmetric around x = 0 we have Φ(−x) = normal random variable with expectation 1 and
1 − Φ(x) and, hence, we limit the table to argu- standard deviation 0.5 to be larger than 2?
ments x ≥ 0. With Xn as the normal random variable,
µ = 1 as the expectation, σ = 0.5 as the stan-
x Φ(x) x Φ(x) x Φ(x) dard deviation, xa = 2 as the limit and a as the
0.0 0.50000 1.2 0.88493 2.4 0.99180 probability of Xn being greater than xa we get:
0.1 0.53983 1.3 0.90320 2.5 0.99379
0.2 0.57926 1.4 0.91924 2.6 0.99534 a = P(Xn > xa ) = 1 − P(Xn ≤ xa )
0.3 0.61791 1.5 0.93319 2.7 0.99653 = 1 − P(Xn − µ ≤ xa − µ)
0.4 0.65542 1.6 0.94520 2.8 0.99744
 
Xn − µ xa − µ
0.5 0.69146 1.7 0.95543 2.9 0.99813 =1−P ≤
σ σ
0.6 0.72575 1.8 0.96407 3.0 0.99865 
xa − µ

0.7 0.75804 1.9 0.97128 3.2 0.99931 = 1 − P Xsn ≤
σ
0.8 0.78814 2.0 0.97725 3.4 0.99966    
xa − µ 2−1
0.9 0.81594 2.1 0.98214 3.6 0.99984 =1−Φ =1−Φ
1.0 0.84134 2.2 0.98610 3.8 0.99993 σ 0.5
1.1 0.86433 2.3 0.98928 4.0 0.99997 = 1 − Φ(2) = 1 − 0.977 = 2.3%

78 February 8, 2023
fn (x) Example 10.17. The following diagram shows
√2
the probability density functions of a sum of
2π i.i.d. uniform distributed random variables each
on the interval [0, 1). With increasing number
the expectation, variance and standard devia-
tion increase.
2.3%
f (x) n=1
n=2
−1 0 1 2 3 x n=3
1 n=4
n=5
◁ n=6

The probabilities of a normal random variable


to be within the limits of ±σ, ±2σ etc. are also
of interest. The following graph illustrates some
of these probabilities. x
0 1 2 3 4
ϕ(x)
For a single random variable we get:
99.7% 1 1 1
µ1 = σ12 = σ1 = √
95.4% 2 12 12
68.3% For the sum of n random variables we get:
n
µn = nµ1 =
2
2.1% 13.6% 34.1% 34.1% 13.6% 2.1% n
2 2
σn = nσ1 =
12r
−3 −2 −1 0 1 2 3 x
√ n
σn = n σ1 =
12
E.g. the probabilitiy of Xsn to be within ±σ,
i.e. ±1 is: If we subtract from the sum of n random vari-
ables the expectation µn and divide by the stan-
P(|Xsn | < 1) = P(−1 < Xsn < 1) dard deviation σn we get the graphs illustrated
= P(Xsn < 1) − P(Xsn ≤ −1) in the following diagram:
= P(Xsn ≤ 1) − P(Xsn ≤ −1) f (x)
= Φ(1) − Φ(−1) n=4
ϕ(x)
= Φ(1) − 1 + Φ(1)
= 2 Φ(1) − 1
n=1
= 2 · 0.84134 − 1
n=3
= 0.68264 =
ˆ 68.3%
n=2
Why do we focus so much on normal random
variables? If we deal with the sum of a large x
number of i.i.d. random variables we approach −2 −1 0 1 2
the normal distribution:

Theorem 10.22 (Central limit theorem). Let
X1 , X2 , . . . be a sequence of i.i.d. random vari- 10.3.3. Exponential distribution
ables with expectation µ and standard devia-
tion σ. Then Definition 10.23 (Exponential distribution).
  For λ ∈ R, λ > 0 a random variable Xe with
X1 +X2 +. . .+Xn − nµ probability density function
lim P √ ≤ x = Φ(x)
n→∞ σ n
λ e−λx for x ≥ 0

◁ f (x) =
0 otherwise

February 8, 2023 79
is said to be an exponential random variable f (x)
with exponential distribution. ◁ 1
dmean
For x ≥ 0 the cumulative distribution func-
tion becomes:
Z x Z x

F (x) = f (x′ ) dx′ = λ e−λx dx′
−∞ 0 0 x
h ix dmean 2dmean
1 −λx′
= λ −λ e = 1 − e−λx
0 ◁

0 for x < 0
I.e. F (x) =
1 − e−λx for x ≥ 0 10.4. Problems
f (x)
Problem 10.1: A random variable has a
λ constant probability over its sample space Ω =
[−1, 0). Plot the cumulative distribution func-
tion and the probability density function.

x Problem 10.2: An unbiased six-sided die has


0 1 2
the numbers 1, 1, 2, 2, 3 and 4 on its six faces.
λ λ
Plot the cumulative distribution function.
F (x)
Problem 10.3: A continuous random variable
1
X has the probability density function f (x):

 0 for x < −1
1
f (x) = for − 1 ≤ x < 1
 2
0 for 1 ≤ x
x Plot the cumulative distribution function and
0 1 2
λ λ the probability density function. Evaluate ex-
pectation, variance and standard deviation.

Theorem 10.24 (Exponential distribution). A Problem 10.4: A continuous random variable


random variable Xe with exponential distribu- X has the probability density function f (x):
tion has the expectation and variance: 
0 for x < 0
1 1 f (x) =
E(Xe ) = Var(Xe ) = e−x for x ≥ 0
λ λ2
Evaluate expectation, variance and standard

deviation.

Example 10.18. When shooting randomly Problem 10.5: For a random variable X with
into a forest the bullet will hit earlier or later a sample space Ω = [0, 1) and constant probabil-
tree. The free path of the bullet d may be looked ity density function f (x) over the whole sample
at as a random variable. On average the bullet space, i.e.
will fly a distance dmean which is the mean free 
 0 for x < 0
path. This mean free path dmean depends on the
f (x) = 1 for 0 ≤ x < 1
thickness of the trees and the number of trees
0 for 1 ≤ x

per area.
The random variable for the free path has ex- plot the cumulative distribution function and
1
ponential distribution with λ = dmean . I.e. Most the probability density function.
bullets will be found in the trees close to the Evaluate expectation, variance and standard
shooter. The larger the distance to the shooter deviation. Hint: Make use of the results from
the less bullets will be found. the previous problem.

80 February 8, 2023
Problem 10.6: A continuous random variable (b − a)2
σu 2 = Var(Xu ) =
X has the probability density function f (x): 12

 R→R
Problem 10.11: For a normal distributed
f: x 7→ 0 for x < 0
random variable Xn with expectation µ = 3 and
x 7→ a e−ax for x ≥ 0

standard deviation σ = 1, what is the probabil-
Plot the cumulative distribution function and ity for Xn being
the probability density function.
Evaluate expectation, variance and standard 1. greater than four?
deviation. Find these values a) by applying def- 2. less than one?
initions 10.5 and 10.6 and b) by scaling the re-
sults from previous problems. 3. between two and three?

Problem 10.7: For a six-sided unbiased die 4. outside ±2σ around µ?


with the numbers one to six we define two ran-
dom variables X and Y : Problem 10.12: You have the sum of 100
X returns one for even numbers and zero oth- i.i.d. random variables each with expectation
erwise. Y returns one for the events of throwing µ1 and standard variation σ1 . Approximate the
a 4, 5 or 6 and zero otherwise. sum by a normal random variable Xn defined
1. Evaluate expectation µ, variance σ 2 and by its probability density function fn (x).
standard deviation σ for X, Y .
Problem 10.13: A company produces a large
2. Evaluate covariance and correlation for X number of cylinders with specified diameter of
and Y . 60 ± 0.02 mm. The actual diameter shows a
mean value of 60.01 mm with a standard devia-
3. For X+Y evaluate expectation µ, variance
tion of 0.01 mm. Assuming normal distribution,
σ 2 and standard deviation σ.
what is the failure rate?
4. Are X and Y independent?
Problem 10.14: A company produces resis-
tors that are specified with 1% tolerance. Any
Problem 10.8: For three unbiased standard resistor with a higher deviation is treated as fail-
dice we define the random variable X as the ure.
number of ones and/or sixes thrown. I.e. the Assuming a normal distribution for the actual
sample space of X is Ω = {0, 1, 2, 3}. resistance, what standard deviation σ is accept-
1. Evaluate the probability of X for all ele- able to achieve a failure rate below 1%?
ments of Ω.
Problem 10.15: For an exponential dis-
2. Evaluate expectation µ, variance σ2 and tributed random variable X with expectation
standard deviation σ of X. µ = 3, what is the probability for X being

1. greater than four?


Problem 10.9: You measure with a Geiger-
Mueller counter on average three quanta per 2. less than one?
second. a) What are the probabilities to mea-
sure 0, 1, 2, . . . , 7 quanta per second? b) What 3. between two and three?
is the expectation, variance and standard devi- 4. outside ±σ/2 around µ?
ation for the number of measured quanta per
second?
Problem 10.16: The half-life of the radio-
Problem 10.10: For a uniform random vari- active plutonium nuclide Pu-239 is 24 110 years.
able Xu on the interval [a, b) prove the equations Evaluate expectation, variance and standard
for expectation µu and variance σu 2 : deviation of a random variable that describes
the radioactivity.
a+b
µu = E(Xu ) =
2

February 8, 2023 81
A. Solutions
A.1. Integral calculus 4. ex − ex0 8. cos x0 3 − cos x3
 

Solution 1.1: Solution 1.7: For any constant C:



Rf (4) = π4 (1 + 2) f1 (x) = x + C f5 (x) = − cos(x) + C
π
√ 2
Uf (4) = f2 (x) = x + C f6 (x) = sin(x) + C
4 (2 + 2)
√ 1 3
Lf (4) = π f3 (x) = 3x + C f7 (x) = ex + C
4 2
1 4
f4 (x) = 4x + C f8 (x) = 31 x3 − 21 x2 + x + C
Solution 1.2:
Solution 1.8:
Rf (4) = 12 Uf (4) = 20 Lf (4) = 12
1 x
1. C 5. ln(5) 5 + C
1 x
Solution 1.3: 2. ax + C 6. ln(π) π + C
1 3
Rf (n) = 16(n−1) 3. 3x −x+C 7. 2 sinh(x) + C
n x 1
16(n+1) 4. 3e + C 8. 2 cosh(x) + C
Uf (n) = n
16(n−1)
Lf (n) = Rf (n) = n Solution 1.9:
n 1 10 100 1000 ∞ 1. 5
5. 4
2
Rf (n) 0 14.4 15.84 15.984 16 1
2. 4 6. sin(2πx) + C
Uf (n) 32 17.6 16.16 16.016 16 2π
1 3
Lf (n) 0 14.4 15.84 15.984 16 3. 3x +C 7. − jejx + C
4. e + e1 − 2 ≈ 55.3
4
8. 1
3 tan(3x) + C
Solution 1.4:
14
1. 8 5. 3 Solution 1.10:
2 3 1 2 √
2. 10 6. 3b − 2b √
15 1 3 1 3
1. 23 x3 + C 5. 3 3 x + C
3. 2 7. 2(b − a) + 3b − 3a √
3 1 3 1 3 2. 25 x5 + C 6. x(ln(x) − 1) + C
4. 2 8. 2(a − b) + 3a − 3b √ 1
3. 2 x + C 7. ln(10) x(ln(x) − 1) + C

3
Solution 1.5: 4. 43 x4 + C 8. 1
ln(2) x(ln(x) − 1) + C

13 4
1. 2 5. 3
13
2. − 2 6. − 1
3. 13
7. 4b2 −a2 A.2. Application of integrals
2 2
b3 +a3
4. 1 8. 3
Solution 2.1: m = 1.2 kg

Solution 1.6: Solution 2.2: A = 32 2 cm2 ≈ 45.3 cm2

1. x3 − x0 3 nd2
 
5. sin(2πx) − sin(2πx0 ) 2π
Solution 2.3: A = sin
2. sin(x) − sin(x0 ) 6. e2jπf x − e2jπf x0 8 n

3. cos(x0 ) − cos(x) 7. sin x2 − sin x0 2


 
Solution 2.4: Ansatz:

82 February 8, 2023
3 4
3. √3
7.
2 3
4. 2 8. 0

Solution 3.2:

n
1. sin(x2 ) + C 4. sin(sin x) + C
n−1
kr 2 kr 2
X
sin φ 1 2
X h

h

VL (n) = nπ n
VU (n) = nπ n 2. e +C 5. 2 ln(x + 1) +C
k=0 k=1
3. cosh(x3 ) + C 6. 1 ax+b
ae +C

Solution 2.5: Possible ansatz: Solution 3.3:


Z h √
2 8
V = π r1 − (r1 − r2 ) hx dx 1. sin(3x + 1) + C 4.
0 3
··· 2. cos(1 − x) + C 5. 1
2 3 √ 
= πh
3 (r1 + r1 r2 + r2 2 ) 3.
3
81 − 1 ≈ 2.495 6. e2πjf t + C
4

Solution 2.6: Solution 3.4:


n−1  2 1 √
1. VL (n) =
X

kr r 1. ln |x2 + 1| + C 4. 2 ln x3 + x2 + C
n n 2
k=0 1
2. ln | cosh(x)| + C 5. − ln |x4 − x2 | + C
n  2 2
X kr r ln(2)
2. VU (n) = 4π 3. ln(2) ≈ 0.6931 6. ≈ 0.3466
n n 2
k=1

4
3. V = lim VL (n) = lim VU (n) = πr3 Solution 3.5:
n→∞ n→∞ 3
1
cos(x3 )
Z r
4 1. sin(3) ≈ 0.1411 4. C −
4. V = 4πx2 dx = πr3 3
0 3 2e − 2
2. ≈ 1.146 5. 0
3
Solution 2.7: 3. esin(x) + C 6. 2 ln | sin(x)| + C

u = ũ = û
Solution 3.6:

Solution 2.8: Hint: due to symmetry it is 1. (x − 1)ex + C


sufficient to concentrate on the first quarter of 2. C − (x3 + 3x2 + 6x + 6)e−x
a period only.
3. (x2 − 2) sin(x) + 2x cos(x) + C
û û 4. x cosh(x) − sinh(x) + C
u= ũ = √
2 5. x − π1 eπx + C

3
1
6. 2 (x − sin(x) cos(x)) + C

A.3. Integration techniques Solution 3.7:


1
1. 4 3. 4 5. 4
Solution 3.1: 2. 4 4. 8
6. 1
3
1
1. 1 5.
k−1 Solution 3.8:
2k+1
2. 2 6. 1. 1
{ln |x − 1| − ln |x + 1|} + C
k+1 2

February 8, 2023 83
1 i
2. + 2 ln |x + 2| + C y=1
x+2 1
3. 21 ln |x| + 14 ln |x2 + 2x + 2| y=2
− 23 arctan(x + 1) + C
1
4. 5 ln |x − 1| + ln |x + 1| − 57 arctan(x + 1)
0 y=0 x
− 1
10 ln |x2 + 2x + 2| + C π 2π

y=3

−1
A.4. Functions with multiple
arguments and values
Solution 4.2:
y
Solution 4.1: f =0
2
f = 0.6
f
f = 1.2
y=0 1 f = 1.8
1

−2 −1 1 2 x
−1
1

1
=

2
y

−2
2
=
y

3
=

y
y

0 x
0 1 1 2 g=2
2 g = 1.5
g = 1.0
1 g = 0.5
g
y=0
1
−2 −1 1 2 x
−1
1

1 −2
=

2
y

y
3
=

.5
y

−0
0 = 0
x y h =
0 1 1 h
2 1
0.5
=
h
h
1 y=0 1
=
y=1 h
y=2 x 1.5
y=3 −1 1 =
h
0 x
π 2π
−1

−1 Solution 4.3:

84 February 8, 2023
f (x, y) y ∂f ex+y
∂y =
z2 + z + 1
2
∂f (2z + 1)ex+y
∂z = −
(z 2 + z + 1)2
1 b
4. ∂f
∂a = cd
∂f a
x ∂b = cd
−2 −1 1 2
∂f ab
−1 ∂c = − c2 d

∂f ab
∂d = − cd2
−2 1
5. ∂f
∂u = u
g(x, y) y ∂f vw
∂v = −we
2 ∂f 1 vw
∂w = w − ve

∂f 2π
1 6. ∂α = − 2 sin(2πα)
γ
∂f 2πj
∂β = γ 2 cos(2πβ)
x
−2 −1 1 2
∂f cos(2πα) + j sin(2πβ)
∂β = −2 γ3
−1

Solution 4.6:
−2 X X
1. ∂f
∂x = kxk−1 ∂f
∂y = ky k−1
h(x, y) y k
X
k
X
∂f k−1 k ∂f
2 2. ∂x = kx y ∂y = kxk y k−1
k k
X
∂f −kxy
3. ∂x = −y ke
1 k
X
∂f
∂y = −x ke−kxy
k
x
−2 −1 1 2 ∂f
X
4. ∂a0 =2 (a1 xk + a0 − yk )
−1 k
∂f
X
∂a1 =2 xk (a1 xk + a0 − yk )
k
−2
Solution 4.7:
 
Solution 4.4: All the functions are continuous 1
1. grad(f ) = = ex + ey
in their domain. 1

√ x
2 2 xex + yey
Solution 4.5: 2. grad(f ) =  x y+y  = p
√ x2 + y 2
∂f ∂f ∂f x2 +y 2
1. ∂x =1 ∂y = 2y ∂z = 3z 2
2xey + 3x2 cos(z)
 
∂f
2. ∂x = y cos(xy) 3. grad(f ) =  x2 e y 
∂f 3
−x sin(z)
∂y = x cos(xy)
∂f
∂z = −2z sin(z 2 )
Solution 4.8:
∂f ex+y x+y
3. = 2 1. grad(f ) = (ex + ey ) for x ̸= −y
∂x z +z+1 |x + y|

February 8, 2023 85
y Solution 4.10:
2
1. minimum at f ( 12 , 12 ) = 0
2. maximum at f (0, 1) = 2
1
3. maximum at f (1, 2) = 5

x Solution 4.11:
−2 −1 1 2
 
2x 2y
−1 1.
y x
 
cos(x) − sin(y)
−2 2.  2xy 2 2x2 y 
xex + yey yexy xexy
2. grad(f ) = p for x2 + y 2 ̸= 0
3z 2
 
x2 + y 2 1 2y
3.  ey sin(z) xey sin(z) xey cos(z) 
y 2xey+z x2 ey+z x2 ey+z
2

1 A.5. Differential equations

x Solution 5.1: Equations 1, 3, 4 and 5 are dif-


−2 −1 1 2 ferential equations. (In expression 6 the deriva-
−1 tives cancel out.)

Solution 5.2:
−2

homogeneous
3. grad(f ) = cos(x)ex + ey
ordinary

explicit

y linear
order

5
4 1. 2 yes no yes no
3 2. 1 no n.a. yes yes
3. 2 no n.a. yes no
2
4. 2 yes yes no no
1 5. n yes yes yes yes
0 x 6. 1 yes no no no
0 π 2π n.a. = not applicable

Solution 4.9: Solution 5.3:


2y 2 4xy
 
1. Nr. general particular
4xy 2x2 1. a), d) c)
 
0 1 2. d) a)
2.
1 0 3. c) a)
 
− sin(x) 0
3.
0 − cos(y) Solution 5.4:
 y 2 x
2xey 2zex

2e +z e
4.  2xey x2 ey +2 sin(z) 2y cos(z)  1. y ′ = y cot(x)
2zex 2y cos(z) 2ex –y 2 sin(z) 2. y ′ = y tanh(x)

86 February 8, 2023
3. y ′′ y = (y ′ )2 A.6. First order differential

4. xy = 2y equations

Solution 5.5: xy ′ = y Solution 6.1:

Solution 5.6: xy ′ = 2y y
1.

Solution 5.7: y ′ y + x = 0 2

−2 −1 1 2 x

−1

−2

y
2.

−2 −1 1 2 x

−1

−2

y
3.

−2 −1 1 2 x

−1

−2

Solution 6.2:

1. y = 2x + C 4. y = ln(x + C)
p p
2. y = x2 + C 5. y = cos(2x) + C
1
3. y = Cx 6. y =
2x + C

February 8, 2023 87
Solution 6.3: 2. y = C1 e−x + C2 ex
1. y = c ex
3 /3−x
4. y = c ecos(x) 3. y = (C1 x + C2 ) ex
−x2 sinh(x) 4. y = (C1 cos(x) + C2 sin(x)) e−x
2. y = c x e 5. y = c e
√ 5. y = C1 e−2x + C2 e2x
−2 x3
p
3. y = c e 6. y = c |x|
6. y = (C1 x + C2 ) ex/2
7. y = (C1 cos(x) + C2 sin(x)) ex/2
Solution 6.4:
8. y = (C1 cos(3x) + C2 sin(3x)) ex
1. y = cx − 1
ex + c
2. y = Solution 7.2:
x
sin(x) + c cos(x)
3. y = − 1. y = C1 e−x + C2 e−2x + C3 e−3x
x2 x
2. y = C1 e−2x + C2 e−x + C3 ex + C4 e2x
Solution 6.5: 3. y = C1 ex + C2 cos(x) + C3 sin(x)
c 4. y = (C1 + C2 cos(x) + C3 sin(x)) e−x
1. y = +1
x 5. y = (C1 x + C2 ) e−x + (C3 x + C4 ) ex
sin(x) + 2 cos(x)
2. y = + c e−2x 6. y = (C1 x + C2 ) ex
5
1 + j jx + (C3 cos(2x) + C4 sin(2x)) e−x
3. y = c ex − e
2
Solution 7.3:
Solution 6.6:
1. y = C1 e−2x + C2 e−x + x − 1
1. y = c e3x
−3x
2. y = (C1 x + C2 ) e−x + x
2. y = c e
3. y = (C1 cos(x) + C2 sin(x)) e−x − x + 2
−x4 /4
3. y = c e
4. y = (C1 x2 + C2 x + C3 ) e−x − x2 + 6x − 12
−2/x
4. y = c e 5. y = (C1 x + C2 ) ex
kx
5. y = c e + (C3 cos(3x) + C4 sin(3x)) e−x + 1
2
n+1
 
kx 6. y = C1 ex/2 + C2 e−x/2 + x3 + 24x
6. y = c exp
n+1

Solution 7.4: Solve the following DEs:


Solution 6.7:
1. y = c ex + x + 1 1. y = C1 e−2x + C2 ex + 15 e3x
2. y = c e−2x + 14 (2x2 − 2x + 1) 2. y = C1 cos(2x) + C2 sin(2x) + e−2x
3. y = c e1/x + 1 3. y = (C1 x + C2 ) e2x + 31 e−x
4. y = c x − 1 4. y = C1 ex + C2 cos(x) + C3 sin(x) − 51 e−2x
5. y = c e−x + x − 1 5. y = C1 e−x/2 + C2 ex + e−2x
6. y = c ex + 2x + 2
Solution 7.5: Solve the following DEs:

1. y = C1 e2x + C2 e−2x − sin(x)


A.7. Higher order linear 2. y = (C1 x + C2 ) ex + 2 sin(x)
differential equations 3. y = C1 cos(2x) + C2 sin(2x) − cos(3x)
4. y = (C1 cos(2x) + C2 sin(2x)) ex + 21 cos(x)
Solution 7.1: 5. y = C e−x + 25 cos(2x) − 15 sin(2x)
1. y = C1 e−2x + C2 ex 6. y = (C1 x2 + C2 x + C3 ) e−x + sin(x)

88 February 8, 2023
Solution 7.6: Solve the following DEs: Solution 9.2: If two events have no common
elements (i.e. their intersection is empty) they
1. y = C1 e−3x + C2 ex − 14 e−x + x + 2
3 are said to be mutually exclusive:
2. y = C1 cos(3x)+C2 sin(3x)+ 31 e3x +sin(x)
Solution 9.3:
3. y = C1 e−2x + C2 e2x + 15 cos(x) + x2 + 1
2
4. y = (C1 x + C2 ) e−x + C3 e−2x + x2 + e x 1. 0.8 4. 0.2
2. 0.5 5. 0.5
3. 0.0 6. 0.3
Solution 7.7: Solve the following DEs:

1. y = (C1 + x) e−2x
A 0.5 B
2. y = C1 cos(2x) + (C2 − x) sin(2x)
0.2 0.3
3. y = (C1 + 35 x) e−3x + C2 e2x
4. y = (C1 x + C2 + x2 ) e−x + C3 e−2x

Solution 9.4:

1. 0.6 4. 0.1
A.8. Combinatorics 2. 0.1 5. 0.8
3. 0.3 6. 0.3
Solution 8.1: 40 320

A 0.4 B
Solution 8.2: 3 628 800
0.1 0.2 0.3
Solution 8.3: 90

Solution 8.4: 70
Solution 9.5:
Solution 8.5: 56
2
1. 0.4 2. 3
Solution 8.6: 126

Solution 8.7: 252 Solution 9.6:

Solution 8.8: 7 1. 0 2. 0

Solution 8.9: 10 068 347 520 Solution 9.7: With Ak , k = 1, 2, 3 as the


event of an product to be produced by machine
Solution 8.10: 336
1 to 3, respectively, and B as the event of a
Solution 8.11: nk failure:

Solution 8.12: 20 736 a) P (B) = 2.9 %

b) P (A1 |B) = 34.5 %


A.9. Probability theory P (A2 |B) = 31.0 %
P (A3 |B) = 34.5 %

Solution 9.1: Solution 9.8: With Ak , k = 1, 2, 3, 4 as the


event of age group 1 to 4, respectively, and B
1. {1, 2, 3, A, B, C} 4. {A, C} as the event of road fatality:
2. {} 5. {1, 2, 3} a)
3. {2, 3, A, B, C} 6. {1, 3, C} P (A1 ) = 13.4 % P (A3 ) = 54.8 %

February 8, 2023 89
P (A2 ) = 11.2 % P (A4 ) = 20.6 % F (x)
1
b) (in parts per million, ppm)

P (B|A1 ) = 9.51 P (B|A3 ) = 41.1


P (B|A2 ) = 86.6 P (B|A4 ) = 54.0

c) x
−1 0 1
P (B) = 44.6 ppm
f (x)
d)
1
P (A1 |B) = 2.9 % P (A3 |B) = 50.5 % 2
P (A2 |B) = 21.7 % P (A4 |B) = 25.0 %

−1 0 1 x
Solution 9.9: The two events A and B are
independent.

µ=0 σ2 = 1
≈ 0.333 σ= √1 ≈ 0.577
A.10. Stochastic 3 3

Solution 10.1: Solution 10.4:

F (x) µ = σ2 = σ = 1
1

Solution 10.5:

F (x)

x 1
−1 0

f (x)
1
0 1 x

f (x)
−1 0 x
1

Solution 10.2:

F (x)
0 1 x
1
5
6 2
3
1
1 µ= 2 = 0.5
3
σ2 = 1
12 ≈ 0.083
0 x 1
1 2 3 4 σ= √
2 3
≈ 0.289

Solution 10.3: Solution 10.6:

90 February 8, 2023
F (x) 2. P (Xn < 1) = 2.3 %
1
3. P (2 < Xn < 3) = 34.1 %

4. P (|Xn −µ| > 2) = 4.6 %

Solution 10.12:
0 1 2 x
(x − µ)2
 
a a 1
fn (x) = √ exp −
2π σ 2σ 2
f (x) with µ = 100 µ1 and σ = 10 σ1
a
Solution 10.13: failure rate: 16.0 %

Solution 10.14: σ = 0.004 · R

0 1 2 x Solution 10.15:
a a
1. 26.4 %, 2. 28.3 %, 3. 14.6 %, 4. 61.7 %

Solution 10.16:
µ= 1
a σ2 = 1
a2
σ= 1
a µ = σ = 34 783 a σ 2 = 1.2099×109 a2

Solution 10.7:

1. µX = 12 , σX 2 = 41 , σX = 12
µY = 12 , σY 2 = 14 , σY = 12
1
2. Cov(X, Y ) = 12 , Corr(X, Y ) = 31 .
q
3. µ = 1, σ 2 = 23 , σ = 23

4. No

Solution 10.8:
8 4
1. P (X = 0) = 27 P (X = 1) = 9
2 1
P (X = 2) = 9 P (X = 3) = 27
q
2. µ=1 σ2 = 2
3 σ = 23

Solution 10.9:
a) k P (X = k) k P (X = k)
0 5.0 % 4 16.8 %
1 14.9 % 5 10.1 %
2 22.4 % 6 5.0 %
3 22.4 % 7 2.2 %

b) µ=3 σ2 = 3 σ= 3

Solution 10.10: For results, see problem.

Solution 10.11:

1. P (Xn > 4) = 15.9 %

February 8, 2023 91
Index

absolutes elementary integrals, 11


integration of, 25 event, 65
absorbed power, 30 expectation, 71
antiderivative, 10 expectation operator, 71
area of a trapezium, 13 explicit notation, 41
area of discs, 14 exponential distribution, 80
area of polygons, 14 exponential random variable, 80
area of triangles, 14 exponential source term if a DE, 56
arithmetic mean, 17 extrema of multiple argument functions, 36
axioms of probability, 67 condition for, 37

binomial coefficient, 61 finite sample space, 65


binomial distribution, 74, 75 first fundamental theorem of calculus, 10
binomial random variable, 75 first order differential equations, 46
boundary problems, 42 geometric interpretation, 46
free path, 80
capacitor discharge, 40 frequentist probability, 66
characteristic equation, 52, 54 function with n arguments, 30
characteristic polynomial, 52, 54 fundamental theorem of calculus, 9
combination, 60 first, 10
combined continuous functions, 33 second, 10
complex solution of a DE, 51
conditional probability, 67 general plus particular solution, 48
continuity of multiple argument functions, 33 general solution, 42
continuous random variable, 70 global extremum, 36
continuous sample space, 65 global maximum, 36
contour plot, 31 global minimum, 36
correlation, 74 gradient, 35
countable sample space, 65 gradient of a function, 35
covariance, 73
creating differential equations, 43 half-life, 42
cumulative distribution function, 70 harmonic oscillator
damped, 53
damped harmonic oscillator, 53 simple, 42
DE in resonance, 58 Hessian matrix, 36
DE, differential equation, 40 higher order hom. DE with const. coeff., 54
definite integral, 6, 7 higher order inhom. DE with const. coeff., 55
deterministic process, 64 homogeneous DE, 41
differential equation, DE, 40
directional derivative, 34 i.i.d., 74
discrete random variable, 70 implicit notation, 41
discrete sample space, 65 improper integrals, 20
distribution function, 70 indefinite integral, 10
domain of integration, 7 independence of probabilities, 68
independent and identically distributed, 74
effective voltage, 5 independent events, 68

92 February 8, 2023
infinite sample space, 65 partial derivative, 33, 34
inhomogeneous DE, 41 partial differential equation, 41
initial value problems, 42 partial fraction decomposition, 26
integrable function, 7 particular solution, 42
integrals with infinite domain, 20 permutation, 60
integrals with infinite image, 20 Poisson distribution, 75
integrand, 7 Poisson random variable, 75
integration by parts, 24 polynomial source term of a DE, 55
integration by substitution, 21 primitive function, 10
integration of absolutes, 25 probability, 64
integration of complex conjugate poles, 27 probability axioms, 67
integration of multiple real poles, 27 probability density function, 70
integration of rational functions, 26 probability mass function, 70
integration of single real poles, 26 product rule, 24
inverse derivative, 10 pseudo random number generator, 76
Jacobian matrix, 38 radioactive decay, 42
random variable, 70
kinetic energy, 30
Riemann integral, 7
Lebesgue integration, 7 Riemann sum, 6
limits of integration, 7 root mean square, 17
linear combination of solutions of a DE, 51
linear congruential generator, 77 saddle point, 37
linear differential equation, 41 sample, 65
linear inhomogeneous DE, 48 sample space, 65
local extremum, 36 continuous, 65
local maximum, 36 countable, 65
local minimum, 36 discrete, 65
lotto, 60, 61 finite, 65
lower limit, 7 infinite, 65
lower sum, 6 uncountable, 65
Schwarz integrability condition, 36
maxima of multiple argument functions, 36 second fundamental theorem of calculus, 10
mean free path, 80 second order hom. DE with const. coeff., 52
minima of multiple argument functions, 36 pair of complex conjugate constants, 52
Monty Hall problem, 64 two different real constants, 52
multiple argument function, 30 two equal real constants, 52
multiple partial derivative, 35 separation of variables, 46
multiple value functions, 37 separation of variables 1, 46
mutually exclusive, 66 separation of variables 2, 47
simple harmonic oscillator, 42
nabla-operator, 35
source term, 51, 55
normal distribution, 77
source term of an DE as a sum of functions, 57
normal random variable, 77
standard deviation, 72
ODE, ordinary differential equation, 41 standard normal distribution, 77
order of the differential equation, 41 standard normal random variable, 77
ordinary differential equation, ODE, 41 stochastic process, 64
oscillator sum of conditional probabilities, 68
damped harmonic, 53 surface area of spheres, 16
simple harmonic, 42 surface plot, 31
symmetry of second derivatives, 36
parameter-function, 47
parametric plot, 30 trigonometric source term of a DE, 57

February 8, 2023 93
uncountable sample space, 65
uniform distribution, 76
uniform random variable, 76
upper limit, 7
upper sum, 6

variation, 62
variation of parameters, 47
vector plot, 32
visualization of functions, 30
volume of cones, 16
volume of spheres, 16

94 February 8, 2023

You might also like