Sunteți pe pagina 1din 3

Prof. Ch.

Schwab Frühjahrssemester 2019


F. Henrı́quez ETH Zürich
J. Opschoor Numerische Mathematik I D-MATH

Serie 0

Aufgabe 0.1 Introduction to M ATLAB


On the course website, you find an introduction “Learning M ATLAB by doing M ATLAB”. Work
through this manual step by step (no submission).

Aufgabe 0.2 Approximation of Euler’s Number e


We will discuss different methods to approximate Euler’s number e based on the following two
properties of e:

(i) Finite approximation eL (n) of the limit of a sequence:


 n  n
1 1
e = lim 1 + =⇒ eL (n) = 1 + . (0.2.1)
n→∞ n n

(ii) Finite approximation eS (n) of an infinite series:


∞ n−1
X 1 X 1
e= =⇒ eS (n) = . (0.2.2)
k=0
k! k=0
k!

(0.2a) Write the following M ATLAB functions:

(i) calcEulerLimit(n) that calculates eL (n),


(ii) calcEulerSum(n) that calculates eS (n) using the M ATLAB-function factorial,
(ii) calcEulerSum2(n) that calculates eS (n) without using factorial but instead by
saving the denominator of the preceding summand.

(0.2b) Use the M ATLAB-functions tic and toc to measure the execution times of your three
functions from subproblem (0.2a) for n = 10, . . . , 1000 and visualize the measured times in a plot
with logarithmic y-axis. Repeat the measurement a few times until you get a characteristic plot
without too many outliers. Which of your functions is the fastest? Is there a function for which
the execution time does not depend on the input number n? Why?

(0.2c) Plot the relative errors


|eX (n) − exp(1)|
errrel,X (n) := for X ∈ {L, S}
exp(1)
of the two approximations for n = 1, . . . , 20 in one logarithmic plot. Which approximation con-
verges faster?

Serie 0 Seite 1 Problem 0.1


(0.2d) For which n is the absolute error errabs,S (n) := |eS (n) − exp(1)| of the approximation
via the infinite series smaller than 10−7 ? What is the smallest possible absolute error of the appro-
ximation via the limit? To answer this question, calculate errabs,L (n) for n = 100 , 101 , . . . , 1016
and state the smallest of these errors. Can you explain what happens for large n?

Aufgabe 0.3 Left and Right Triangular Matrices


(0.3a) Prove that for A, B ∈ Cn×n left (right) triangular matrices, also AB is a left (right)
triangular matrix.

(0.3b) Prove that for A ∈ Cn×n which is an invertible left (right) triangular matrix, also A−1 is
a left (right) triangular matrix.

Aufgabe 0.4 Reverse triangle inequality for a norm


Let V be a vector space with norm k·k. Prove the reverse triangle inequality: for all x, y ∈ V it
holds
kxk − kyk ≤ kx − yk. (0.4.1)

Aufgabe 0.5 Maximum-Norm on continuous functions


Denote by V := C 0 ([0, 1]) the vector space of continuous functions f : [0, 1] → R and set
kf kC 0 := max |f (x)| (why is this quantity well-defined?).
x∈[0,1]

(0.5a) Show that V (with pointwise multiplication and addition) is a vector space over R, that
|f | ∈ V for all f ∈ V and that k · kC 0 satisfies the properties (N1)–(N3) of a norm (Definition
0.27, Section 0.6 of the lecture notes).

(0.5b) Let kf kW := max f (x). Is k · kW a norm on V ? Why?


x∈[0,1]

(0.5c) Consider again V as a normed space with the norm k · kC 0 . Is it possible to define an
inner product on V which is compatible with k · kW ?
H INT: Use, without proving, the parallelogram law (Satz 0.34 of the lecture notes).

Aufgabe 0.6 Modulus of complex numbers as a norm


Denote by |z| ≥ 0 the modulus of a complex number z ∈ C.

(0.6a) Show that | · | is a norm on the vector space C (over the complex numbers).

(0.6b) With i denoting a square root of −1 and ϕ ∈ [0, 2π) set Fϕ (z) := z exp(iϕ). Show that
|z| = |Fϕ (z)| for all ϕ ∈ [0, 2π). Give a geometric interpretation.

(0.6c) Identify C with R2 via the bijective map Φ : x+iy 7→ (x, y)> . Let Fϕ : C → C as in sub-
problem (0.6b). Which matrix Aϕ ∈ R2×2 describes Fϕ considered in R2 (i.e. Φ−1 (Aϕ Φ(z)) =
Fϕ (z))? What is kAϕ k2 ?

Published on February 11, 2019.

Serie 0 Seite 2 Problem 0.3


To be submitted on February 26, 2019.
M ATLAB: Submit all files in the online system. Include the files that generate the
plots. Label all your plots. Include commands to run your functions. Comment
on your results.

Literatur
[NMI] Lecture Notes for the course “Numerische Mathematik I”.

Last modified on 8. Februar 2019

Serie 0 Seite 3 Literatur

S-ar putea să vă placă și