1 Polynomial approximation of the gamma function

Size: px
Start display at page:

Download "1 Polynomial approximation of the gamma function"

Transcription

1 AM05: Solutions to take-home midterm exam 1 1 Polynomial approximation of the gamma function Part (a) One way to answer this question is by constructing the Vandermonde linear system Solving this matrix system yields g g g =. (1) g g 4 (g 0, g 1, g, g, g 4 ) = ( , 16.58, ,.14667, ) () from which an approximation to the gamma function is given by g(x) = 4 k=0 g kx k. Part (b) The coefficients of the polynomial p(x) = 4 k=0 p kx k are given by Solving this system yields p p p = log. () p log p 4 log 4 (p 0, p 1, p, p, p 4 ) = (1.1507, , 0.880, , ) (4) from which the second gamma function approximation is given by h(x) = exp(p(x)). Parts (c) and (d) The program MidtermSol1.py constructs the two gamma function approximations. Figure 1 shows g(x) and h(x) in comparison to Γ(x). The program also calculates the maximum absolute relative error of the two approximations. To ensure that the desired level of accuracy is achieved, the program first scans over a coarse grid G α of equally spaced points in x, and computes the maximum relative error M α. The program then considers a finer grid G α+1 and computes the corresponding M α+1. This process is continued until the ratio M α+1 M α /M α drops below a threshold of ɛ = 10 4, whereupon it is assumed that M α+1 is a good approximation to the global 1 Solutions written by Henry Wilkin and Chris Rycroft. Thanks to Yuexia Luna Lin for help with the solution to question. 1

2 Figure 1: The gamma function Γ(x) and the two interpolating functions g(x) and h(x) considered in question 1. maximum. The maximum relative error of g(x) (defined as max x [1,5] Γ(x) g(x) /Γ(x)) was found to be , and the maximum relative error of h(x) was found to be The approximation h(x) is better, likely because the logarithm of a rapidly growing positive function typically has smaller n-th order derivatives, so the error bounds associated with the formula of Cauchy for polynomial interpolation considered in lecture are more restrictive. Least-squares spline fitting Parts (a) and (b) The program MidtermSol.py computes the coefficents of the least-squares spline fit. In Python the s k basis functions can be defined using scipy.interpolate.splmake, with the kind argument set to natural in order to match the specified boundary conditions. The spline can also be constructed manually, following the same procedures described in the spline notes on the website. The best fit coefficients for the points in the sdata1.txt data file are b = (0.491, , 0.859, 0.5, 0.596, 0.50, 1.661,.974, 1.46) (5) and the best fit coefficients for the points in the sdata.txt data file are b = (0.47, 0.174, 0.795,.50, 8.711, 1.77, 1.881,.850, 1.576). (6) Plots of the two best-fit splines are shown in Figs. 4 & 5.

3 Figure : A plot of the absolute relative error between g(x) and Γ(x) over the range [1, 5]. Figure : A plot of the absolute relative error between h(x) and Γ(x) over the range [1, 5].

4 1 spline curve sdata Figure 4: The data points from question (a), and the least-squares fit of the spline function. 0 spline curve sdata Figure 5: The data points from question (b), and the least-squares fit of the spline function. 4

5 Part (c) Of the two splines, the second one looks unreasonable since there is a large negative bump in the curve around x = 4 that does not appear consistent with the provided data points. This occurs because the spline fitting procedure does not work well when there is a region without data points. Consider the spline basis function s 4 (x): it is largest near x = 4. For all of the given data points, which lie in the ranges x < and x > 5, this function is very small. When performing the fitting procedure, the coefficient b 4 will be set based on the contribution of these very small values to the square residual, potentially creating an unreasonably large coefficient on s 4. In other words, the coefficient b 4 is poorly constrained by the data. Note that this problem would not occur for least-squares fitting based on polynomials, since the monomial basis functions all vary significantly at the given data points, and thus all of the fitted coefficients will be well-constrained. However spline-based fitting could be useful in some situations, provided the data is evenly distributed. Stability of a scheme for the heat equation Part (a) The Taylor expansion of f to second order is f (x + h) = f (x) + h f (x) + h f (x) + O(h ). (7) Note also that if f (z) has a convergent power series expansion near z = x, then f (x + h) + f (x h) = f (x) + f (x)h + O(h 4 ). This is because the left hand side is even in h, so only even powers of h appear in the power series expansion. To fourth order, the expression a f (x) + b( f (x + h) + f (x h)) + c( f (x + h) + f (x h)) is given by which simplifies to (a + b) f (x) + bh f (x) + c f (x) + 4ch f (x), (8) (a + b + c) f (x) + (b + 4c)h f (x). (9) For this to equal h f (x) up to error terms of order h 4, it is necessary that a + b + c = 0 and b + 4c = 1. Together, these imply that b = c a and c = 1 + a. Hence c(a) = 1 + a 6 (10) and therefore b(a) = 1 a. (11) Part (b) Substituting in the expressions from part (a) shows that discretization is given by U n+1 j = U n j + t h ( auj n 1 + a (U n j+1 + Un j 1 ) + + a 6 (Un j+ + Un j ) ). (1) 5

