Math 5334: Homework 2 Solutions
|
|
- Harriet Flowers
- 5 years ago
- Views:
Transcription
1 Math 5334: Homework 2 Solutions Victoria E. Howle February 20, 2008 Problem 2.15 a. The condition number of golub(n) grows exponentially. x = []; y = []; % For golub matrices size n = 1 to 10, we will run 10 tests of % the condition number for each size n and average the results. for j = 1:10 for k = 1:10 x(k) = cond(golub(j)); end y(j) = mean(x); end % Plot the resulting condition numbers (on a log scale). semilogy(1:10, y); % The result looks exponential. We can see that condition number % grows approximately like 64^n hold on n = 1:0.1:10; semilogy(n,64.^n, : ); legend( cond(golub(n)), 64^n ); xlabel( n ) ylabel( log(cond(golub(n))) averaged over 10 tests ); title( HW2: Problem 2.15 ) Texas Tech University, Department of Mathematics & Statistics 1
2 b. We can see with lugui(golub(n)) that with diagonal pivoting (i.e., always using the diagonal element as the pivot, therefore, no pivoting) the pivots all turn out to be one. This makes the resulting L and U factors both have all ones on the diagonal. This is unusual behavior since we might expect large pivots with such a badly conditioned matrix. But note that bad pivots implies badly conditioner, but badly conditioned may or may not mean bad pivots. c. The determinant of a triangular matrix is equal to the product of its diagonal elements. For golub matrices, this means that det(l) = det(u) = 1 since they are triangular matrices with ones on the diagonal. And since the determinant of a product of matrices is equal to the product of the determinants, det(golub(n)) = 1. 2
3 Problem 2.19 The given system of equations in matrix form is: 2 1 x x x = x n x n n = 100; % (a) a = -1*ones(n-1,1); d = 2*ones(n,1); A = diag(a,-1) + diag(d) + diag(a,1); rhs = (1:n) ; % solve with lutx: [L,U,p] = lutx(a); % i.e., LUx = b(p) % so to solve we want x = U^{-1} L^{-1} b(p): x1 = U \ (L \ rhs(p)); % solve with bslashtx x2 = bslashtx(a,rhs); n 1 n % (b) % one simple form of the call to spdiags needs the vector a and b to be the % same length. So we will append an nth value -1 to the vector a: c = a; c(n) = -1; A = spdiags([c d c], [-1 0 1], n, n); x3 = A\rhs; % (c) x4 = tridisolve(a,d,a,rhs); % (d) cnum = condest(a); disp(sprintf( condest(a) = %e, cnum)); condest(a) = e+03 3
4 Problem 3.3 x = [ ] ; y = [ ] ; u = (-1:0.01:1) ; v1 = piecelin(x,y,u); v2 = polyinterp(x,y,u); v3 = splinetx(x,y,u); v4 = pchiptx(x,y,u); % plot the data points plot(x,y, o ) % plot the 4 interpolations on the same graph hold on plot(u,v1) plot(u,v2, r ) plot(u,v3, g ) plot(u,v4, k ) % label the four plots and label the graph legend( (x,y), piecelin, polyinterp, splinetx, pchiptx ) title( HW2, problem 3.3 ); xlabel( u ); ylabel( v = P(u) ); % evaluate each interpolant at x = -0.3 >> piecelin(x,y,-0.3) 4
5 ans = >> polyinterp(x,y,-0.3) ans = >> splinetx(x,y,-0.3) ans = >> pchiptx(x,y,-0.3) ans = I prefer the value at x = 0.3 given by pchiptx. The point x = 0.3 lies in the interval between x 3 = 0.65 and x 4 = 0.10, but the values of P ( 0.3) given by polyinterp and splinetx lie significantly below y 3 and y 4. In fact, the given y values of data are monotonically increasing with x. So we have no reason to suspect that the true function actually oscillates as polyinterp and splinetx do. That leaves pchiptx and piecewise linear, which give very similar answers for P ( 0.3). Since pchiptx also produces a smooth function, I prefer pchiptx for this data. To estimate the coefficients of the low-degree polynomial used to generate the date, we can try using a Vandermonde matrix. In general, it is a bad idea to compute using the Vandermonde matrix. But since cond(vander(x)) isn t too large ( 222), we will try it. format long c = vander(x)\y c = This is an inaccurate computation, so we will guess the actual coefficients to be these coefficients rounded to the nearest integer. That gives the polynomial: y = 16x 5 20x 3 + 5x 5
6 which appears again in problem 3.8 as the power form of the Chebyshev polynomial of degree five. We can check if our guess is right by evaluating this polynomial at the 6 given data points: testy = 16*x.^5-20*x.^3 + 5*x testy = which equals our given y data values to the four digits of accuracy given. Problem 3.4 The pchiptx interpolation seems to make a smoother, nicer looking, version of a hand. The splinetx version has some unrealistic looking sharp turns. For the same reasons, I d would think that the hand picture in the book was done with pchiptx. 6
7 Problem 3.7 Suppose we have two polynomials P (x) and Q(x) of degree less than n that agree at n distinct points. Let and P (x) = c 1 x n 1 + c 2 x n c n 1 x + c n Q(x) = a 1 x n 1 + a 2 x n a n 1 x + a n, where the coefficients c k and a k are not yet known. Then, if P and Q agree at n distinct points x k, k = 1,... n, we have n separate equations and P (x k ) = c 1 x n 1 k Q(x k ) = a 1 x n 1 k + c 2 x n 2 k + a 2 x n 2 k + + c n 1 x k + c n + + a n 1 x k + a n for k = 1,..., n. Since P (x k ) = Q(x k ), if we subtract each Q equation from each P equation, we get n equations (c 1 a 1 )x n 1 k + (c 2 a 2 )x n 2 k + + (c n 1 a n 1 )x k + (c n a n ) = 0. We can set up a Vandermonde matrix system to solve for the n unknown coefficients (c k a k ). (Vandermonde matrices are often not a good idea for computation, but they are very handy for analyzing properties of polynomials.) x n 1 1 x n 2 x n 1 2 x n 2. x n 1 n 1 x 2 1 x 1 1 c 1 a x 2 2 x 2 1 c 2 a = 0. x n 2 n x 2 n x n 1 c n a n 0 Vandermonde matrices are nonsingular for distinct x k values. Therefore, the only possible solution to this system is c k a k = 0 for each k = 1,..., n. That is, P (x) = Q(x). (There are other possible proofs; this is just one.) Problem 3.8 See prob3 8.m for the Matlab code. All six representations are plotted here. We can see that they represent the same function since the plots are identical. 7
8 Problem 3.13 The only thing we are changing in this problem is which boundary conditions are used in forming d 1 and d n in pchip and spline. perpchip In pchiptx.m, the internal d values are determined with a particular formula: If δ k 1 and δ k have opposite signs (i.e., we are at a local max or min): d k = 0 Otherwise, we use the formula: w 1 = 2h k + h k 1 w 2 = h k + 2h k 1 d k = w 1+w 2 w 1 + w 2 δ k 1 δ k We now use this same formula for d 1 and d n, taking advantage of the periodicity assumptions δ k = δ k+n 1, etc. That is, for d 1, Check if δ 0 and δ 1 have opposite signs. We don t actually have δ 0, but periodicity tells us that δ 0 = δ n 1, which we do have. So we check if δ n 1 and δ 1 have opposite signs. If they do, then: d 1 = 0 8
9 and by periodicity, we also set d n = d 1 Otherwise, we use the formula (using k = 1): w 1 = 2h 1 + h 0 w 2 = h 1 + 2h 0 d 1 = w 1+w 2 w 1 + w 2 δ 0 δ 1 where again by periodicity, this becomes: w 1 = 2h 1 + h n 1 w 2 = h 1 + 2h n 1 d 1 = w 1+w 2 w 1 + w 2 δ n 1 δ 1 See perpchip vh.m for a Matlab implementation. perspline In splinetx.m, the internal d values are determined with the formula: h k d k 1 + 2(h k 1 + h k )d k + h k 1 d k+1 = 3(h k δ k 1 + h k 1 δ k ). This is a formula for the kth row of a matrix system Ad = r which we then solve for the internal d values. For periodic boundary conditions, we use this same formula (plus our periodicity assumptions) for d 1 and d 1. In particular, for k = 1 h 1 d 0 + 2(h 0 + h 1 )d 1 + h 0 d 2 = 3(h 1 δ 0 + h 0 δ 1 ). We again use our periodicity assumptions to replace the values (such as h 0 and δ 0 ) that we do not have. This gives us: h 1 d n 1 + 2(h n 1 + h 1 )d 1 + h n 1 d 2 = 3(h 1 δ n 1 + h n 1 δ 1 ). We can do the same process with the nth equation giving: h n d n 1 + 2(h n 1 + h n )d n + h n 1 d 2 = 3(h n δ n 1 + h n 1 δ n ). where we have also used the periodicity assumption to see that d n+1 = d 2. See perspline vh.m for a Matlab implementation of these BCs. x = 0:pi/4:2*pi; x = x ; % using column vectors y = cos(x); 9
10 u = 0:pi/50:2*pi; u = u ; v1 = perpchip_vh(x,y,u); v2 = perspline_vh(x,y,u); plot(x,y, o ) hold on plot(u,v1) plot(u,v2, r ) legend( data, perpchip\_vh, perspline\_vh ) title( HW2, problem 3.13 ) xlabel( u ) ylabel( v = P(u) ) In the following two figures from interp2gui we can see that the nonperiodic versions of pchip and spline have more trouble with overshooting when used for 2d closed-curve interpolation. 10
11 Problem 3.18 The Vandermonde matrix for the given t values is extremely badly conditioned: t = 1900:10:2000; V = vander(t); cond(v) 11
12 ans = e+48 Yikes. This is not a matrix we would want to use in a linear solve. We would expect the answer (from backslash or any other solver) to be all error. We can get a much better behaved polynomial with centering and scaling. For example, the next two figures show a cubic polynomial fit (not interpolating) to the original data, then the polynomial we get after centering and scaling. 12
13 We see even more extreme differences if we look at the degree 10 polynomials without, then with, centering and scaling: Matlab s centering and scaling is using the change of variable described in (c). To get the coefficients of Q(s) in terms of those of P (t), let s look at a smaller degree problem (say a degree 3 polynomial). P (t) = c 1 t 3 + c 2 t 2 + c 3 t + c 4 13
14 and Q(s) = a 1 t 3 + a 2 t 2 + a 3 t + a 4 = a 1 ( t µ σ )3 + a 2 ( t µ σ )2 + a 3 ( t µ σ ) + a 4 = ( a 1 σ 3 )t3 + ( 3a 1µ σ 3 + a 2 σ 2 )t2 + ( 3a 1µ 2 σ 3 2a 2µ σ 2 + a 3 σ )t + ( a 1µ 3 σ 3 + a 2µ 2 σ 2 a 3µ σ + a 4) giving us c 1 = a 1 σ 3 c 2 = 3a 1µ σ 3 + a 2 σ 2 c 3 = 3a 1µ 2 σ 3 2a 2µ σ 2 + a 3 σ c 4 = a 1µ 3 σ 3 + a 2µ 2 σ 2 a 3µ σ + a 4 We could do the same thing with degree 10. That would be a job for Mathematica or the Matlab symbolic toolbox (I don t have either). The transformation to s = t µ σ makes a substantial difference in the condition number of the Vandermonde matrix: t = 1900:10:2000; mu = mean(t) mu = 1950 sigma = std(t) sigma = s = (t - mu)/sigma; cond(vander(t)) ans = e+48 cond(vander(s)) ans = e+04 This is much more promising condition number. It is not necessarily the best we can do. If we take other values around this σ value, we can get a lower condition number. For example if we let sigtest take on values around σ we can get a smaller condition number. 14
15 sigest = 10:1:50; cc = []; for k = 1:41 cc(k) = cond(vander((t - mu)/sigest(k))); end min(cc) e+04 which is a smaller condition number than we got with the given σ and µ. But they are reasonable choices and lead to a much better conditioned Vandermonde matrix. 15
3.1 Interpolation and the Lagrange Polynomial
MATH 4073 Chapter 3 Interpolation and Polynomial Approximation Fall 2003 1 Consider a sample x x 0 x 1 x n y y 0 y 1 y n. Can we get a function out of discrete data above that gives a reasonable estimate
More informationMath 502 Fall 2005 Solutions to Homework 3
Math 502 Fall 2005 Solutions to Homework 3 (1) As shown in class, the relative distance between adjacent binary floating points numbers is 2 1 t, where t is the number of digits in the mantissa. Since
More informationAssignment 6, Math 575A
Assignment 6, Math 575A Part I Matlab Section: MATLAB has special functions to deal with polynomials. Using these commands is usually recommended, since they make the code easier to write and understand
More informationCHAPTER 4. Interpolation
CHAPTER 4 Interpolation 4.1. Introduction We will cover sections 4.1 through 4.12 in the book. Read section 4.1 in the book on your own. The basic problem of one-dimensional interpolation is this: Given
More informationMTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)
MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018) COURSEWORK 3 SOLUTIONS Exercise ( ) 1. (a) Write A = (a ij ) n n and B = (b ij ) n n. Since A and B are diagonal, we have a ij = 0 and
More informationPolynomial and Synthetic Division
Polynomial and Synthetic Division Polynomial Division Polynomial Division is very similar to long division. Example: 3x 3 5x 3x 10x 1 3 Polynomial Division 3x 1 x 3x 3 3 x 5x 3x x 6x 4 10x 10x 7 3 x 1
More informationLectures 9-10: Polynomial and piecewise polynomial interpolation
Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j
More information2 Systems of Linear Equations
2 Systems of Linear Equations A system of equations of the form or is called a system of linear equations. x + 2y = 7 2x y = 4 5p 6q + r = 4 2p + 3q 5r = 7 6p q + 4r = 2 Definition. An equation involving
More informationMath 308 Midterm Answers and Comments July 18, Part A. Short answer questions
Math 308 Midterm Answers and Comments July 18, 2011 Part A. Short answer questions (1) Compute the determinant of the matrix a 3 3 1 1 2. 1 a 3 The determinant is 2a 2 12. Comments: Everyone seemed to
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 informationRiemann Integration. James K. Peterson. February 2, Department of Biological Sciences and Department of Mathematical Sciences Clemson University
Riemann Integration James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University February 2, 2017 Outline 1 Riemann Sums 2 Riemann Sums In MatLab 3 Graphing
More informationScientific Computing: Dense Linear Systems
Scientific Computing: Dense Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 February 9th, 2012 A. Donev (Courant Institute)
More informationVector Spaces. 9.1 Opening Remarks. Week Solvable or not solvable, that s the question. View at edx. Consider the picture
Week9 Vector Spaces 9. Opening Remarks 9.. Solvable or not solvable, that s the question Consider the picture (,) (,) p(χ) = γ + γ χ + γ χ (, ) depicting three points in R and a quadratic polynomial (polynomial
More informationPolynomials. p n (x) = a n x n + a n 1 x n 1 + a 1 x + a 0, where
Polynomials Polynomials Evaluation of polynomials involve only arithmetic operations, which can be done on today s digital computers. We consider polynomials with real coefficients and real variable. p
More informationMath Matrix Theory - Spring 2012
Math 440 - Matrix Theory - Spring 202 HW #2 Solutions Which of the following are true? Why? If not true, give an example to show that If true, give your reasoning (a) Inverse of an elementary matrix is
More informationSTEP Support Programme. Hints and Partial Solutions for Assignment 17
STEP Support Programme Hints and Partial Solutions for Assignment 7 Warm-up You need to be quite careful with these proofs to ensure that you are not assuming something that should not be assumed. For
More informationCS 323: Numerical Analysis and Computing
CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.
More informationLesson 7.1 Polynomial Degree and Finite Differences
Lesson 7.1 Polynomial Degree and Finite Differences 1. Identify the degree of each polynomial. a. 3x 4 2x 3 3x 2 x 7 b. x 1 c. 0.2x 1.x 2 3.2x 3 d. 20 16x 2 20x e. x x 2 x 3 x 4 x f. x 2 6x 2x 6 3x 4 8
More informationRiemann Integration. Outline. James K. Peterson. February 2, Riemann Sums. Riemann Sums In MatLab. Graphing Riemann Sums
Riemann Integration James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University February 2, 2017 Outline Riemann Sums Riemann Sums In MatLab Graphing
More informationEmpirical Models Interpolation Polynomial Models
Mathematical Modeling Lia Vas Empirical Models Interpolation Polynomial Models Lagrange Polynomial. Recall that two points (x 1, y 1 ) and (x 2, y 2 ) determine a unique line y = ax + b passing them (obtained
More informationAP Calculus Chapter 9: Infinite Series
AP Calculus Chapter 9: Infinite Series 9. Sequences a, a 2, a 3, a 4, a 5,... Sequence: A function whose domain is the set of positive integers n = 2 3 4 a n = a a 2 a 3 a 4 terms of the sequence Begin
More informationChapter 7 Statistics, Probability, and Interpolation
PowerPoint to accompany Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 7 Statistics, Probability, and Interpolation Copyright 2010. The McGraw-Hill Companies, Inc. This
More information18.06 Problem Set 1 - Solutions Due Wednesday, 12 September 2007 at 4 pm in
18.6 Problem Set 1 - Solutions Due Wednesday, 12 September 27 at 4 pm in 2-16. Problem : from the book.(5=1+1+1+1+1) (a) problem set 1.2, problem 8. (a) F. A Counterexample: u = (1,, ), v = (, 1, ) and
More informationThe Leslie Matrix Part II
The Leslie Matrix Part II Math 45 Linear Algebra David Arnold and Kevin Yokoyama David-Arnold@Eurekaredwoodscccaus Abstract The Leslie Model is a powerful tool used to determine the growth of a population
More informationChapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.
MATH 434/534 Theoretical Assignment 3 Solution Chapter 4 No 40 Answer True or False to the following Give reasons for your answers If a backward stable algorithm is applied to a computational problem,
More information8.7 MacLaurin Polynomials
8.7 maclaurin polynomials 67 8.7 MacLaurin Polynomials In this chapter you have learned to find antiderivatives of a wide variety of elementary functions, but many more such functions fail to have an antiderivative
More informationChapter Five Notes N P U2C5
Chapter Five Notes N P UC5 Name Period Section 5.: Linear and Quadratic Functions with Modeling In every math class you have had since algebra you have worked with equations. Most of those equations have
More informationLab 2: Static Response, Cantilevered Beam
Contents 1 Lab 2: Static Response, Cantilevered Beam 3 1.1 Objectives.......................................... 3 1.2 Scalars, Vectors and Matrices (Allen Downey)...................... 3 1.2.1 Attribution.....................................
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 informationMath 2142 Homework 5 Part 1 Solutions
Math 2142 Homework 5 Part 1 Solutions Problem 1. For the following homogeneous second order differential equations, give the general solution and the particular solution satisfying the given initial conditions.
More informationAllows us to work with very large or small numbers more easily. All numbers are a product of 10.
Unit 1: Measurements Scientific Notation : Allows us to work with very large or small numbers more easily. All numbers are a product of 10. M x 10n M= signif. digit [ 1 < M < 10 ] n = an integer move the
More informationError, Accuracy and Convergence
Error, Accuracy and Convergence Error in Numerical Methods i Every result we compute in Numerical Methods is inaccurate. What is our model of that error? Approximate Result = True Value + Error. x = x
More informationIf you need the source code from the sample solutions, copy and paste from the PDF should work. If you re having trouble, send me an .
AM117 Sample Solutions, HW#1 Hi, I m Andreas Kloeckner, your grader for this course. Feel free to email me at kloeckner@dam.brown.edu. The code for the sample solutions is written so that it will run in
More informationMATH 310, REVIEW SHEET 2
MATH 310, REVIEW SHEET 2 These notes are a very short summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive,
More informationTake the Anxiety Out of Word Problems
Take the Anxiety Out of Word Problems I find that students fear any problem that has words in it. This does not have to be the case. In this chapter, we will practice a strategy for approaching word problems
More informationMath 515 Fall, 2008 Homework 2, due Friday, September 26.
Math 515 Fall, 2008 Homework 2, due Friday, September 26 In this assignment you will write efficient MATLAB codes to solve least squares problems involving block structured matrices known as Kronecker
More information12.1 Arithmetic Progression Geometric Progression General things about sequences
ENGR11 Engineering Mathematics Lecture Notes SMS, Victoria University of Wellington Week Five. 1.1 Arithmetic Progression An arithmetic progression is a sequence where each term is found by adding a fixed
More informationInterpolation and extrapolation
Interpolation and extrapolation Alexander Khanov PHYS6260: Experimental Methods is HEP Oklahoma State University October 30, 207 Interpolation/extrapolation vs fitting Formulation of the problem: there
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 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 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 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 informationFunction approximation
Week 9: Monday, Mar 26 Function approximation A common task in scientific computing is to approximate a function. The approximated function might be available only through tabulated data, or it may be
More informationMath Numerical Analysis Mid-Term Test Solutions
Math 400 - Numerical Analysis Mid-Term Test Solutions. Short Answers (a) A sufficient and necessary condition for the bisection method to find a root of f(x) on the interval [a,b] is f(a)f(b) < 0 or f(a)
More information22A-2 SUMMER 2014 LECTURE 5
A- SUMMER 0 LECTURE 5 NATHANIEL GALLUP Agenda Elimination to the identity matrix Inverse matrices LU factorization Elimination to the identity matrix Previously, we have used elimination to get a system
More informationBindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 6: Monday, Mar 7. e k+1 = 1 f (ξ k ) 2 f (x k ) e2 k.
Problem du jour Week 6: Monday, Mar 7 Show that for any initial guess x 0 > 0, Newton iteration on f(x) = x 2 a produces a decreasing sequence x 1 x 2... x n a. What is the rate of convergence if a = 0?
More informationStatistical methods. Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra
Statistical methods Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra Statistical methods Generating random numbers MATLAB has many built-in functions
More informationECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /8:00-9:30
ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION 2007-10-23/8:00-9:30 The examination is out of 67 marks. Instructions: No aides. Write your name and student ID number on each booklet.
More informationSection 3.1 Quadratic Functions
Chapter 3 Lecture Notes Page 1 of 72 Section 3.1 Quadratic Functions Objectives: Compare two different forms of writing a quadratic function Find the equation of a quadratic function (given points) Application
More informationCaculus 221. Possible questions for Exam II. March 19, 2002
Caculus 221 Possible questions for Exam II March 19, 2002 These notes cover the recent material in a style more like the lecture than the book. The proofs in the book are in section 1-11. At the end there
More informationThe degree of the polynomial function is n. We call the term the leading term, and is called the leading coefficient. 0 =
Math 1310 A polynomial function is a function of the form = + + +...+ + where 0,,,, are real numbers and n is a whole number. The degree of the polynomial function is n. We call the term the leading term,
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 informationFinding Limits Graphically and Numerically
Finding Limits Graphically and Numerically 1. Welcome to finding limits graphically and numerically. My name is Tuesday Johnson and I m a lecturer at the University of Texas El Paso. 2. With each lecture
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 informationNumerical Methods I Solving Square Linear Systems: GEM and LU factorization
Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 18th,
More informationOutline. 1 Interpolation. 2 Polynomial Interpolation. 3 Piecewise Polynomial Interpolation
Outline Interpolation 1 Interpolation 2 3 Michael T. Heath Scientific Computing 2 / 56 Interpolation Motivation Choosing Interpolant Existence and Uniqueness Basic interpolation problem: for given data
More informationNumerical Methods of Approximation
Contents 31 Numerical Methods of Approximation 31.1 Polynomial Approximations 2 31.2 Numerical Integration 28 31.3 Numerical Differentiation 58 31.4 Nonlinear Equations 67 Learning outcomes In this Workbook
More information6 EIGENVALUES AND EIGENVECTORS
6 EIGENVALUES AND EIGENVECTORS INTRODUCTION TO EIGENVALUES 61 Linear equations Ax = b come from steady state problems Eigenvalues have their greatest importance in dynamic problems The solution of du/dt
More informationChapter 9: Roots and Irrational Numbers
Chapter 9: Roots and Irrational Numbers Index: A: Square Roots B: Irrational Numbers C: Square Root Functions & Shifting D: Finding Zeros by Completing the Square E: The Quadratic Formula F: Quadratic
More informationNew Mexico Tech Hyd 510
Vectors vector - has magnitude and direction (e.g. velocity, specific discharge, hydraulic gradient) scalar - has magnitude only (e.g. porosity, specific yield, storage coefficient) unit vector - a unit
More informationSecondary Math 2H Unit 3 Notes: Factoring and Solving Quadratics
Secondary Math H Unit 3 Notes: Factoring and Solving Quadratics 3.1 Factoring out the Greatest Common Factor (GCF) Factoring: The reverse of multiplying. It means figuring out what you would multiply together
More informationApplied Linear Algebra in Geoscience Using MATLAB
Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in
More informationThe answer in each case is the error in evaluating the taylor series for ln(1 x) for x = which is 6.9.
Brad Nelson Math 26 Homework #2 /23/2. a MATLAB outputs: >> a=(+3.4e-6)-.e-6;a- ans = 4.449e-6 >> a=+(3.4e-6-.e-6);a- ans = 2.224e-6 And the exact answer for both operations is 2.3e-6. The reason why way
More informationLecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University
Lecture Note 3: Interpolation and Polynomial Approximation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 10, 2015 2 Contents 1.1 Introduction................................ 3 1.1.1
More informationWarm-up Simple methods Linear recurrences. Solving recurrences. Misha Lavrov. ARML Practice 2/2/2014
Solving recurrences Misha Lavrov ARML Practice 2/2/2014 Warm-up / Review 1 Compute 100 k=2 ( 1 1 ) ( = 1 1 ) ( 1 1 ) ( 1 1 ). k 2 3 100 2 Compute 100 k=2 ( 1 1 ) k 2. Homework: find and solve problem Algebra
More informationMath/CS 466/666: Homework Solutions for Chapter 3
Math/CS 466/666: Homework Solutions for Chapter 3 31 Can all matrices A R n n be factored A LU? Why or why not? Consider the matrix A ] 0 1 1 0 Claim that this matrix can not be factored A LU For contradiction,
More informationLinear Algebra Using MATLAB
Linear Algebra Using MATLAB MATH 5331 1 May 12, 2010 1 Selected material from the text Linear Algebra and Differential Equations Using MATLAB by Martin Golubitsky and Michael Dellnitz Contents 1 Preliminaries
More informationChapter 2 - Linear Equations
Chapter 2 - Linear Equations 2. Solving Linear Equations One of the most common problems in scientific computing is the solution of linear equations. It is a problem in its own right, but it also occurs
More informationACM106a - Homework 2 Solutions
ACM06a - Homework 2 Solutions prepared by Svitlana Vyetrenko October 7, 2006. Chapter 2, problem 2.2 (solution adapted from Golub, Van Loan, pp.52-54): For the proof we will use the fact that if A C m
More informationInterpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter
Key References: Interpolation 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter 6. 2. Press, W. et. al. Numerical Recipes in C, Cambridge: Cambridge University Press. Chapter 3
More informationReteach Simplifying Algebraic Expressions
1-4 Simplifying Algebraic Expressions To evaluate an algebraic expression you substitute numbers for variables. Then follow the order of operations. Here is a sentence that can help you remember the order
More informationMATH 552 Spectral Methods Spring Homework Set 5 - SOLUTIONS
MATH 55 Spectral Methods Spring 9 Homework Set 5 - SOLUTIONS. Suppose you are given an n n linear system Ax = f where the matrix A is tridiagonal b c a b c. A =.........,. a n b n c n a n b n with x =
More informationA-2. Polynomials and Factoring. Section A-2 1
A- Polynomials and Factoring Section A- 1 What you ll learn about Adding, Subtracting, and Multiplying Polynomials Special Products Factoring Polynomials Using Special Products Factoring Trinomials Factoring
More informationLecture Note 3: Polynomial Interpolation. Xiaoqun Zhang Shanghai Jiao Tong University
Lecture Note 3: Polynomial Interpolation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 24, 2013 1.1 Introduction We first look at some examples. Lookup table for f(x) = 2 π x 0 e x2
More informationExtra Problems for Math 2050 Linear Algebra I
Extra Problems for Math 5 Linear Algebra I Find the vector AB and illustrate with a picture if A = (,) and B = (,4) Find B, given A = (,4) and [ AB = A = (,4) and [ AB = 8 If possible, express x = 7 as
More informationHoles in a function. Even though the function does not exist at that point, the limit can still obtain that value.
Holes in a function For rational functions, factor both the numerator and the denominator. If they have a common factor, you can cancel the factor and a zero will exist at that x value. Even though the
More informationMath Lecture 26 : The Properties of Determinants
Math 2270 - Lecture 26 : The Properties of Determinants Dylan Zwick Fall 202 The lecture covers section 5. from the textbook. The determinant of a square matrix is a number that tells you quite a bit about
More informationHW #3 Solutions: M552 Spring (c)
HW #3 Solutions: M55 Spring 6. (4.-Trefethen & Bau: parts (a), (c) and (e)) Determine the SVDs of the following matrices (by hand calculation): (a) [ 3 (c) (e) [ ANS: In each case we seek A UΣV. The general
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 information8.5 Taylor Polynomials and Taylor Series
8.5. TAYLOR POLYNOMIALS AND TAYLOR SERIES 50 8.5 Taylor Polynomials and Taylor Series Motivating Questions In this section, we strive to understand the ideas generated by the following important questions:
More informationEigenvalues by row operations
Eigenvalues by row operations Barton L. Willis Department of Mathematics University of Nebraska at Kearney Kearney, Nebraska 68849 May, 5 Introduction There is a wonderful article, Down with Determinants!,
More informationCubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines
Cubic Splines MATH 375 J. Robert Buchanan Department of Mathematics Fall 2006 Introduction Given data {(x 0, f(x 0 )), (x 1, f(x 1 )),...,(x n, f(x n ))} which we wish to interpolate using a polynomial...
More informationChapter 3: Polynomial and Rational Functions
Chapter 3: Polynomial and Rational Functions 3.1 Polynomial Functions and Their Graphs A polynomial function of degree n is a function of the form P (x) = a n x n + a n 1 x n 1 + + a 1 x + a 0 The numbers
More informationLecture 9: Elementary Matrices
Lecture 9: Elementary Matrices Review of Row Reduced Echelon Form Consider the matrix A and the vector b defined as follows: 1 2 1 A b 3 8 5 A common technique to solve linear equations of the form Ax
More information1 Introduction. 2 Solving Linear Equations
1 Introduction This essay introduces some new sets of numbers. Up to now, the only sets of numbers (algebraic systems) we know is the set Z of integers with the two operations + and and the system R of
More informationTopics Covered in Math 115
Topics Covered in Math 115 Basic Concepts Integer Exponents Use bases and exponents. Evaluate exponential expressions. Apply the product, quotient, and power rules. Polynomial Expressions Perform addition
More informationPiecewise Polynomial Interpolation
Piecewise Polynomial Interpolation 1 Piecewise linear interpolation Suppose we have data point (x k,y k ), k =0, 1,...N. A piecewise linear polynomial that interpolates these points is given by p(x) =p
More informationDivide and Conquer. Maximum/minimum. Median finding. CS125 Lecture 4 Fall 2016
CS125 Lecture 4 Fall 2016 Divide and Conquer We have seen one general paradigm for finding algorithms: the greedy approach. We now consider another general paradigm, known as divide and conquer. We have
More informationMath 320, spring 2011 before the first midterm
Math 320, spring 2011 before the first midterm Typical Exam Problems 1 Consider the linear system of equations 2x 1 + 3x 2 2x 3 + x 4 = y 1 x 1 + 3x 2 2x 3 + 2x 4 = y 2 x 1 + 2x 3 x 4 = y 3 where x 1,,
More information6 Linear Systems of Equations
6 Linear Systems of Equations Read sections 2.1 2.3, 2.4.1 2.4.5, 2.4.7, 2.7 Review questions 2.1 2.37, 2.43 2.67 6.1 Introduction When numerically solving two-point boundary value problems, the differential
More informationSolving Consistent Linear Systems
Solving Consistent Linear Systems Matrix Notation An augmented matrix of a system consists of the coefficient matrix with an added column containing the constants from the right sides of the equations.
More information1 Introduction. 2 Solving Linear Equations. Charlotte Teacher Institute, Modular Arithmetic
1 Introduction This essay introduces some new sets of numbers. Up to now, the only sets of numbers (algebraic systems) we know is the set Z of integers with the two operations + and and the system R of
More informationCourse Number 432/433 Title Algebra II (A & B) H Grade # of Days 120
Whitman-Hanson Regional High School provides all students with a high- quality education in order to develop reflective, concerned citizens and contributing members of the global community. Course Number
More informationMath 1310 Section 4.1: Polynomial Functions and Their Graphs. A polynomial function is a function of the form ...
Math 1310 Section 4.1: Polynomial Functions and Their Graphs A polynomial function is a function of the form... where 0,,,, are real numbers and n is a whole number. The degree of the polynomial function
More informationMath 138: Introduction to solving systems of equations with matrices. The Concept of Balance for Systems of Equations
Math 138: Introduction to solving systems of equations with matrices. Pedagogy focus: Concept of equation balance, integer arithmetic, quadratic equations. The Concept of Balance for Systems of Equations
More informationENED 1091 HW#3 Due Week of February 22 nd
ENED 1091 HW#3 Due Week of February 22 nd Problem 1: The graph below shows position measurements (in cm) collected every 0.5 seconds over a 10 second interval of time. (a) Using linear interpolation, estimate
More informationExample 1 Which of these functions are polynomials in x? In the case(s) where f is a polynomial,
1. Polynomials A polynomial in x is a function of the form p(x) = a 0 + a 1 x + a 2 x 2 +... a n x n (a n 0, n a non-negative integer) where a 0, a 1, a 2,..., a n are constants. We say that this polynomial
More informationClass notes: Approximation
Class notes: Approximation Introduction Vector spaces, linear independence, subspace The goal of Numerical Analysis is to compute approximations We want to approximate eg numbers in R or C vectors in R
More information* 8 Groups, with Appendix containing Rings and Fields.
* 8 Groups, with Appendix containing Rings and Fields Binary Operations Definition We say that is a binary operation on a set S if, and only if, a, b, a b S Implicit in this definition is the idea that
More informationDylan Zwick. Fall Ax=b. EAx=Eb. UxrrrEb
Math 2270 - Lecture 0: LU Factorization Dylan Zwick Fall 202 This lecture covers section 2.6 of the textbook. The Matrices L and U In elimination what we do is we take a system of equations and convert
More information