LectureNotesMA2 2023-02-08
LectureNotesMA2 2023-02-08
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
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
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
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:
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:
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.
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
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.
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
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
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 ?
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
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
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
2π
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
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.
u(t)
û
0
t
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): ◁
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)
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
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
◁ 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
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
2π
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
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
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
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:
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
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
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. ◁
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
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:
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)
1. f (x, y) = |x + y|
p
2. f (x, y) = x2 + y 2
3. f (x, y) = sin(x) + y
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
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
x + y2 + z3
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
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. ◁
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
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
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
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
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
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
◁ ◁
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
= −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.
February 8, 2023 49
6. y ′ + 2y 2 = 0
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
1. xy ′ − y = 1
2. xy ′ + y = ex
3. xy ′ + 2y = sin(x)
1. xy ′ + y = 1
2. y ′ + 2y = cos(x)
3. y ′ − y = ejx
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
50 February 8, 2023
7. Higher order linear differential equations
7.1. Introduction Then any linear combination of the solutions
February 8, 2023 51
7.2. Second order homogeneous The general solution is any linear combination
DE with constant of these solutions:
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
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(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
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.
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
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:
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)!
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
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?
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.
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: ◁
February 8, 2023 65
Example 9.6. ◁
◁
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}
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
◁
◁
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?
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
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)
Ω Ω
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
−∞
Ω = {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:
σ 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)
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:
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
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:
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 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
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π
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 :
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
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.
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?
February 8, 2023 81
A. Solutions
A.1. Integral calculus 4. ex − ex0 8. cos x0 3 − cos x3
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
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
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:
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
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
86 February 8, 2023
3. y ′′ y = (y ′ )2 A.6. First order differential
′
4. xy = 2y equations
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
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.8: 7 1. 0 2. 0
February 8, 2023 89
P (A2 ) = 11.2 % P (A4 ) = 20.6 % F (x)
1
b) (in parts per million, ppm)
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
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
90 February 8, 2023
F (x) 2. P (Xn < 1) = 2.3 %
1
3. P (2 < Xn < 3) = 34.1 %
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 %
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.11:
February 8, 2023 91
Index
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