6 Setting Uj n = [λ(k)] n e ijkh and using the result e i(j+δ)kh + e i(j δ)kh = e ijkh cos(δkh)) yields the expression λ(k) = 1 + t ( h a + 4a cos(kh) + + a ) cos(kh) (1) for the amplification factor λ(k). Since cos θ = 1 sin θ, cos(kh) = 1 sin (kh) In additon cos(kh) = 1 s and therefore = 1 (1 + cos(kh))(1 cos(kh)) ( = 1 sin kh ) sin kh = 1 8s (1 s ). (14) ( λ(k) = 1 + µ a + 4a (1 s(k)) + + a [ ] ) 1 8s(k)(1 s(k)) ) = 1 + 4µ( s(k) (a + ) s(k). (15) Part (c) Setting a equal to gives b = = 1 and c = 1 6 = 0, so the method is equivalent to ordinary forward Euler integration with the standard second-order centered-difference stencil as discussed in the lectures. The eigenvalue λ(k) in this case is given by 1 4µs(k). Since s = sin hk 0, and s 1, λ(k) is stable as long as 1 4µ < 1. This is achieved at 1 4µ = 1, where µ = 1. Hence stability requires µ 1. Part (d) The method is unstable if there is any value of k for which λ(k) > 1. Using the definition s = sin hk, searching over arbitrary k is equivalent to searching over the range s [0, 1]. From Eq. 15, the case of λ > 1 corresponds to ( ) (a + )s 4µs 1 > 0. (16) which simplifies to and hence (a + )s 1 > 0, (17) (a + )s > (18) If a > a where a = 1, then Eq. 18 will be true for s = 1 regardless of the choice of µ, and thus the method will be unconditionally unstable. If a 1, then it follows that (a + )s 1 0 (19) 6

7 for all s [0, 1]. Hence for sufficiently small µ, it follows that ( ) (a + )s µs 1 1 (0) and thus λ(k) 1 for all k and the method is stable. Thus the method is unconditionally unstable if and only if a > a. Part (e) Equation 15 can be rewritten as λ(s) = 8(a + )µ s 4µs + 1, (1) where λ is now viewed as a function of s. This is a parabola that passes through the point (s, λ) = (0, 1). The parabola has a stationary point at s = s e, which is given by 0 = λ (s e ) = 16(a + )µs e 4µ () where the derivative is taken with respect to s, and hence s e = /4(a + ). The stability properties are given by considering the parabola over the range s [0, 1] and there are several cases: 1. If a < then λ < 0 and the parabola curves downward. In addition the parabola has a maximum at s e < 0. Hence, λ is monotonically decreasing over s [0, 1] and λ(1) = 8(a + )µ 4µ + 1 = 4(a + 1)µ + 1 () For stability, it is necessary for λ(1) 1 since this will ensure that all values in the range of s [0, 1] satisfy λ(s) 1. This will occur when µ (1 + a). (4). If < a 5 4 then λ > 0 and the parabola curves upward. It has a minimum at s e 1, and is therefore monotonically decreasing over s [0, 1]. Therefore for stability it is necessary to have λ(1) 1, which corresponds to as in the previous case. µ (1 + a). If 5 4 < a 1, then the parabola curves upward but has a minimum value at s e [ 1, 1). Since the parabola is symmetric about its extremum point in [ 1, 1) and λ(0) = 1, it follows that λ(1) < 1. Thus to ensure stability it suffices to check that λ(s e ) 1, which corresponds to 8(a + )µ 9 1 λ(s e ) = 16(a + ) µ a = 1 µ (a + ). (6) This will be true if µ 7 (5) 4(a + ). (7)

8 In summary, the range of permissible µ for stability is { 4(a+) if 5 4 µ(a) < a 1, if 5 (1+a) 4 a. (8) Part (f) This maximum step size of µ = is achieved for a = 1 = a. For this value b(a) = 0 and c(a) = 1 4, and thus the scheme is given by U n+1 j = U n j + t h ( 1 Un j (Un j+ + Un j ) ). (9) Note that in this case, the value at gridpoint j only depends on the values at gridpoints j, j, and j +. If the scheme is run on the initial data Uj 0 = ( 1) j, which alternates between 1 and 1 at successive gridpoints, then the solution will remain invariant as Uj n = ( 1) j for all timesteps. All second derivative calculations will evaluate to zero, since they either sample all 1 values, or all 1 values. This is formally stable, and is consistent with the calculations in part (e). However, it would not be good in practice physcially, the heat equation should damp out local variations, and thus it is undesirable to have the..., 1, 1, 1, 1,... solution remain invariant with time. Note that this is true regardless of the choice of µ; decreasing the timestep will not help. Solving an elliptic problem on an irregular domain Part (a) Since f appears eight times with weight β and once with weight α, matching with f to maximal order requires α = 8β. Meanwhile, since f (x + h) = f (x) + h f (x) + h f (x) +..., f (x + h) + f (x h) + f (x + h) + f (x h) = 4 f (x) + h f (x) + (h) f (x) = 4 f (x) + 5h f (x) (0) and the sum multiplying β is 8v(i, j) + 5h xv(i, j) + 5h yv(i, j). Hence, β = 1, and α = 8. 5h 5h Alternatively, this result can also be derived from your expressions for b(a), c(a) from problem (a) by solving for the value of a at which b = c. This requires 1 a = 1 + a 6 and hence 5a/6 = /, so a = 4/5. The stencil in this question can be made by superposing the question (a) stencil in the x and y directions. Hence (1) α = a = 8 5 () and β = b = c = 1 5. () 8

9 Part (b) If (j, k) is an interior site, let C = {s n} N C n=1 be the set of nearest neighbor sites of (j, k) in Ω\ Ω, and let C = {s l }N C l=1 be the set of next nearest neighbor stencil sites that lie in the interior. If there are N e stencil sites in the exterior (i.e. not in Ω or Ω), then the discrete approximation at (i, j) can be written as 8 + N e 5h V j,k + 1 ( ) 5h V s + V s. (4) s C s C For example, when (j + 1, k) is a boundary site and (j +, k) is exterior, N e = 1 and the explicit discrete Laplacian at (j, k) is Parts (c) and (d) 9 5h V j,k + 1 5h ( V j,k+1 + V j,k 1 + V j 1,k + V j,k + V j,k+ + V j,k ). (5) The program MidtermSol.py solves the elliptic problem using the given stencils. To define a map from lattice sites to vector indices (and vice versa), the program first sweeps over rows and columns of the discrete approximation to Ω and assigns a vector index to the field value on each lattice site in the order visited. Thus, (v 0, v 1, v,...) = (V (0,18), V (0,19), V (0,0),..., V (1,18), V (1,19),...]). (6) In order to build a representation of the discrete Laplacian with this labeling scheme, it helps to introduce some auxiliary structures. First, a len(v) array vi ls that gives the -dimensional lattice site of each linear vector index, and a 5 5 dimensional array ls vi that maps interior lattice sites to their corresponding vector indices. Also, a discrete approximation ω M (5,5) for Ω and its boundary is constructed according to: 1 if (hi, hj) is on the interior of Ω, ω ij = 0 if (hi, hj) is on the boundary Ω, 1 if (hi, hj) is in the complement of Ω. These structures make it easier to construct adjacency networks for the nodes v (with respect to the stencil), and to count the number of stencil sites at each node that lie in the complement of Ω. The Laplacian can then be defined in a straightforward way from these. The Cholesky factorization can be found either using numpy.linalg.cholesky in Python or chol in MATLAB. The algorithm described in lecture seven can also be used. Plots of the solution are shown in Fig. 6. The maximum occurs at site [11, 8], where the field value is to seven significant figures. (7) 9

10 Figure 6: Three-dimensional plot (left) and contour plot (right) of the two-dimensional solution to the elliptic problem in question 4, solved via the Cholesky factorization. 10

Partial Differential Equations

Partial Differential Equations Next: Using Matlab Up: Numerical Analysis for Chemical Previous: Ordinary Differential Equations Subsections Finite Difference: Elliptic Equations The Laplace Equations Solution Techniques Boundary Conditions

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Discretization of Boundary Conditions Discretization of Boundary Conditions On

More information

APPENDIX 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.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 information

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 28 PART II Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 29 BOUNDARY VALUE PROBLEMS (I) Solving a TWO

More information

The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods

The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods The Closed Form Reproducing Polynomial Particle Shape Functions for Meshfree Particle Methods by Hae-Soo Oh Department of Mathematics, University of North Carolina at Charlotte, Charlotte, NC 28223 June

More information

Finite Difference Methods for Boundary Value Problems

Finite 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 information

Preliminary Examination, Numerical Analysis, August 2016

Preliminary Examination, Numerical Analysis, August 2016 Preliminary Examination, Numerical Analysis, August 2016 Instructions: This exam is closed books and notes. The time allowed is three hours and you need to work on any three out of questions 1-4 and any

More information

CONSTRAINED PERCOLATION ON Z 2

CONSTRAINED PERCOLATION ON Z 2 CONSTRAINED PERCOLATION ON Z 2 ZHONGYANG LI Abstract. We study a constrained percolation process on Z 2, and prove the almost sure nonexistence of infinite clusters and contours for a large class of probability

More information

Minimal Element Interpolation in Functions of High-Dimension

Minimal Element Interpolation in Functions of High-Dimension Minimal Element Interpolation in Functions of High-Dimension J. D. Jakeman, A. Narayan, D. Xiu Department of Mathematics Purdue University West Lafayette, Indiana Random Model as a function We can consider

More information

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

More information

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x 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 information

Finite Difference Solution of the Heat Equation

Finite Difference Solution of the Heat Equation Finite Difference Solution of the Heat Equation Adam Powell 22.091 March 13 15, 2002 In example 4.3 (p. 10) of his lecture notes for March 11, Rodolfo Rosales gives the constant-density heat equation as:

More information

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4215 Numerical Mathematics Department of Mathematical Sciences Examination paper for TMA425 Numerical Mathematics Academic contact during examination: Trond Kvamsdal Phone: 93058702 Examination date: 6th of December 207 Examination

More information

Numerical Analysis of Differential Equations Numerical Solution of Elliptic Boundary Value

Numerical Analysis of Differential Equations Numerical Solution of Elliptic Boundary Value Numerical Analysis of Differential Equations 188 5 Numerical Solution of Elliptic Boundary Value Problems 5 Numerical Solution of Elliptic Boundary Value Problems TU Bergakademie Freiberg, SS 2012 Numerical

More information

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation

More information

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations

More information

Optimization. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Optimization 1 / 30

Optimization. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Optimization 1 / 30 Optimization Escuela de Ingeniería Informática de Oviedo (Dpto. de Matemáticas-UniOvi) Numerical Computation Optimization 1 / 30 Unconstrained optimization Outline 1 Unconstrained optimization 2 Constrained

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University The Implicit Schemes for the Model Problem The Crank-Nicolson scheme and θ-scheme

More information

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Numerical 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 information

3.1. QUADRATIC FUNCTIONS AND MODELS

3.1. QUADRATIC FUNCTIONS AND MODELS 3.1. QUADRATIC FUNCTIONS AND MODELS 1 What You Should Learn Analyze graphs of quadratic functions. Write quadratic functions in standard form and use the results to sketch graphs of functions. Find minimum

More information

CS 257: Numerical Methods

CS 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 information

ME Computational Fluid Mechanics Lecture 5

ME Computational Fluid Mechanics Lecture 5 ME - 733 Computational Fluid Mechanics Lecture 5 Dr./ Ahmed Nagib Elmekawy Dec. 20, 2018 Elliptic PDEs: Finite Difference Formulation Using central difference formulation, the so called five-point formula

More information

Preliminary Examination in Numerical Analysis

Preliminary Examination in Numerical Analysis Department of Applied Mathematics Preliminary Examination in Numerical Analysis August 7, 06, 0 am pm. Submit solutions to four (and no more) of the following six problems. Show all your work, and justify

More information

Intensity Analysis of Spatial Point Patterns Geog 210C Introduction to Spatial Data Analysis

Intensity Analysis of Spatial Point Patterns Geog 210C Introduction to Spatial Data Analysis Intensity Analysis of Spatial Point Patterns Geog 210C Introduction to Spatial Data Analysis Chris Funk Lecture 5 Topic Overview 1) Introduction/Unvariate Statistics 2) Bootstrapping/Monte Carlo Simulation/Kernel

