Upload
vuongkhanh
View
214
Download
0
Embed Size (px)
Citation preview
TU Munchen
1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 1
TU Munchen
The main purpose of this first chapter (about 4 lectures) is to recall those topics fromyour Advanced Mathematics courses (linear algebra, calculus, stochastics) typical forthe first two years of bachelor’s programs in science and engineering that are ofparticular importance for numerical algorithms and, hence, for the whole CSE master’sprogram.
We do this,• since you can hardly go successfully through a thorough numerical education
without these foundations;
• since we made the experience that the CSE freshmen’s mathematicalbackgrounds are quite heterogeneous (and not always at hand ...);
• since TUM’s CSE program has a methodological (i. e. mathematical andinformatical) point of view that goes beyond the usual and widespread engineeringapproach and way of thinking;
• and since the two numerics courses have been the most serious roadblock forCSE students since the program’s launch (too high failure rates – something wewant to reduce without touching the level of education).
If you are familiar with all this stuff, don’t feel bored – just consider this as a warm-up tothe numerical contents to be discussed later on in this course.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 2
TU Munchen
We also changed the name of the courses from “Numerical Analysis” to “NumericalProgramming”, to indicate that there are mathematical topics to be addressed, but witha clear focus on algorithmics, programming, and applications (instead of proofs etc.).
This introductory part won’t be a complete lecture with all explanations etc. Rather, itwill be a “guided tour” through important topics, mentioning notions and buzzwords thatshould have some meaning for you. If they don’t, you know that you have to close thegaps as soon as possible, with the help of the references provided or by doingadditional exercises etc.
Also use the tutorials to refresh your knowledge!
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 3
TU Munchen
1.1. Mathematical Essentials and Notation
Symbols and Notions
Everyone familiar with• the symbol∞;
• the symbols ∃, ∃1, and ∀ (so-called quantifiers);
• the symbolsn∑
i=1
and∏i 6=k
;
• the notions maximum, minimum, infimum, and supremum;
• Kronecker symbol δij ;
• the Landau symbol O(N), O(h2)
• the symbol⇒;
• the meaning of sufficient and necessary;
• the meaning of iff: sufficient and necessary;
• the meaning of associative, commutative, and distributive?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 4
TU Munchen
Visualization∞
(Hubble ultra deep field)
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 5
TU Munchen
Visualization ∃
∃ ?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 6
TU Munchen
Exercise min, max, inf, sup
Do min, max, inf, sup of the following sets exists? Determine ifpossible.
A := {−2,−1,0,1,2}
B := {n2;n ∈ N}
C :={1
n ;n ∈ N}
D :={1
n + 3−m;n,m ∈ N}
Solve before reading the solution on the next slide!
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 7
TU Munchen
Exercise min, mac, inf, sup – Solution
inf A = min A = −2; sup A = max A = 2.
inf B = min B = 1; no sup no max.
no min; inf C = 0; max C = sup C = 1.
no min; inf D = 0; max D = sup D = 113 .
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 8
TU Munchen
Exercise Landau Symbol
Which of the following terms is O(N) for N →∞?
N + 10 · log N + 10,000 ·√
N
N + 10−2 · N2 + 10−4 · N4 + . . .
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 9
TU Munchen
Exercise Landau Symbol – Solution
N + 10 · log N + 10,000 ·√
N = O(N)
N + 10−2 · N2 + 10−4 · N4 + . . . 6= O(N)
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 10
TU Munchen
Exercise Landau Symbol
Which of the following terms is O(h2) for h→ 0?
10−3 · h2 + 100 · h + 1,000 ·√
h
20 · h2 + 0.1 · h3 + 106 · h4 + 108 · h5
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 11
TU Munchen
Exercise Landau Symbol – Solution
10−3 · h2 + 100 · h + 1,000 ·√
h = O(√
h)
20 · h2 + 0.1 · h3 + 106 · h4 + 108 · h5 = O(h2)
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 12
TU Munchen
Visualization neccessary, sufficient & iff
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 13
TU Munchen
Numbers
• Booleans: true/false; logical operations; relations of logics to set theory (seebelow)
• natural numbers, integers N,Z: factorials; binomial coefficients; Pascal’s triangle
• rational numbers Q: countable/non-countable
• real numbers R:
– field property (allows for arithmetic operations)– order property (allows for comparison)– completeness property (each interval nesting defines exactly one real
number)– supremum/infimum property
• Q is dense in R• different classes of irrational numbers:
√2, e, ...
• complex numbers C: imaginary unit i , Re, and Im; conjugate complex
• fundamental theorem of algebra: each polynomial of degree n with complexcoefficients has at least one complex root
• what else can be said of roots of polynomials?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 14
TU Munchen
Exercise Booleans and Logical Operations
1 ∨ 0 = ?
1 ∧ 0 = ?
1 ∧ ¬0 = ?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 15
TU Munchen
Exercise Booleans and Logical Operations – Solution
1 ∨ 0 = 1.
1 ∧ 0 = 0.
1 ∧ ¬0 = 1.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 16
TU Munchen
Exercise Complex Numbers and Polynomials
Solve 2z2 − 8z + 9 = 0.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 17
TU Munchen
Exercise Complex Numbers and Polynomials – Solution
z1,2 = 8±√
64−4·2·94 = 8±
√−8
4 = 2± 1√2i .
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 18
TU Munchen
Exercise Complex Numbers
Compute Re z, Im z, and |z|.
z = (3 + i)(1− 4i)
z = 2−i1+4i
z =∑4
n=0 in +∑100
n=96 in
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 19
TU Munchen
Exercise Complex Numbers – Solution
z = (3 + i)(1− 4i) = 7− 11i = 7 + 12i ;
Re z = 7, Im z = 12, |z| =√
72 + 112 =√
170.
z = 2−i1+4i =
(2−i)(1−4i)(1+4i)(1−4i) =
−2−9i17 ;
Re z = −217 , Im z = −9
17 , |z| =√
4+81172 = 1
17
√85.
z =∑4
n=0 in +∑100
n=96 in =
1 + i − 1− i + 1 + 1 + i − 1− i + 1 = 2, Re z = 2, Imz = 0, |z| = 2.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 20
TU Munchen
Binomial Coefficients(
nk
)& Pascal’s Triangle
source: http://did.mat.uni-
bayreuth.de/studium/veranstaltungen/wintersemester/19992000/arithmetik und algebra im unterricht/jagusch/index.html.html
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 21
TU Munchen
Sets
• notions of sets, subsets, and elements
• set operations: union, intersection, difference, complement
• symbols ∈, ⊂, ⊆
• power set
• Cartesian product of sets
• appearances:
– explicit {1, 2, 3, ...}– implicit {x ∈ R : f (x) = 0}
• already here a bit of topology: open sets, closed sets, bounded sets, compactsets
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 22
TU Munchen
Visualization Sets
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 23
TU Munchen
Visualization Operations on Sets
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 24
TU Munchen
Visualization Topology 1
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 25
TU Munchen
Visualization Topology 2
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 26
TU Munchen
Visualization Topology 3
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 27
TU Munchen
Visualization Topology 4
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 28
TU Munchen
Visualization Topology 5
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 29
TU Munchen
Exercise Sets
Are the following sets open, bounded, closed, compact?
A := [0;1[
B :=]0;∞[
C :={1
n ;n ∈ N}
D :={1
n ;n ∈ N}∪ 0
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 30
TU Munchen
Exercise Sets
A is only bounded.
B is only open.
C is only bounded.
D is bounded and closed.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 31
TU Munchen
Relations
• definition: relation R between two sets A and B as a subset of A× B: R ⊆ A× B
• notation: aRb or (a, b) ∈ R
• important examples for A = B: <, ≤, >, ≥, ...
• properties of relations:
– transitive– reflexive– symmetric– asymmetric– antisymmetric– connex
• notion of an equivalence relation
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 32
TU Munchen
Exercise Relations
Are the following relations transitive, reflexive, symmetric,asymmetric, antisymmetric, connex?
R1 := {(a;b);a ≤ b,a,b ∈ R}
R2 := {(a;b);a = b,a,b ∈ R}
R3 := {(a;b);a|b,a,b ∈ N} (a divides b)
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 33
TU Munchen
Exercise Relations – Solution
R1 is transitive, reflexive, asymmetric, antisymmetric, andconnex.
R2 is transitive, reflexive, symmetric, and antisymmetric.
R3 is transitive, reflexive, asymmetric, and antisymmetric.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 34
TU Munchen
Mappings and Functions
• mapping or function (here used in a synonymous way)
f : A→ B : ∀x ∈ A ∃1y ∈ B such that y = f (x);
write x 7→ y
• properties of mappings:
– injective– surjective– bijective
• f−1(x) = ?
• inverse mapping: existence and meaning
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 35
TU Munchen
Visualization Injectivity
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 36
TU Munchen
Visualization Surjectivity
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 37
TU Munchen
Visualization Bijectivity
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 38
TU Munchen
Exercise Mappings
Are the following mappings injective, surjective, bijective?Compute the inverse mapping if it exists!
f1 : R→ R, x 7−→ x2
f2 : R→ R+0 , x 7−→ x2
f3 : R−0 → R+0 , x 7−→ x2
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 39
TU Munchen
Exercise Mappings – Solution
f1 has none of these properties, the inverse does not exist.
f2 is surjective, but neither injective nor bijective, the inversedoes not exist.
f3 is injective, surjective, and bijective, the inverse is
f3−1 : R+0 → R−0 , x 7−→ −
√x .
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 40
TU Munchen
Exercise Mappings
Are the following mappings injective, surjective, bijective?Compute the inverse mapping if it exists!
g1 : [0;1]→ R, x 7−→ 3x + 2
g2 : [0;1]→ [2;5], x 7−→ 3x + 2
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 41
TU Munchen
Exercise Mappings – Solution
g1 is injective, but neither surjective nor bijective, the inversedoes not exist.
g2 is injective, surjective, and bijective, the inverse is
g2−1 : [2;5]→ [0;1], x 7−→ x−23 .
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 42
TU Munchen
Exercise Mappings
Are the following mappings injective, surjective, bijective?Compute the inverse mapping if it exists!
h :]0;∞[→ R, x 7−→ 2 ln x3 − 1
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 43
TU Munchen
Exercise Mappings – Solution
h :]0;∞[→ R, x 7−→ 2 ln x3 − 1 is injective, surjective, and
bijective, the inverse is
h−1 : R→]0;∞[, x 7−→ 3 exp( x+1
2
).
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 44
TU Munchen
Building Blocks ...
... of a math course / book / presentation:
• definition: new notions etc. are defined and, thus, introduced
• theorem / proposition:
– a central statement, typically consisting of conditions and a conclusion (“if thisand that holds, then the following is valid ...”)
– the more restrictions are made, the more can be concluded (but also the lessgeneral the statements are)
• lemma: similar to a theorem w.r.t. its structure, but usually only an auxiliarystatement of minor importance by itself (that marks just a step on the way to atheorem, e.g.)
• corollary: a statement that follows immediately from a previous theorem etc.
• proof: a precise argumentation showing clearly that a theorem, lemma, orcorollary is correct
Note that all this is typically formulated as general and generic as possible – a factwhich is frequently misinterpreted as “not concrete” or “without practical relevance”.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 45
TU Munchen
Building Blocks Visualization
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 46
TU Munchen
A Short Remark on Proofs
Why proofs – or how much of proofs?
• Proofs are the essence of mathematical argumentation – they make the latterrigorous.
• Proofs are a permanent source of misunderstandings and problems:
– math professors often do not want to do anything without proofs – even incourses for non-mathematicians
– non-math students often think that only the results or statements are relevant,but not the proofs (which they suppose to be something for hardcoremathematicians only)
– note that both points of view are problematic
• hence: proofs for non-mathematicians (such as CSE students)?
– yes, if the way of proving a statement helps to understand it– no, if just for itself (i.e. just to prove it)
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 47
TU Munchen
Standard Proof Techniques
• forward: A⇒ B ⇒ C ⇒ D
• by contradiction (“what if”): ¬D ⇒ ...⇒ ¬A
• by counterexample: to refute the assertion that all students are smart, just findone stupid and the job is done
• complete search: to prove that all students are smart, check them all
• mathematical / complete induction: show the statement for n = 1, and show theconclusion from n to n + 1 (does it work for the smart student example?)
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 48
TU Munchen
Exercise Proofs
Proof that all students are smart.
Contradiction? Counter Example? Complete Search?Induction?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 49
TU Munchen
Exercise Proofs – Solution
Proof that all students are smart.
Complete Search!
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 50
TU Munchen
Exercise Proofs
Refute that all students are smart.
Contradiction? Counter Example? Complete Search?Induction?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 51
TU Munchen
Exercise Proofs – Solution
Refute that all students are smart.
Counter Example!
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 52
TU Munchen
Exercise Proofs
Proof that∑N
q=0(1
2
)q< 2 for all N.
Contradiction? Counter Example? Induction?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 53
TU Munchen
Exercise Proofs – Solution
Proof that∑N
q=0(1
2
)q< 2 for all N.
Induction!
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 54
TU Munchen
Exercise Proofs
Proof that students passing the exam in NumericalProgramming are smart.
Contradiction? Counter Example? Complete Search?Induction?
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 55
TU Munchen
Exercise Proofs – Solution
Proof that students passing the exam in NumericalProgramming are smart.
Contradiction!
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 56
TU Munchen
Exercise Proofs
Show by mathematical induction that every natural numbern ≥ 1 can be represented as a product of prime numbers.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 57
TU Munchen
Exercise Proofs – Solution
Show by mathematical induction that every natural numbern ≥ 2 can be represented as a product of prime numbers.
Start n = 2 : trivial
Induction Step: Consider any natural number n. n is either aprime number (which is trivial to write as a product of primenumbers) or can be written as a product n1 · n2 with n1,n2 < n.By induction asspunption, n1 and n2 can be written as aproduct of prime numbers. �
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 58
TU Munchen
Exercise Proofs
Show by mathematical induction the Bernoulli inequality
∀n ∈ N : (1 + x)n ≥ 1 + nx
if x ∈ [−1;∞[⊂ R.
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 59
TU Munchen
Exercise Proofs – Solution
Show by mathematical induction the Bernoulli inequality
∀n ∈ N : (1 + x)n ≥ 1 + nx if x ∈ [−1;∞[⊂ R.
Start n = 1: trivial
Induction Step:
(1 + x)n = (1 + x)(1 + x)n−1ind. assump.
≥x ≥ −1
(1 + x)(1 + (n − 1)x) =
1 + x + (n − 1)x + (n − 1)x2 ≥ 1 + nx . �
Miriam Mehl: 1. Foundations of Numerics from Advanced Mathematics
Mathematical Essentials and Notation, October 22, 2012 60