Appendix C: Recapitulation of Numerical schemes
|
|
- Matthew Page
- 5 years ago
- Views:
Transcription
1 Appendix C: Recapitulation of Numerical schemes August 31, 2009) SUMMARY: Certain numerical schemes of general use are regrouped here in order to facilitate implementations of simple models C1 The tridiagonal system solver As a special case of the general LU decomposition eg, Riley et al 1997), an efficient tridiagonal system solver, based on the so-called Thomas algorithm, can be constructed We begin by assuming that there exists a decomposition for which the lower L) and upper U) matrices possess the same bandwidth of 2: ¼ ¼ β β β m β m 1 a 1 c b 2 a 2 c b 3 a 3 c b m 1 a m 1 c m b m a m ½¼ ½ α 1 γ α 2 γ α 3 γ α m 1 γ m α m = ½ C1) where the first matrix is the original tridiagonal matrix to be decomposed ie, elements a 1 etc are known), the second matrix is L with one line of non-zero elements below the diagonal, and the last matrix is U with one line of non-zero elements above the diagonal Performing the product of matrices, we identify elements k, k 1), k, k) and k, k + 1) of the product as 723
2 724 APPENDIX C: RECAPITULATION OF NUMERICAL SCHEMES b k = β k α k 1 C2) a k = β k γ k 1 + α k C3) c k = γ k C4) These relations can be solved for the components of L and U by observing that γ k = c k for all k Since the first row demands a 1 = α 1, subsequent rows provide α k and β k recursively from β k = b k α k 1, α k = a k β k c k 1, k = 2,, m C5) provided that no α k is zero otherwise the matrix is singular and cannot be decomposed) Note that there is no β 1 The tridiagonal matrix A has now been decomposed as the product of lower and upper triangular matrices The solution of Ax = LUx = f is then obtained by first solving Ly = f β β β m β m 1 y 1 y 2 y 3 y m 1 y m = by proceeding from the first row downward and then solving Ux = y α 1 γ x 1 0 α 2 γ x α 3 γ 3 0 x 3 = α m 1 γ m 1 x m α m x m by proceeding from the bottom row upward The solution is f 1 f 2 f 3 f m 1 f m y 1 y 2 y 3 y m 1 y m C6), C7) y 1 = f 1, y k = f k β k y k 1, k = 2,, m C8) x m = y m α m, x k = y k γ k x k+1 α k, k = m 1,, 1 C9) In practice, the α values can be stored in vector a initially holding the values a k, since once α k is known, a k is not needed anymore Similarly β values can be stored in vector b initially holding b k and γ values in a vector c Also the y and f values can share the same vector f as the f k value is no longer needed once the y k value has been computed With the additional vector x for the solution, only 5 vectors are required, and the solution is obtained with only three loops over m points This demands approximately 5m floating-point operations instead of the m 3 operations that a brutal matrix inversion would have required The algorithm is implemented in MATLAB file thomasm
3 C2 1D finite-difference schemes of various orders 725
4 726 APPENDIX C: RECAPITULATION OF NUMERICAL SCHEMES Table C1 STANDARD FINITE-DIFFERENCE OPERATORS FOR UNIFORM GRIDS FORWARD DIFFERENCE O t) u n u n+1 u n+2 u n+3 u n+4 FORWARD DIFFERENCE O t 2 ) u n u n+1 u n+2 u n+3 u n+4 u n+5 t u t -1 1 t 2 2 u t t 3 3 u t t 4 4 u t t u t t 2 2 u t t 3 3 u t t 4 4 u t BACKWARD DIFFERENCE O t) u n 4 u n 3 u n 2 u n 1 u n t u t -1 1 t 2 2 u t t 3 3 u t t 4 4 u t BACKWARD DIFFERENCE O t 2 ) u n 5 u n 4 u n 3 u n 2 u n 1 u n 2 t u t t 2 2 u t t 3 3 u t t 4 4 u t CENTRAL DIFFERENCE O t 2 ) u n 2 u n 1 u n u n+1 u n+2 2 t u t t 2 2 u t t 3 3 u t t 4 4 u t CENTRAL DIFFERENCE O t 4 ) u n 3 u n 2 u n 1 u n u n+1 u n+2 u n+3 12 t u t t 2 2 u t t 3 3 u t t 4 4 u t
5 C3 Time-stepping algorithms 727
6 728 APPENDIX C: RECAPITULATION OF NUMERICAL SCHEMES Table C2 STANDARD TIME-STEPPING METHODS FOR du/dt = Qt, u) EULER METHODS Scheme Order Explicit ũ n+1 = ũ n + tq n t Implicit ũ n+1 = ũ n + tq n+1 t Trapezoidal ũ n+1 = ũ n + t 2 Q n + Q n+1) t 2 General ũ n+1 = ũ n + t 1 α)q n + αq n+1) t Runge- Kutta Runge- Kutta MULTI-STAGE METHODS Scheme Order ũ n+1/2 = ũ n + t 2 Qtn, ũ n ) ũ n+1 = ũ n + tqt n+1/2, ũ n+1/2 ) t 2 ũa n+1/2 = ũ n + t 2 Qtn, ũ n ) ũ n+1/2 b = ũ n + t 2 Qtn+1/2, ũa n+1/2 ) ũ = ũ n + t Qt n+1/2, ũ n+1/2 b ) ũ n+1 = ũ n 1 + t 6 Qtn, ũ n ) Qtn+1/2, ũa n+1/2 ) ) Qtn+1/2, ũ n+1/2 b ) Qtn+1, ũ ) t 4 MULTI-STEP METHODS Scheme Truncation order Leapfrog ũ n+1 = ũ n tq n t 2 Adams- Bashforth ũ n+1 = ũ n + t 2 Q n 1 + 3Q n) t 2 Adams- Moulton ũ n+1 = ũ n + t 12 Q n 1 + 8Q n + 5Q n+1) t 3 Adams- Bashforth ũ n+1 = ũ n + t 12 5Q n 2 16Q n Q n+1) t 3 PREDICTOR-CORRECTOR METHODS Scheme Order ũ = ũ n + tqt n, ũ n ) Heun ũ n+1 = ũ n + t 2 Qt n, ũ n ) + Qt n+1, ũ ) ) t 2 Leapfrog- ũ = ũ n tq n Trapezoidal ũ n+1 = ũ n + t 2 Q n + 5Qt n+1, ũ ) ) t 2 ũ = ũ n + t 2 Q n 1 + 3Q n) ABM ũ n+1 = ũ n + t 12 Q n 1 + 8Q n + 5Qt n+1, ũ ) ) t 3
7 729 C4 Partial-derivatives finite differences On a regular grid x = i x + x 0, y = j y + y 0, the following expressions are of second order Jacobian Ja, b) = a b x y b a x y J ++ i,j = a i+1,j a i 1,j )b i,j+1 b i,j 1 ) b i+1,j b i 1,j )a i,j+1 a i,j 1 ) 4 x y J + i,j = [a i+1,jb i+1,j+1 b i+1,j 1 ) a i 1,j b i 1,j+1 b i 1,j 1 )] 4 x y [a i,j+1b i+1,j+1 b i 1,j+1 ) a i,j 1 b i+1,j 1 b i 1,j 1 )] 4 x y J + i,j = [b i,j+1a i+1,j+1 a i 1,j+1 ) b i,j 1 a i+1,j 1 a i 1,j 1 )] 4 x y [b i+1,ja i+1,j+1 a i+1,j 1 ) b i 1,j a i 1,j+1 a i 1,j 1 )] 4 x y Cross derivatives 2 u x y u i+1,j+1 u i+1,j + u i,j u i,j+1 i+1/2,j+1/2 x y 2 u x y u i+1,j+1 u i+1,j 1 + u i 1,j 1 u i 1,j+1 i,j 4 x y Laplacian 2 u x u y 2 u i+1,j + u i 1,j 2u i,j i,j x 2 + u i,j+1 + u i,j 1 2u i,j y 2 C5 DFT and FFT u 0 L x x Figure C-1 Periodic signal sampled with N evenly-spaced points x 0 to x Note that no x N is needed since by periodicity the value of the function in x N is the same as in x 0
8 730 APPENDIX C: RECAPITULATION OF NUMERICAL SCHEMES In a periodic domain in which x varies between 0 and L, a complex function ux) can be expanded in Fourier modes according to ux) = + n= a n e i n 2πx L C10) Using orthogonality properties of the Fourier modes 9 1 L e i n m)2πx L dx = δnm, C11) L 0 the complex coefficients a n are readily obtained by multiplying C10) by exp i m2πx/l) and integrating a m = 1 L L 0 2πx i m ux)e L dx C12) Note that we could have used a n = b n /L where b n would then be calulated using the integral without the normalization 1/L Discrete Fourier Transform DFT) simply truncates 10 the infinite series to a finite series ũx) = a n e i n 2πx L C13) It uses ux) at a series of sampling points the discrete values on a numerical grid for example) to determine the coefficients a n The points are regularly spaced x j = j x, j = 0,, N 1 Because of periodicity, using x N would amount to use x 0 and the point is therefore not retained in the sampling Complex coefficients can be evaluated as a n = 1 N = 1 N j=0 j=0 ux j )e i n 2πx j L u j e i nj 2π N C14) where we write ux j ) = u j to highlight the fact that we only use information at the discrete points Obviously this is a discrete version of the integral C12) The interesting point is that coefficients a m are exact in the sense that if we evaluate ũx j ) with those coefficients, we obtain the values at the grid points ux j ) The proof of this result is not trivial and we must verify that if we use coefficients C14) 9 δ ij stands for the Kronecker symbol 0 if i j, 1 otherwise) 10 The truncation from 0 to N 1 is somehow arbitrary and sometimes the presentation with a series from N/2 to N/2 is preferred
9 731 in C13) we obtain ũx j ) = ux j ) at the grid points: We obtain successively where ũx j ) = = = 1 N = 1 N a n e i n 2πx j L 1 N m=0 m=0 m=0 u m e i nm 2π N e i nj 2π N [ u m [ u m ρ = e i j m) 2π N e i j m)n 2π N ρ n ] For j m, ρ 1 and the geometric sum takes the value ] C15) C16) C17) ρ n = 1 ρn 1 ρ = 0 C18) because j m is an integer so that ρ N = 1 When j = m the sum between brackets is simply N and we arrive at ũx j ) = ux j ), the desired result Transformation C14) is called the direct transform DFT) and C15) the inverse transform IDFT) As for the Fourier series, scaling can vary and the factor 1/N is commonly applied in the inverse transform rather than the direct Note that the inverse and direct transform are almost identical transformations, except for this scaling and more importantly the sign in the exponential Once the coefficients known, C13) can be evaluated at any position x in the domain and because the function ũx) takes the values ux j ) on the discrete points, we now have an interpolation function It can be used to calculate the value of the function at any desired location using N discrete values Also C13) can be used to evaluate derivatives: dũ dx = i k n a n e i knx, k n = 2πn L C19) All we have to do to calculate derivatives is to create Fourier coefficients b n = i k n a n from the original coefficient These are the Fourier coefficient for the derivative, which, by way of an inverse transform, lead to the values of derivatives ux) sampling ux j ) DFTu j) a n derivation b n = i k n a n IDFTb n ) dũ dx We note that the wavenumber associated with N m in C13) is equivalent to the one associated with m In reality, the shortest signal resolved by the series corresponds to n = N/2 with wavenumber k = Nπ/L or wavelength 2 x Hence coefficient a 0 contains the information on the average value, a 1 on the wavelength L and so on up to a N/2 which contains the xj
10 732 APPENDIX C: RECAPITULATION OF NUMERICAL SCHEMES Fundamental mode Average value 0 a n 2 x mode N/2 N 1 n Figure C-2 Coefficients a n contain the amplitudes of the different modes With the summation chosen from 0 to N 1, a N/2 contains the amplitude of the shortest signal complex amplitude of the shortest signal We see why some presentations of the DFT define the series between N/2 and N/2 The information content is however the same Up to now, the functions treated were considered complex functions and for a real signal u there is a redundancy in the coefficients a n Indeed, with u j = u j, where u stands for the complex conjugate, we have a N m = 1 N = 1 N j=0 j=0 u j e i N m)j 2π N u j e +i mj 2π N = a n C20) For real functions u, the DFT contains thus some redundant information and some algorithms exploit this property Cosine transforms CFT and sine transforms SFT perform in a similar way as DFT using only cosine or sine functions They are particularly useful if the solution of a problem is known to satisfy homogeneous boundary conditions For Neuman conditions in x = 0 and x = L, CFT is the method of choice while for homogeneous Dirichlet conditions, the development of the solution in terms of sine functions allows to satisfy these boundary conditions easily The annoying aspect with the transformation presented up to now is that a straightforward implementation as a sum of factors needs a data array of length N, and for each coefficient a n the calculation of N terms Therefore, in total, N 2 operations are necessary for each transform This is prohibitively expensive when used in large-size problems Fortunately Cooley and Tukey introduced in 1965 a method which is probably among the most celebrated numerical algorithms, reducing the cost of the DFT to N log 2 N operations Interestingly enough, the original idea of the method, now called Fast Fourier Transform, goes back to Gauss in 1805 see collected reprints Gauss, 1866), long before the advent of calculators able to exploit it The Fast Fourier Transform is a practical calculation of the discrete Fourier transform and starts with the observation that we can write the transform by separating even and odd terms in j:
11 733 Na n = = j = 0 j even N/2 1 m=0 u j e i nj 2π N + j = 0 j odd u j e i nj 2π N 2π i nm u 2m e N/2) + e i n 2π N N/2 1 m=0 2π i nm u 2m+1 e N/2) C21) and for simplicity we assume N to be a power of two, which is also the case in which the method performs best Each of the two sums involved is nothing else than a discrete transform working on N/2 data points But those in turn can be broken up into two smaller pieces and so on, a technique called divide and conquer When N is a power of two, this recursive division is possible until all series contain only a single term Such a single data point can be transformed in a single operation and the recurrence can be rolled up back to retrieve the transform of the original series To estimate the cost CN) for a transformation with N data, we see that it is the cost of two transformations of size N/2 and the multiplication by e i n 2π N for each of the N coefficients a n Hence CN) = 2 C N/2) + N C22) For a single point, one operation is needed so that we can deduce CN) N log 2 N C23) There is thus a substantial gain compared to a brute-force approach, which is particularly interesting in spectral methods Section 184) where direct and inverse transforms are intensively used Interpolation of a function knowing expansion coefficients could be obtained by a bruteforce summation of C13) at the desired locations But we can do better Suppose we want to interpolate into a regular finer) grid: x k = k/ml, k = 0,, M 1 having at our disposal measurements from original data on another regular grid x j = j/nl, j = 0,, N 1 The interpolation can be performed very efficiently by simply assuming that shorter signal than those initially capture by the N points have zero amplitude In other words, from a perspective of the new grid of M points, we take the Fourier coefficients provided from the N points up to the shortest wavelength resolved by this grid) and set all coefficients corresponding to shorter wavelength to zero This amounts to add zeros to the array of Fourier coefficients, a procedure called padding With the summing convention taken here from 0 to N 1), the padding must add zeros in the the middle of the array a n Depending on the scaling used, the coefficients also can need a rescaling before transforming back to real space The interpolation procedure is therefore schematically described by: ux j ) FFTu j) a n Padding b n = a n plus zeros; scaling IFFTb n) ũx k )
12 734 APPENDIX C: RECAPITULATION OF NUMERICAL SCHEMES Analytical Problems C-1 Find the truncation errors of the two Adams-Bashforth schemes by a Taylor expansion C-2 Which of the two second-order approximations of the cross-derivative has a lower truncation error? C-3 Try to establish a finite-difference approximation of a Jacobian at a corner point i + 1/2, j + 1/2, using only values from the nearest grid points Numerical Exercises C-1 Compare the behavior of the second-order Adams-Bashforths method with the leapfrogtrapezoidal method on the calculation of an inertial oscillation C-2 Discretize a function ux, y) = sin2πx/l) cos2πy/l) on a regular grid in x, y) Calculate the numerical Jacobian between ũ and ũ, ũ and ũ 2, ũ and ũ 3, and interpret your result C-3 Perform a FFT on fx) = sin2πx/l) between x = 0 and x = L, by sampling with 10, 20 or 40 points Using the spectral coefficients from the FFT, plot the series expansion using a very fine resolution 200 points) and verify that you recover the initial function Then repeat with the function fx) = x What do you observe? C-4 Redo Exercise C-3 using the padding technique instead of a brute-force series evaluation to plot the expansion
PARTIAL DIFFERENTIAL EQUATIONS
MATHEMATICAL METHODS PARTIAL DIFFERENTIAL EQUATIONS I YEAR B.Tech By Mr. Y. Prabhaker Reddy Asst. Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad. SYLLABUS OF MATHEMATICAL
More informationMATHEMATICAL METHODS INTERPOLATION
MATHEMATICAL METHODS INTERPOLATION I YEAR BTech By Mr Y Prabhaker Reddy Asst Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad SYLLABUS OF MATHEMATICAL METHODS (as per JNTU
More informationNumerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.
Numerical Methods for Engineers An Introduction with and Scientists Applications using MATLAB Third Edition Amos Gilat Vish- Subramaniam Department of Mechanical Engineering The Ohio State University Wiley
More informationThe Fourier spectral method (Amath Bretherton)
The Fourier spectral method (Amath 585 - Bretherton) 1 Introduction The Fourier spectral method (or more precisely, pseudospectral method) is a very accurate way to solve BVPs with smooth solutions on
More informationThe discrete and fast Fourier transforms
The discrete and fast Fourier transforms Marcel Oliver Revised April 7, 1 1 Fourier series We begin by recalling the familiar definition of the Fourier series. For a periodic function u: [, π] C, we define
More informationChapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.
Chapter 5 Exercises From: Finite Difference Methods for Ordinary and Partial Differential Equations by R. J. LeVeque, SIAM, 2007. http://www.amath.washington.edu/ rjl/fdmbook Exercise 5. (Uniqueness for
More informationTABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9
TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1 Chapter 01.01 Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 Chapter 01.02 Measuring errors 11 True error 11 Relative
More informationMath 411 Preliminaries
Math 411 Preliminaries Provide a list of preliminary vocabulary and concepts Preliminary Basic Netwon's method, Taylor series expansion (for single and multiple variables), Eigenvalue, Eigenvector, Vector
More informationLinear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4
Linear Algebra Section. : LU Decomposition Section. : Permutations and transposes Wednesday, February 1th Math 01 Week # 1 The LU Decomposition We learned last time that we can factor a invertible matrix
More informationLecture V: The game-engine loop & Time Integration
Lecture V: The game-engine loop & Time Integration The Basic Game-Engine Loop Previous state: " #, %(#) ( #, )(#) Forces -(#) Integrate velocities and positions Resolve Interpenetrations Per-body change
More information(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by
1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How
More informationReview Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester
HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE
More informationPoisson Solvers. William McLean. April 21, Return to Math3301/Math5315 Common Material.
Poisson Solvers William McLean April 21, 2004 Return to Math3301/Math5315 Common Material 1 Introduction Many problems in applied mathematics lead to a partial differential equation of the form a 2 u +
More informationMTH 452/552 Homework 3
MTH 452/552 Homework 3 Do either 1 or 2. 1. (40 points) [Use of ode113 and ode45] This problem can be solved by a modifying the m-files odesample.m and odesampletest.m available from the author s webpage.
More informationENGINEERING MATHEMATICS I. CODE: 10 MAT 11 IA Marks: 25 Hrs/Week: 04 Exam Hrs: 03 PART-A
ENGINEERING MATHEMATICS I CODE: 10 MAT 11 IA Marks: 25 Hrs/Week: 04 Exam Hrs: 03 Total Hrs: 52 Exam Marks:100 PART-A Unit-I: DIFFERENTIAL CALCULUS - 1 Determination of n th derivative of standard functions-illustrative
More informationPreface. 2 Linear Equations and Eigenvalue Problem 22
Contents Preface xv 1 Errors in Computation 1 1.1 Introduction 1 1.2 Floating Point Representation of Number 1 1.3 Binary Numbers 2 1.3.1 Binary number representation in computer 3 1.4 Significant Digits
More informationLECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel
LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count
More informationx x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)
Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)
More informationFourth Order RK-Method
Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)
More informationAn Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations
An Overly Simplified and Brief Review of Differential Equation Solution Methods We will be dealing with initial or boundary value problems. A typical initial value problem has the form y y 0 y(0) 1 A typical
More informationThe method of lines (MOL) for the diffusion equation
Chapter 1 The method of lines (MOL) for the diffusion equation The method of lines refers to an approximation of one or more partial differential equations with ordinary differential equations in just
More informationFinite difference method for elliptic problems: I
Finite difference method for elliptic problems: I Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen
More informationMath Methods for Polymer Physics Lecture 1: Series Representations of Functions
Math Methods for Polymer Physics ecture 1: Series Representations of Functions Series analysis is an essential tool in polymer physics and physical sciences, in general. Though other broadly speaking,
More informationNumerical Methods for Differential Equations
Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods
More informationBTCS Solution to the Heat Equation
BTCS Solution to the Heat Equation ME 448/548 Notes Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@mepdxedu ME 448/548: BTCS Solution to the Heat Equation Overview
More informationMultistep Methods for IVPs. t 0 < t < T
Multistep Methods for IVPs We are still considering the IVP dy dt = f(t,y) t 0 < t < T y(t 0 ) = y 0 So far we have looked at Euler s method, which was a first order method and Runge Kutta (RK) methods
More informationCS711008Z Algorithm Design and Analysis
CS711008Z Algorithm Design and Analysis Lecture 5 FFT and Divide and Conquer Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 / 56 Outline DFT: evaluate a polynomial
More informationNumerical Methods I Orthogonal Polynomials
Numerical Methods I Orthogonal Polynomials Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course G63.2010.001 / G22.2420-001, Fall 2010 Nov. 4th and 11th, 2010 A. Donev (Courant Institute)
More information1.Chapter Objectives
LU Factorization INDEX 1.Chapter objectives 2.Overview of LU factorization 2.1GAUSS ELIMINATION AS LU FACTORIZATION 2.2LU Factorization with Pivoting 2.3 MATLAB Function: lu 3. CHOLESKY FACTORIZATION 3.1
More informationa n cos 2πnt L n=1 {1/2, cos2π/l, cos 4π/L, cos6π/l,...,sin 2π/L, sin 4π/L, sin 6π/L,...,} (2)
Note Fourier. 30 January 2007 (as 23.II..tex) and 20 October 2009 in this form. Fourier Analysis The Fourier series First some terminology: a function f(t) is periodic if f(t + ) = f(t) for all t for some,
More informationApplied Numerical Analysis
Applied Numerical Analysis Using MATLAB Second Edition Laurene V. Fausett Texas A&M University-Commerce PEARSON Prentice Hall Upper Saddle River, NJ 07458 Contents Preface xi 1 Foundations 1 1.1 Introductory
More informationNumerical Linear Algebra
Numerical Linear Algebra Decompositions, numerical aspects Gerard Sleijpen and Martin van Gijzen September 27, 2017 1 Delft University of Technology Program Lecture 2 LU-decomposition Basic algorithm Cost
More informationFundamentals of the DFT (fft) Algorithms
Fundamentals of the DFT (fft) Algorithms D. Sundararajan November 6, 9 Contents 1 The PM DIF DFT Algorithm 1.1 Half-wave symmetry of periodic waveforms.............. 1. The DFT definition and the half-wave
More information30.3. LU Decomposition. Introduction. Prerequisites. Learning Outcomes
LU Decomposition 30.3 Introduction In this Section we consider another direct method for obtaining the solution of systems of equations in the form AX B. Prerequisites Before starting this Section you
More informationProgram Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects
Numerical Linear Algebra Decompositions, numerical aspects Program Lecture 2 LU-decomposition Basic algorithm Cost Stability Pivoting Cholesky decomposition Sparse matrices and reorderings Gerard Sleijpen
More informationBindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.
Logistics Week 12: Monday, Apr 18 HW 6 is due at 11:59 tonight. HW 7 is posted, and will be due in class on 4/25. The prelim is graded. An analysis and rubric are on CMS. Problem du jour For implicit methods
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 12 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted for noncommercial,
More informationIndex. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems
Index A-conjugate directions, 83 A-stability, 171 A( )-stability, 171 absolute error, 243 absolute stability, 149 for systems of equations, 154 absorbing boundary conditions, 228 Adams Bashforth methods,
More informationAn Analysis of Five Numerical Methods for Approximating Certain Hypergeometric Functions in Domains within their Radii of Convergence
An Analysis of Five Numerical Methods for Approximating Certain Hypergeometric Functions in Domains within their Radii of Convergence John Pearson MSc Special Topic Abstract Numerical approximations of
More informationPart IB Numerical Analysis
Part IB Numerical Analysis Definitions Based on lectures by G. Moore Notes taken by Dexter Chua Lent 206 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after
More informationLecture4 INF-MAT : 5. Fast Direct Solution of Large Linear Systems
Lecture4 INF-MAT 4350 2010: 5. Fast Direct Solution of Large Linear Systems Tom Lyche Centre of Mathematics for Applications, Department of Informatics, University of Oslo September 16, 2010 Test Matrix
More informationBlock-tridiagonal matrices
Block-tridiagonal matrices. p.1/31 Block-tridiagonal matrices - where do these arise? - as a result of a particular mesh-point ordering - as a part of a factorization procedure, for example when we compute
More informationNumerical Analysis Comprehensive Exam Questions
Numerical Analysis Comprehensive Exam Questions 1. Let f(x) = (x α) m g(x) where m is an integer and g(x) C (R), g(α). Write down the Newton s method for finding the root α of f(x), and study the order
More informationApplied Math for Engineers
Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method
More informationMathematics for Chemists 2 Lecture 14: Fourier analysis. Fourier series, Fourier transform, DFT/FFT
Mathematics for Chemists 2 Lecture 14: Fourier analysis Fourier series, Fourier transform, DFT/FFT Johannes Kepler University Summer semester 2012 Lecturer: David Sevilla Fourier analysis 1/25 Remembering
More information1 Introduction to MATLAB
L3 - December 015 Solving PDEs numerically (Reports due Thursday Dec 3rd, carolinemuller13@gmail.com) In this project, we will see various methods for solving Partial Differential Equations (PDEs) using
More informationNotes on Fourier Series and Integrals Fourier Series
Notes on Fourier Series and Integrals Fourier Series et f(x) be a piecewise linear function on [, ] (This means that f(x) may possess a finite number of finite discontinuities on the interval). Then f(x)
More informationScientific Computing: An Introductory Survey
Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign
More informationSolving linear systems (6 lectures)
Chapter 2 Solving linear systems (6 lectures) 2.1 Solving linear systems: LU factorization (1 lectures) Reference: [Trefethen, Bau III] Lecture 20, 21 How do you solve Ax = b? (2.1.1) In numerical linear
More informationNumerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by
Numerical Analysis A Comprehensive Introduction H. R. Schwarz University of Zürich Switzerland with a contribution by J. Waldvogel Swiss Federal Institute of Technology, Zürich JOHN WILEY & SONS Chichester
More informationLecture 9: Numerical Linear Algebra Primer (February 11st)
10-725/36-725: Convex Optimization Spring 2015 Lecture 9: Numerical Linear Algebra Primer (February 11st) Lecturer: Ryan Tibshirani Scribes: Avinash Siravuru, Guofan Wu, Maosheng Liu Note: LaTeX template
More informationNumerical Linear Algebra
Numerical Linear Algebra Direct Methods Philippe B. Laval KSU Fall 2017 Philippe B. Laval (KSU) Linear Systems: Direct Solution Methods Fall 2017 1 / 14 Introduction The solution of linear systems is one
More informationMath 56 Homework 5 Michael Downs
1. (a) Since f(x) = cos(6x) = ei6x 2 + e i6x 2, due to the orthogonality of each e inx, n Z, the only nonzero (complex) fourier coefficients are ˆf 6 and ˆf 6 and they re both 1 2 (which is also seen from
More informationNumerical Analysis Fall. Gauss Elimination
Numerical Analysis 2015 Fall Gauss Elimination Solving systems m g g m m g x x x k k k k k k k k k 3 2 1 3 2 1 3 3 3 2 3 2 2 2 1 0 0 Graphical Method For small sets of simultaneous equations, graphing
More informationCS 257: Numerical Methods
CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus
More informationCS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations
Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80
More informationNUMERICAL METHODS USING MATLAB
NUMERICAL METHODS USING MATLAB Dr John Penny George Lindfield Department of Mechanical Engineering, Aston University ELLIS HORWOOD NEW YORK LONDON TORONTO SYDNEY TOKYO SINGAPORE Preface 1 An introduction
More informationNumerical Linear Algebra
Chapter 3 Numerical Linear Algebra We review some techniques used to solve Ax = b where A is an n n matrix, and x and b are n 1 vectors (column vectors). We then review eigenvalues and eigenvectors and
More informationMATH2210 Notebook 2 Spring 2018
MATH2210 Notebook 2 Spring 2018 prepared by Professor Jenny Baglivo c Copyright 2009 2018 by Jenny A. Baglivo. All Rights Reserved. 2 MATH2210 Notebook 2 3 2.1 Matrices and Their Operations................................
More informationComputational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras
Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras Module No. # 07 Lecture No. # 05 Ordinary Differential Equations (Refer Slide
More informationMath 260: Solving the heat equation
Math 260: Solving the heat equation D. DeTurck University of Pennsylvania April 25, 2013 D. DeTurck Math 260 001 2013A: Solving the heat equation 1 / 1 1D heat equation with Dirichlet boundary conditions
More informationE The Fast Fourier Transform
Fourier Transform Methods in Finance By Umberto Cherubini Giovanni Della Lunga Sabrina Mulinacci Pietro Rossi Copyright 2010 John Wiley & Sons Ltd E The Fast Fourier Transform E.1 DISCRETE FOURIER TRASFORM
More information256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim.
56 Summary High order FD Finite-order finite differences: Points per Wavelength: Number of passes: D n f(x j ) = f j+n f j n n x df xj = m α m dx n D n f j j n= α m n = ( ) n (m!) (m n)!(m + n)!. PPW =
More informationLecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9
Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction
More informationLecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.
Lecture 9 Approximations of Laplace s Equation, Finite Element Method Mathématiques appliquées (MATH54-1) B. Dewals, C. Geuzaine V1.2 23/11/218 1 Learning objectives of this lecture Apply the finite difference
More informationNumerical Solution Techniques in Mechanical and Aerospace Engineering
Numerical Solution Techniques in Mechanical and Aerospace Engineering Chunlei Liang LECTURE 3 Solvers of linear algebraic equations 3.1. Outline of Lecture Finite-difference method for a 2D elliptic PDE
More informationImplicit Scheme for the Heat Equation
Implicit Scheme for the Heat Equation Implicit scheme for the one-dimensional heat equation Once again we consider the one-dimensional heat equation where we seek a u(x, t) satisfying u t = νu xx + f(x,
More informationMultistage Methods I: Runge-Kutta Methods
Multistage Methods I: Runge-Kutta Methods Varun Shankar January, 0 Introduction Previously, we saw that explicit multistep methods (AB methods) have shrinking stability regions as their orders are increased.
More informationA Brief Introduction to Numerical Methods for Differential Equations
A Brief Introduction to Numerical Methods for Differential Equations January 10, 2011 This tutorial introduces some basic numerical computation techniques that are useful for the simulation and analysis
More information5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns
5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns (1) possesses the solution and provided that.. The numerators and denominators are recognized
More information2.1 Gaussian Elimination
2. Gaussian Elimination A common problem encountered in numerical models is the one in which there are n equations and n unknowns. The following is a description of the Gaussian elimination method for
More informationA Review of Matrix Analysis
Matrix Notation Part Matrix Operations Matrices are simply rectangular arrays of quantities Each quantity in the array is called an element of the matrix and an element can be either a numerical value
More informationLecture IV: Time Discretization
Lecture IV: Time Discretization Motivation Kinematics: continuous motion in continuous time Computer simulation: Discrete time steps t Discrete Space (mesh particles) Updating Position Force induces acceleration.
More informationLU Factorization a 11 a 1 a 1n A = a 1 a a n (b) a n1 a n a nn L = l l 1 l ln1 ln 1 75 U = u 11 u 1 u 1n 0 u u n 0 u n...
.. Factorizations Reading: Trefethen and Bau (1997), Lecture 0 Solve the n n linear system by Gaussian elimination Ax = b (1) { Gaussian elimination is a direct method The solution is found after a nite
More informationMIDTERM 1 - SOLUTIONS
MIDTERM - SOLUTIONS MATH 254 - SUMMER 2002 - KUNIYUKI CHAPTERS, 2, GRADED OUT OF 75 POINTS 2 50 POINTS TOTAL ) Use either Gaussian elimination with back-substitution or Gauss-Jordan elimination to solve
More informationComputational Techniques Prof. Sreenivas Jayanthi. Department of Chemical Engineering Indian institute of Technology, Madras
Computational Techniques Prof. Sreenivas Jayanthi. Department of Chemical Engineering Indian institute of Technology, Madras Module No. # 05 Lecture No. # 24 Gauss-Jordan method L U decomposition method
More informationAPPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.
APPENDIX A Background Mathematics A. Linear Algebra A.. Vector algebra Let x denote the n-dimensional column vector with components 0 x x 2 B C @. A x n Definition 6 (scalar product). The scalar product
More informationJim Lambers MAT 772 Fall Semester Lecture 21 Notes
Jim Lambers MAT 772 Fall Semester 21-11 Lecture 21 Notes These notes correspond to Sections 12.6, 12.7 and 12.8 in the text. Multistep Methods All of the numerical methods that we have developed for solving
More information5.1 Banded Storage. u = temperature. The five-point difference operator. uh (x, y + h) 2u h (x, y)+u h (x, y h) uh (x + h, y) 2u h (x, y)+u h (x h, y)
5.1 Banded Storage u = temperature u= u h temperature at gridpoints u h = 1 u= Laplace s equation u= h u = u h = grid size u=1 The five-point difference operator 1 u h =1 uh (x + h, y) 2u h (x, y)+u h
More informationScientific Computing
Scientific Computing Direct solution methods Martin van Gijzen Delft University of Technology October 3, 2018 1 Program October 3 Matrix norms LU decomposition Basic algorithm Cost Stability Pivoting Pivoting
More informationMASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011
MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS 02139 2.29 NUMERICAL FLUID MECHANICS FALL 2011 QUIZ 2 The goals of this quiz 2 are to: (i) ask some general
More informationDepartment of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004
Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question
More informationReview of matrices. Let m, n IN. A rectangle of numbers written like A =
Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a 12... a 1n a 21 a 22... a 2n A =...... a m1 a m2... a mn where each a ij IR is called a matrix with m rows and n columns or an
More informationAdvanced. Engineering Mathematics
Advanced Engineering Mathematics A new edition of Further Engineering Mathematics K. A. Stroud Formerly Principal Lecturer Department of Mathematics, Coventry University with additions by Dexter j. Booth
More informationEvolution equations with spectral methods: the case of the wave equation
Evolution equations with spectral methods: the case of the wave equation Jerome.Novak@obspm.fr Laboratoire de l Univers et de ses Théories (LUTH) CNRS / Observatoire de Paris, France in collaboration with
More informationAIMS Exercise Set # 1
AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest
More informationTime-dependent variational forms
Time-dependent variational forms Hans Petter Langtangen 1,2 1 Center for Biomedical Computing, Simula Research Laboratory 2 Department of Informatics, University of Oslo Oct 30, 2015 PRELIMINARY VERSION
More informationNumerical solution of ODEs
Numerical solution of ODEs Arne Morten Kvarving Department of Mathematical Sciences Norwegian University of Science and Technology November 5 2007 Problem and solution strategy We want to find an approximation
More informationFinite Difference Methods for Boundary Value Problems
Finite Difference Methods for Boundary Value Problems October 2, 2013 () Finite Differences October 2, 2013 1 / 52 Goals Learn steps to approximate BVPs using the Finite Difference Method Start with two-point
More informationKINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK
KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS
More informationChapter 4. MAC Scheme. The MAC scheme is a numerical method used to solve the incompressible Navier-Stokes. u = 0
Chapter 4. MAC Scheme 4.1. MAC Scheme and the Staggered Grid. The MAC scheme is a numerical method used to solve the incompressible Navier-Stokes equation in the velocity-pressure formulation: (4.1.1)
More information12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR BSSE 4 ROLL NO: 15126
12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR Cramer s Rule Solving a physical system of linear equation by using Cramer s rule Cramer s rule is really
More informationMath 471 (Numerical methods) Chapter 3 (second half). System of equations
Math 47 (Numerical methods) Chapter 3 (second half). System of equations Overlap 3.5 3.8 of Bradie 3.5 LU factorization w/o pivoting. Motivation: ( ) A I Gaussian Elimination (U L ) where U is upper triangular
More informationMidterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015
Midterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015 The test lasts 1 hour and 15 minutes. No documents are allowed. The use of a calculator, cell phone or other equivalent electronic
More informationMATH 3511 Lecture 1. Solving Linear Systems 1
MATH 3511 Lecture 1 Solving Linear Systems 1 Dmitriy Leykekhman Spring 2012 Goals Review of basic linear algebra Solution of simple linear systems Gaussian elimination D Leykekhman - MATH 3511 Introduction
More informationMatrix decompositions
Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers
More informationMA2501 Numerical Methods Spring 2015
Norwegian University of Science and Technology Department of Mathematics MA5 Numerical Methods Spring 5 Solutions to exercise set 9 Find approximate values of the following integrals using the adaptive
More informationLU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark
DM559 Linear and Integer Programming LU Factorization Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark [Based on slides by Lieven Vandenberghe, UCLA] Outline
More informationFinite Difference Methods (FDMs) 1
Finite Difference Methods (FDMs) 1 1 st - order Approxima9on Recall Taylor series expansion: Forward difference: Backward difference: Central difference: 2 nd - order Approxima9on Forward difference: Backward
More informationOrdinary Differential Equations
Ordinary Differential Equations We call Ordinary Differential Equation (ODE) of nth order in the variable x, a relation of the kind: where L is an operator. If it is a linear operator, we call the equation
More information