More information

Applied Numerical Analysis Quiz #2

Applied Numerical Analysis Quiz #2 Applied Numerical Analysis Quiz #2 Modules 3 and 4 Name: Student number: DO NOT OPEN UNTIL ASKED Instructions: Make sure you have a machine-readable answer form. Write your name and student number in the

More information

Stabilization and Acceleration of Algebraic Multigrid Method

Stabilization and Acceleration of Algebraic Multigrid Method Stabilization and Acceleration of Algebraic Multigrid Method Recursive Projection Algorithm A. Jemcov J.P. Maruszewski Fluent Inc. October 24, 2006 Outline 1 Need for Algorithm Stabilization and Acceleration

More information

Partial Differential Equations

Partial Differential Equations Chapter 14 Partial Differential Equations Our intuition for ordinary differential equations generally stems from the time evolution of physical systems. Equations like Newton s second law determining the

More information

MA22S3 Summary Sheet: Ordinary Differential Equations

MA22S3 Summary Sheet: Ordinary Differential Equations MA22S3 Summary Sheet: Ordinary Differential Equations December 14, 2017 Kreyszig s textbook is a suitable guide for this part of the module. Contents 1 Terminology 1 2 First order separable 2 2.1 Separable

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

FINITE DIFFERENCE METHODS (II): 1D EXAMPLES IN MATLAB

