Numerical Analysis FMN011

Σχετικά έγγραφα
Reminders: linear functions

Partial Differential Equations in Biology The boundary element method. March 26, 2013

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

EE512: Error Control Coding

Matrices and Determinants

Section 8.3 Trigonometric Equations

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Areas and Lengths in Polar Coordinates

6.3 Forecasting ARMA processes

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

Areas and Lengths in Polar Coordinates

( ) 2 and compare to M.

2 Composition. Invertible Mappings

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Finite Field Problems: Solutions

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Concrete Mathematics Exercises from 30 September 2016

Homework 3 Solutions

Approximation of distance between locations on earth given by latitude and longitude

Section 7.6 Double and Half Angle Formulas

MATRIX INVERSE EIGENVALUE PROBLEM

Parametrized Surfaces

Example Sheet 3 Solutions

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

MATH1030 Linear Algebra Assignment 5 Solution

Durbin-Levinson recursive method

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

The ε-pseudospectrum of a Matrix

Other Test Constructions: Likelihood Ratio & Bayes Tests

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

Jordan Form of a Square Matrix

PARTIAL NOTES for 6.1 Trigonometric Identities

Srednicki Chapter 55

Written Examination. Antennas and Propagation (AA ) April 26, 2017.

ECE Spring Prof. David R. Jackson ECE Dept. Notes 2

Matrices and vectors. Matrix and vector. a 11 a 12 a 1n a 21 a 22 a 2n A = b 1 b 2. b m. R m n, b = = ( a ij. a m1 a m2 a mn. def

Homework 8 Model Solution Section

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

derivation of the Laplacian from rectangular to spherical coordinates

1 String with massive end-points

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Solutions to Exercise Sheet 5

Optimal Parameter in Hermitian and Skew-Hermitian Splitting Method for Certain Two-by-Two Block Matrices

TMA4115 Matematikk 3

The challenges of non-stable predicates

MATHEMATICS. 1. If A and B are square matrices of order 3 such that A = -1, B =3, then 3AB = 1) -9 2) -27 3) -81 4) 81

Trigonometric Formula Sheet

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