FINITE DIFFERENCE METHODS (II): 1D EXAMPLES IN MATLAB 1.723 - COMPUTATIONAL METHODS FOR FLOW IN POROUS MEDIA Spring 2009 FINITE DIFFERENCE METHODS (II): 1D EXAMPLES IN MATLAB Luis Cueto-Felgueroso 1. COMPUTING FINITE DIFFERENCE WEIGHTS The function fdcoefs

More information

Finite difference methods for the diffusion equation

Finite difference methods for the diffusion equation Finite difference methods for the diffusion equation D150, Tillämpade numeriska metoder II Olof Runborg May 0, 003 These notes summarize a part of the material in Chapter 13 of Iserles. They are based

More information

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

Finite Differences: Consistency, Stability and Convergence

Finite Differences: Consistency, Stability and Convergence Finite Differences: Consistency, Stability and Convergence Varun Shankar March, 06 Introduction Now that we have tackled our first space-time PDE, we will take a quick detour from presenting new FD methods,

More information

An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations.

An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations. An Efficient Algorithm Based on Quadratic Spline Collocation and Finite Difference Methods for Parabolic Partial Differential Equations by Tong Chen A thesis submitted in conformity with the requirements

More information

Numerical Analysis: Interpolation Part 1

Numerical Analysis: Interpolation Part 1 Numerical Analysis: Interpolation Part 1 Computer Science, Ben-Gurion University (slides based mostly on Prof. Ben-Shahar s notes) 2018/2019, Fall Semester BGU CS Interpolation (ver. 1.00) AY 2018/2019,

More information

Homework and Computer Problems for Math*2130 (W17).

Homework and Computer Problems for Math*2130 (W17). Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should

More information

Time-dependent variational forms

Time-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 information

A Hybrid Method for the Wave Equation. beilina

A Hybrid Method for the Wave Equation.   beilina A Hybrid Method for the Wave Equation http://www.math.unibas.ch/ beilina 1 The mathematical model The model problem is the wave equation 2 u t 2 = (a 2 u) + f, x Ω R 3, t > 0, (1) u(x, 0) = 0, x Ω, (2)

More information

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018 Numerical Analysis Preliminary Exam 0.00am.00pm, January 9, 208 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Spring 2016), Stanford University

Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Spring 2016), Stanford University Final Examination CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Spring 2016), Stanford University The exam runs for 3 hours. The exam contains seven problems. You must complete the

More information

Exam in Numerical Methods (MA2501)

Exam in Numerical Methods (MA2501) Norwegian University of Science and Technology Department of Mathematical Sciences Page 1 of 7 MA251 Numeriske Metoder Olivier Verdier (contact: 48 95 2 66) Exam in Numerical Methods (MA251) 211-5-25,

More information

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2. INTERPOLATION Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). As an example, consider defining and x 0 = 0, x 1 = π/4, x

More information

Do not turn over until you are told to do so by the Invigilator.

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE612B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

PH.D. PRELIMINARY EXAMINATION MATHEMATICS

PH.D. PRELIMINARY EXAMINATION MATHEMATICS UNIVERSITY OF CALIFORNIA, BERKELEY SPRING SEMESTER 207 Dept. of Civil and Environmental Engineering Structural Engineering, Mechanics and Materials NAME PH.D. PRELIMINARY EXAMINATION MATHEMATICS Problem

More information

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic Applied Mathematics 205 Unit III: Numerical Calculus Lecturer: Dr. David Knezevic Unit III: Numerical Calculus Chapter III.3: Boundary Value Problems and PDEs 2 / 96 ODE Boundary Value Problems 3 / 96

More information