If we restrict the domain of y = sin x to [ π 2, π 2

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Estimation for ARMA Processes with Stable Noise. Matt Calder & Richard A. Davis Colorado State University

Tridiagonal matrices. Gérard MEURANT. October, 2008

Lanczos and biorthogonalization methods for eigenvalues and eigenvectors of matrices

Section 9.2 Polar Equations and Graphs

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Inverse trigonometric functions & General Solution of Trigonometric Equations

D Alembert s Solution to the Wave Equation

= λ 1 1 e. = λ 1 =12. has the properties e 1. e 3,V(Y

Trigonometry 1.TRIGONOMETRIC RATIOS

Second Order Partial Differential Equations

Pg The perimeter is P = 3x The area of a triangle is. where b is the base, h is the height. In our case b = x, then the area is

Second Order RLC Filters

C.S. 430 Assignment 6, Sample Solutions

Module 5. February 14, h 0min

New bounds for spherical two-distance sets and equiangular lines

Lecture 10 - Representation Theory III: Theory of Weights

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Correction Table for an Alcoholometer Calibrated at 20 o C

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Πανεπιστήµιο Κρήτης - Τµήµα Επιστήµης Υπολογιστών. ΗΥ-570: Στατιστική Επεξεργασία Σήµατος. ιδάσκων : Α. Μουχτάρης. εύτερη Σειρά Ασκήσεων.

( y) Partial Differential Equations

Section 8.2 Graphs of Polar Equations

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Quadratic Expressions

1. (a) (5 points) Find the unit tangent and unit normal vectors T and N to the curve. r(t) = 3cost, 4t, 3sint

Lifting Entry (continued)

CRASH COURSE IN PRECALCULUS

Mock Exam 7. 1 Hong Kong Educational Publishing Company. Section A 1. Reference: HKDSE Math M Q2 (a) (1 + kx) n 1M + 1A = (1) =

Problem Set 9 Solutions. θ + 1. θ 2 + cotθ ( ) sinθ e iφ is an eigenfunction of the ˆ L 2 operator. / θ 2. φ 2. sin 2 θ φ 2. ( ) = e iφ. = e iφ cosθ.

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Space Physics (I) [AP-3044] Lecture 1 by Ling-Hsiao Lyu Oct Lecture 1. Dipole Magnetic Field and Equations of Magnetic Field Lines

Math221: HW# 1 solutions

Congruence Classes of Invertible Matrices of Order 3 over F 2

Introduction to Time Series Analysis. Lecture 16.

( )( ) ( ) ( )( ) ( )( ) β = Chapter 5 Exercise Problems EX α So 49 β 199 EX EX EX5.4 EX5.5. (a)

Similarly, we may define hyperbolic functions cosh α and sinh α from the unit hyperbola

Odometry Calibration by Least Square Estimation

Exercise 1.1. Verify that if we apply GS to the coordinate basis Gauss form ds 2 = E(u, v)du 2 + 2F (u, v)dudv + G(u, v)dv 2

The Simply Typed Lambda Calculus

ECE 468: Digital Image Processing. Lecture 8

Transcript:

Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 12

Periodic data A function g has period P if g(x + P ) = g(x) Model: Trigonometric polynomial of order M T M (x) = a 0 + M j=1 ( a j cos( 2π P jx) + b j sin( 2π ) P jx) 1

Example The Sturup weather station showed the following maximum temperature on the 6th of each month in 2007-2013: month 1 2 3 4 5 6 7 8 9 10 11 12 T(C) 2007 8 1 7 8 19 23 16 24 16 15 8 9 T(C) 2008 2 8 8 8 20 23 24 20 21 13 10 5 T(C) 2009 1 4 3 12 11 13 24 24 18 14 8 6 T(C) 2010-2 -1 1 9 8 21 19 24 17 13 8 1 T(C) 2011 6 8 13 21 24 26 26 24 23 22 13 9 T(C) 2012 9 12 16 18 25 23 27 29 24 17 10 7 T(C) 2013 9 5 12 17 24 27 29 28 22 17 11 9 Fit the data to an appropriate model. 2

Solution: P = 12, T = a 0 + a 1 cos mπ/6 + b 1 sin mπ/6, m = 1, 2,..., 84 1 cos π 6 sin π 6 1 cos 2π 6 sin 2π 6 1 cos 3π 6 sin 3π 6... 1 cos 84π 6 sin 84π 6 a 0 a 1 b 1 = Solve A T Ax = A T b to get a 0 = 14.4524, a 1 = 8.0446, b 1 = 5.9254 8 1 7. 9 T (m) = 14.4524 8.0446 cos mπ/6 5.9254 sin mπ/6 T (88) = 13.3431 3

Plot of 3-term trigonometric polynomial T (m) = 11.917 7.2863 cos mπ/6 6.7863 sin mπ/6 +0.16667 cos mπ/3 + 0.43301 sin mπ/3 30 Highest Temperatures in Malmö on the 6th of each month (2007 2013) Temperature 25 20 15 10 5 0 5 0 10 20 30 40 50 60 70 80 90 month 4

Data linearization: the exponential model The parameters of y = c 1 e c 2t are not linear. To apply linear least squares we linearize the model: ln y = ln c 1 + c 2 t Let Y = ln y and k = ln c 1, to get the straight line Y = k + c 2 t To obtain the parameters k and c 2, one needs to modify the data (t, y) to (t, Y ) = (t, ln y). After computing k, c 1 must be calculated as e k. 5

Data linearization: the power law The parameters of y = c 1 t c 2 are nonlinear, but we can linearize the model: ln y = ln c 1 + c 2 ln t Let Y = ln y, k = ln c 1 and T = ln t, to get the straight line Y = k + c 2 T The original data must be modified to (T, Y ) = (ln t, ln y) and to obtain c 1 we compute e k. 6

Orthogonal matrices vs Vandermonde We know that solving the normal equations is ill-conditioned, because A T A inherits and even worsens the large condition number of the Vandermonde matrix A. An orthogonal matrix is a matrix with real entries such that Q 1 = Q T. κ 2 (Q) = Q 2 Q 1 2 = ρ(q T Q) ρ(qq T ) = ρ(i) ρ(i) = 1 As orthogonal matrices have 2-norm condition number equal to 1, we will develop a method to solve the least squares problem using orthogonal matrices. 7

Gram-Schmidt Orthogonalization Compute an orthogonal basis for the space spanned by k given linearly independent vectors, {v 1, v 2,..., v k }. Define the unit vector in the direction of v 1, q 1 = v 1 v 1 2 The projection of v 2 onto q 1 is (q T 1 v 2 )q 1, so vector y 2 = v 2 (q T 1 v 2 )q 1 is perpendicular to v 1 and q 2 = y 2 y 2 2 is a unit vector that is perpendicular to v 1 and such that {q 1, q 2 } span the same subspace as {v 1, v 2 }. 8

Gram-Schmidt algorithm Define 1. y 1 = v 1, q 1 = v 1 v 1 2 2. y 2 = v 2 q 1 (q T 1 v 2 ), q 2 = y 2 y 2 2. k. y k = v k q 1 (q T 1 v k ) q k 1 (q T k 1v k ), q k = y k y k 2 Note that q j q i 9

Example: Gram-Schmidt on the columns of a matrix A = 4 4 2 7 4 5 y 1 2 = ( 4) 2 + ( 2) 2 + 4 2 = 6 q 1 = y 2 = 4 7 5 4 4 2 7 4 5 + 3 4/6 2/6 4/6 and = 6 6 3 4/6 6/9 2/6 6/9 4/6 3/9 = ( v 1 v 2 ) 4/6 2/6 4/6 q 2 = 6/9 6/9 3/9 span the same plane. 10

Orthogonalization of a matrix Let r ii = y i 2, r ji = q T j v i. We can write v i = r ii q i + r 1i q 1 + + r i 1,i q i 1, so A = ( r 11 r 12 r 1k ) q 1 q k r 22 r 2k.... r kk If v 1,..., v k are linearly independent, all r ii are nonzero. If v i is spanned by v 1,..., v i 1, then r ii = 0 and the Gram-Schmidt method terminates. 11

The QR-factorization Once we have the Gram-Schmidt orthogonalization of an n k matrix A, we can complete the orthonormal basis by adding vectors q k+1,..., q n, A = ( ) q 1 q k q k+1 q n r 11 r 12 r 1k r 22... r 2k. r kk 0. 0. 0 0 Q = (q 1 q n ) is an orthogonal n n matrix and R is an n k upper triangular matrix. 12

Orthogonal matrices and the QR-factorization A square matrix Q is orthogonal if Q T = Q 1. A square matrix Q is orthogonal if its columns are pairwise orthogonal unit vectors (q T i q j = 0 and q i 2 = 1). If Q is orthogonal, then Qx 2 = x 2. In A = QR, Q is an orthogonal matrix and R is upper triangular. 13

Example: QR-factorization by Gram-Schmidt To y 3 = 4 2 4 1 0 0, 4 7 we add vector 1 0 to complete the space R 3. 5 0 + 4 4/6 2/6 + 6 6/9 6/9 = 1/9 2/9, q 3 = 1/3 2/3 6 9 4/6 3/9 2/9 2/3 r 11 = y 1 2 = 6, r 12 = q T 1 v 2 = 3, r 22 = y 2 2 = 9 The QR-factorization of A is 4 4 2 7 = 4 5 2/3 2/3 1/3 1/3 2/3 2/3 2/3 1/3 2/3 6 3 0 9 0 0 14

Least Squares and QR-factorization The least squares solution minimizes b Ax 2 = b QRx 2 = Q T (b QRx) 2 = Q T b Rx 2 Let d = Q T b. We can find x so that r d 11 r 12 r 1k 1. r 22 r 2k d k.... d k+1 r kk. 0 0.. d n 0 0 x 1. x k = 0. 0 d k+1. d n 15

Steps for least squares solving by QR-factorization A = QR Ax = QRx = b Rx = Q T b Given the m n, m > n system Ax = b, 1. Find Q and R such that A = QR 2. Set ˆR = upper n n submatrix of R 3. Set ˆd = upper n entries of d = Q T b 4. Solve ˆRx = ˆd 16

Example Solve the least squares problem 4 4 2 7 4 5 ( x1 x 2 ) = 3 9 0 4 4 2 7 4 5 = 2/3 2/3 1/9 1/3 2/3 2/9 2/3 1/3 2/9 6 3 0 9 0 0 ( 6 3 0 9 ) ( x1 x 2 ) = ( 5 4 ) 17