x 2 + y 2 = 1 (1) ), ( 2 , 3

x 2 + y 2 = 1 (1) ), ( 2 , 3 AM205: Assignment 2 solutions Problem 1 norms and Newton root finding Part (a) Write b = (x, y). Then b 2 = 1 implies and Ab 2 = 1 implies that Subtracting Eq. 1 from Eq. 2 gives x 2 + y 2 = 1 (1) (3x

More information

Remark 3.2. The cross product only makes sense in R 3.

Remark 3.2. The cross product only makes sense in R 3. 3. Cross product Definition 3.1. Let v and w be two vectors in R 3. The cross product of v and w, denoted v w, is the vector defined as follows: the length of v w is the area of the parallelogram with

More information

HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS

HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS JASON ALBRIGHT, YEKATERINA EPSHTEYN, AND QING XIA Abstract. Highly-accurate numerical methods that can efficiently

More information

Numerical Methods for Differential Equations Mathematical and Computational Tools

Numerical Methods for Differential Equations Mathematical and Computational Tools Numerical Methods for Differential Equations Mathematical and Computational Tools Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 Part 1. Vector norms, matrix norms and logarithmic

More information

Fundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Fundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved Fundamentals of Linear Algebra Marcel B. Finan Arkansas Tech University c All Rights Reserved 2 PREFACE Linear algebra has evolved as a branch of mathematics with wide range of applications to the natural

More information

3 Undirected Graphical Models

3 Undirected Graphical Models Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.438 Algorithms For Inference Fall 2014 3 Undirected Graphical Models In this lecture, we discuss undirected

More information

Qualification Exam: Mathematical Methods

Qualification Exam: Mathematical Methods Qualification Exam: Mathematical Methods Name:, QEID#41534189: August, 218 Qualification Exam QEID#41534189 2 1 Mathematical Methods I Problem 1. ID:MM-1-2 Solve the differential equation dy + y = sin

More information

Ordinary Differential Equations

Ordinary 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

Kernel Methods. Charles Elkan October 17, 2007

Kernel Methods. Charles Elkan October 17, 2007 Kernel Methods Charles Elkan elkan@cs.ucsd.edu October 17, 2007 Remember the xor example of a classification problem that is not linearly separable. If we map every example into a new representation, then

More information

HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS

HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS HIGH-ORDER ACCURATE METHODS BASED ON DIFFERENCE POTENTIALS FOR 2D PARABOLIC INTERFACE MODELS JASON ALBRIGHT, YEKATERINA EPSHTEYN, AND QING XIA Abstract. Highly-accurate numerical methods that can efficiently

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

LECTURE 5, FRIDAY

LECTURE 5, FRIDAY LECTURE 5, FRIDAY 20.02.04 FRANZ LEMMERMEYER Before we start with the arithmetic of elliptic curves, let us talk a little bit about multiplicities, tangents, and singular points. 1. Tangents How do we

More information

DIFFERENCE EQUATIONS

DIFFERENCE EQUATIONS Chapter 3 DIFFERENCE EQUATIONS 3.1 Introduction Differential equations are applicable for continuous systems and cannot be used for discrete variables. Difference equations are the discrete equivalent

More information

We wish to solve a system of N simultaneous linear algebraic equations for the N unknowns x 1, x 2,...,x N, that are expressed in the general form

We wish to solve a system of N simultaneous linear algebraic equations for the N unknowns x 1, x 2,...,x N, that are expressed in the general form Linear algebra This chapter discusses the solution of sets of linear algebraic equations and defines basic vector/matrix operations The focus is upon elimination methods such as Gaussian elimination, and

More information

Numerical solution of the 2-D Poisson equation on an irregular domain with Robin boundary conditions

Numerical solution of the 2-D Poisson equation on an irregular domain with Robin boundary conditions Numerical solution of the 2-D Poisson equation on an irregular domain with Robin boundary conditions Z. Jomaa C. Macaskill August 8, 28 Abstract We describe a 2-D finite difference algorithm for inverting

More information

MONOTONE SCHEMES FOR DEGENERATE AND NON-DEGENERATE PARABOLIC PROBLEMS

MONOTONE SCHEMES FOR DEGENERATE AND NON-DEGENERATE PARABOLIC PROBLEMS MONOTONE SCHEMES FOR DEGENERATE AND NON-DEGENERATE PARABOLIC PROBLEMS by MIRNA LIMIC M.B.A. Rochester Institute of Technology, 2 B.Sc., Economics and Business, 999 A THESIS SUBMITTED IN PARTIAL FULFILLMENT

More information

Gradient and smoothing stencils with isotropic discretization error. Abstract

Gradient and smoothing stencils with isotropic discretization error. Abstract Gradient and smoothing stencils with isotropic discretization error Tommy Anderberg (Dated: April 30, 2012) Abstract Gradient stencils with isotropic O(h 2 ) and O(h 4 ) discretization error are constructed

More information

Part 1. The diffusion equation

Part 1. The diffusion equation Differential Equations FMNN10 Graded Project #3 c G Söderlind 2016 2017 Published 2017-11-27. Instruction in computer lab 2017-11-30/2017-12-06/07. Project due date: Monday 2017-12-11 at 12:00:00. Goals.

More information

Assignment on iterative solution methods and preconditioning

Assignment on iterative solution methods and preconditioning Division of Scientific Computing, Department of Information Technology, Uppsala University Numerical Linear Algebra October-November, 2018 Assignment on iterative solution methods and preconditioning 1.

More information

Scientific Computing: Numerical Integration

Scientific Computing: Numerical Integration Scientific Computing: Numerical Integration Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Fall 2015 Nov 5th, 2015 A. Donev (Courant Institute) Lecture

More information

AM205: Assignment 3 (due 5 PM, October 20)

AM205: Assignment 3 (due 5 PM, October 20) AM25: Assignment 3 (due 5 PM, October 2) For this assignment, first complete problems 1, 2, 3, and 4, and then complete either problem 5 (on theory) or problem 6 (on an application). If you submit answers

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University A Model Problem in a 2D Box Region Let us consider a model problem of parabolic

More information

We denote the derivative at x by DF (x) = L. With respect to the standard bases of R n and R m, DF (x) is simply the matrix of partial derivatives,

We denote the derivative at x by DF (x) = L. With respect to the standard bases of R n and R m, DF (x) is simply the matrix of partial derivatives, The derivative Let O be an open subset of R n, and F : O R m a continuous function We say F is differentiable at a point x O, with derivative L, if L : R n R m is a linear transformation such that, for

More information

COUPLING TIMES FOR RANDOM WALKS WITH INTERNAL STATES

COUPLING TIMES FOR RANDOM WALKS WITH INTERNAL STATES COUPLING TIMES FOR RANDOM WALKS WITH INTERNAL STATES ELYSE AZORR, SAMUEL J. GHITELMAN, RALPH MORRISON, AND GREG RICE ADVISOR: YEVGENIY KOVCHEGOV OREGON STATE UNIVERSITY ABSTRACT. Using coupling techniques,

More information

Hermite Interpolation

Hermite Interpolation Jim Lambers MAT 77 Fall Semester 010-11 Lecture Notes These notes correspond to Sections 4 and 5 in the text Hermite Interpolation Suppose that the interpolation points are perturbed so that two neighboring

More information

Fourth Order Symmetric Finite Difference Schemes For The Wave Equation

Fourth Order Symmetric Finite Difference Schemes For The Wave Equation IT Licentiate theses 2-4 Fourth Order Symmetric Finite Difference Schemes For The Wave Equation ABRAHAM ZEMUI UPPSALA UNIVERSITY Department of Information Technology Fourth Order Symmetric Finite Difference

More information

The Normal Equations. For A R m n with m > n, A T A is singular if and only if A is rank-deficient. 1 Proof:

The Normal Equations. For A R m n with m > n, A T A is singular if and only if A is rank-deficient. 1 Proof: Applied Math 205 Homework 1 now posted. Due 5 PM on September 26. Last time: piecewise polynomial interpolation, least-squares fitting Today: least-squares, nonlinear least-squares The Normal Equations

More information

Math 578: Assignment 2

Math 578: Assignment 2 Math 578: Assignment 2 13. Determine whether the natural cubic spline that interpolates the table is or is not the x 0 1 2 3 y 1 1 0 10 function 1 + x x 3 x [0, 1] f(x) = 1 2(x 1) 3(x 1) 2 + 4(x 1) 3 x

More information

Interpolation and Approximation

Interpolation and Approximation Interpolation and Approximation The Basic Problem: Approximate a continuous function f(x), by a polynomial p(x), over [a, b]. f(x) may only be known in tabular form. f(x) may be expensive to compute. Definition:

More information

Numerical methods Revised March 2001

Numerical methods Revised March 2001 Revised March 00 By R. W. Riddaway (revised by M. Hortal) Table of contents. Some introductory ideas. Introduction. Classification of PDE's.3 Existence and uniqueness.4 Discretization.5 Convergence, consistency

More information

Lecture 4 September 15

Lecture 4 September 15 IFT 6269: Probabilistic Graphical Models Fall 2017 Lecture 4 September 15 Lecturer: Simon Lacoste-Julien Scribe: Philippe Brouillard & Tristan Deleu 4.1 Maximum Likelihood principle Given a parametric

More information

HANDOUT E.22 - EXAMPLES ON STABILITY ANALYSIS

HANDOUT E.22 - EXAMPLES ON STABILITY ANALYSIS Example 1 HANDOUT E. - EXAMPLES ON STABILITY ANALYSIS Determine the stability of the system whose characteristics equation given by 6 3 = s + s + 3s + s + s + s +. The above polynomial satisfies the necessary

More information

Iterative Methods and Multigrid

Iterative Methods and Multigrid Iterative Methods and Multigrid Part 1: Introduction to Multigrid 1 12/02/09 MG02.prz Error Smoothing 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 Initial Solution=-Error 0 10 20 30 40 50 60 70 80 90 100 DCT:

More information

Lecture XI. Approximating the Invariant Distribution

Lecture XI. Approximating the Invariant Distribution Lecture XI Approximating the Invariant Distribution Gianluca Violante New York University Quantitative Macroeconomics G. Violante, Invariant Distribution p. 1 /24 SS Equilibrium in the Aiyagari model G.

More information

Two special equations: Bessel s and Legendre s equations. p Fourier-Bessel and Fourier-Legendre series. p

Two special equations: Bessel s and Legendre s equations. p Fourier-Bessel and Fourier-Legendre series. p LECTURE 1 Table of Contents Two special equations: Bessel s and Legendre s equations. p. 259-268. Fourier-Bessel and Fourier-Legendre series. p. 453-460. Boundary value problems in other coordinate system.

More information

2008 Euclid Contest. Solutions. Canadian Mathematics Competition. Tuesday, April 15, c 2008 Centre for Education in Mathematics and Computing

2008 Euclid Contest. Solutions. Canadian Mathematics Competition. Tuesday, April 15, c 2008 Centre for Education in Mathematics and Computing Canadian Mathematics Competition An activity of the Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario 008 Euclid Contest Tuesday, April 5, 008 Solutions c 008

More information

Introduction to standard and non-standard Numerical Methods

Introduction to standard and non-standard Numerical Methods Introduction to standard and non-standard Numerical Methods Dr. Mountaga LAM AMS : African Mathematic School 2018 May 23, 2018 One-step methods Runge-Kutta Methods Nonstandard Finite Difference Scheme

More information

Lecture Notes 6: Dynamic Equations Part B: Second and Higher-Order Linear Difference Equations in One Variable

Lecture Notes 6: Dynamic Equations Part B: Second and Higher-Order Linear Difference Equations in One Variable University of Warwick, EC9A0 Maths for Economists Peter J. Hammond 1 of 56 Lecture Notes 6: Dynamic Equations Part B: Second and Higher-Order Linear Difference Equations in One Variable Peter J. Hammond

More information

Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m.

Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m. Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m. Candidates should submit answers to a maximum of four

More information

Non-polynomial Least-squares fitting

Non-polynomial Least-squares fitting Applied Math 205 Last time: piecewise polynomial interpolation, least-squares fitting Today: underdetermined least squares, nonlinear least squares Homework 1 (and subsequent homeworks) have several parts

More information

Lecture 10 Polynomial interpolation

Lecture 10 Polynomial interpolation Lecture 10 Polynomial interpolation Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn

More information

An introduction to Birkhoff normal form

An introduction to Birkhoff normal form An introduction to Birkhoff normal form Dario Bambusi Dipartimento di Matematica, Universitá di Milano via Saldini 50, 0133 Milano (Italy) 19.11.14 1 Introduction The aim of this note is to present an

More information

The Lattice Boltzmann method for hyperbolic systems. Benjamin Graille. October 19, 2016

The Lattice Boltzmann method for hyperbolic systems. Benjamin Graille. October 19, 2016 The Lattice Boltzmann method for hyperbolic systems Benjamin Graille October 19, 2016 Framework The Lattice Boltzmann method 1 Description of the lattice Boltzmann method Link with the kinetic theory Classical

More information

MTH301 Calculus II Glossary For Final Term Exam Preparation

MTH301 Calculus II Glossary For Final Term Exam Preparation MTH301 Calculus II Glossary For Final Term Exam Preparation Glossary Absolute maximum : The output value of the highest point on a graph over a given input interval or over all possible input values. An

More information

An Introduction to Algebraic Multigrid (AMG) Algorithms Derrick Cerwinsky and Craig C. Douglas 1/84

An Introduction to Algebraic Multigrid (AMG) Algorithms Derrick Cerwinsky and Craig C. Douglas 1/84 An Introduction to Algebraic Multigrid (AMG) Algorithms Derrick Cerwinsky and Craig C. Douglas 1/84 Introduction Almost all numerical methods for solving PDEs will at some point be reduced to solving A

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

Chapter 5. Numerical Methods: Finite Differences

Chapter 5. Numerical Methods: Finite Differences Chapter 5 Numerical Methods: Finite Differences As you know, the differential equations that can be solved by an explicit analytic formula are few and far between. Consequently, the development of accurate

More information

Abstract. 2. We construct several transcendental numbers.

Abstract. 2. We construct several transcendental numbers. Abstract. We prove Liouville s Theorem for the order of approximation by rationals of real algebraic numbers. 2. We construct several transcendental numbers. 3. We define Poissonian Behaviour, and study

More information

1 Lyapunov theory of stability

1 Lyapunov theory of stability M.Kawski, APM 581 Diff Equns Intro to Lyapunov theory. November 15, 29 1 1 Lyapunov theory of stability Introduction. Lyapunov s second (or direct) method provides tools for studying (asymptotic) stability

More information

Algebra 2 Honors Final Exam StudyGuide

Algebra 2 Honors Final Exam StudyGuide Name: Score: 0 / 80 points (0%) Algebra 2 Honors Final Exam StudyGuide Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Simplify. 2. D Multiply the numerator

More information

Lecture 7 and 8. Fall EE 105, Feedback Control Systems (Prof. Khan) September 30 and October 05, 2015

Lecture 7 and 8. Fall EE 105, Feedback Control Systems (Prof. Khan) September 30 and October 05, 2015 1 Lecture 7 and 8 Fall 2015 - EE 105, Feedback Control Systems (Prof Khan) September 30 and October 05, 2015 I CONTROLLABILITY OF AN DT-LTI SYSTEM IN k TIME-STEPS The DT-LTI system is given by the following

More information

Interpolation and the Lagrange Polynomial

Interpolation and the Lagrange Polynomial Interpolation and the Lagrange Polynomial MATH 375 J. Robert Buchanan Department of Mathematics Fall 2013 Introduction We often choose polynomials to approximate other classes of functions. Theorem (Weierstrass

More information

Math 121 Winter 2010 Review Sheet

Math 121 Winter 2010 Review Sheet Math 121 Winter 2010 Review Sheet March 14, 2010 This review sheet contains a number of problems covering the material that we went over after the third midterm exam. These problems (in conjunction with

More information