Problem ) Sample implementation of chaos.m

Size: px
Start display at page:

Download "Problem ) Sample implementation of chaos.m"

Transcription

1 PHYS 2: Intro. Computational Physics Fall 22 Homework 3 Key Note: The same observation made in the key to Homework 2 obviously applies here: there will always be many ways to solve problems that involve programming. Once more, the solutions given below are representative but generally constructed to do the job as directly as possible. Problem.) Sample implementation of chaos.m function [x y] = chaos(nsteps) Plays nsteps of the chaos game as described in the problem handout Input argument nsteps: (integer scalar) Number of steps to play. Return values x: (real vector) Vector of length nsteps + 4 containing x coords of all points generated in game as defined in problem handout. y: (real vector) Vector of length nsteps + 4 containing y coords of all points generated in game as defined in problem handout. Initialize vectors to proper size using zeros for efficiency x = zeros(, nsteps+4); y = zeros(, nsteps+4); Intialize vertices of triangle x() = cos(pi/2); y() = sin(pi/2); x(2) = cos(7*pi/6); y(2) = sin(7*pi/6); x(3) = cos(*pi/6); y(3) = sin(*pi/6); First active point is chosen randomly on circle of radius.25 theta = 2*pi*rand; x(4) =.25 * cos(theta); y(4) =.25 * sin(theta); Play nsteps of the game for istep = 5 : nsteps+4 Generate a random number from to 3 n = fix( + 3 * rand); Bisect coordinates of previous point and vertex to generate coordinates of new point x(istep) =.5 * (x(n) + x(istep-)); y(istep) =.5 * (y(n) + y(istep-));

2 .2) Plots produced by tchaos.m Chaos Game: nsteps = Chaos Game: nsteps = Chaos Game: nsteps = Figure : Plots of output of chaos for nsteps = (top left), nsteps = (top right), and nsteps = (bottom left). The pattern that emerges is known as the Sierpinski gasket, (also Sierpinski triangle, Sierpinski sieve) and is an example of a fractal i.e. in the limit nsteps the portion of the real plane covered by the pattern will have an non-integer dimension. 2

3 Problem 2 2.) Sample implementation of fdas.m function [x df db dc ddc] = fdas(fcn, xmin, xmax, level) Computes various approximations to first and second derivative of fcn on uniform uniform mesh x = linspace(xmin, xmax, 2^level+) as described in problem handout. Input arguments fcn: (function handle) Handle for function whose derivative is to be approximated. xmin: (real scalar) Minimum coordinate of computational domain. xmax: (real scalar) Maximum coordinate of computational domain. level: (integer scalar) Discretization level. Return values (all real vectors of length nx) x: x coordinates of grid. df: O(h) forward FDA of d(fcn)/deltax db: O(h) backward FDA of d(fcn)/deltax dc: O(h^2) centred FDA of d(fcn)/deltax ddc: O(h^2) centred FDA of d^2(fcn)/deltax^2 Enables/disables local tracing trace = ; if trace fprintf( fdas: Argument dump follows\n ); fcn, xmin, xmax, level err = ; Define -length defaults for output vectors/matrices x = zeros(,); df = zeros(,); db = zeros(,); dc = zeros(,); ddc = zeros(,); Check arguments for validity if xmin >= xmax fprintf( xmin must be <= xmax\n ); err = ; if level ~= fix(level) fprintf( level is not an integer\n ); err = ; else if level < 2 fprintf( level must be >= 2\n ); err = ; Bail out if there were any errors in the arguments if err return Define base number of mesh points, mesh coordinates and mesh spacing nx = 2^level + ; x = linspace(xmin, xmax, nx); deltax = x(2) - x(); 3

4 Add extra values to enable evaluation of FDAs at x = xmin and x = xmax x = [(x() - deltax) x (x(nx) + deltax)]; Evaluate function on mesh: this assumes that fcn will act on a vector argument element-by-element, returning a vector of the same length (which all of the MATLAB/octave built in math functions do) f = fcn(x); Compute FDAs: Note use of whole-array operations. A version using loops is also straightforward to implement. df = (f(3:nx+2) - f(2:nx+)) / deltax; db = (f(2:nx+) - f(:nx)) / deltax; dc = (f(3:nx+2) - f(:nx)) / (2 * deltax); ddc = (f(3:nx+2) - 2 * f(2:nx+) + f(:nx)) / (deltax^2); Delete extra x values x() = []; x(nx+) = []; 4

5 2.2) Plots produced by tfdas.m f(x) = sin(x): nx = 65.2 f(x) = sin(x): nx = 65 Error of O(h) forward FDA Error of O(h) backward FDA Error of O(h 2 ) centred FDA Exact st derivative O(h) forward FDA O(h) backward FDA O(h 2 ) centred FDA x x f(x) = sin(x): nx = 65 Exact 2nd derivative O(h 2 ) centred FDA f(x) = sin(x): nx = x Error of O(h 2 ) centred FDA Figure 2: Plots of various finite difference approximations and associated approximation errors of the first and second derivatives of sin(x) for x 5π/2. All calculations performed at level = 6, i.e. with = 65 grid points. Top left: O(h) forward/backward and O(h 2 ) centred approximations of d(sin(x))/dx, along with exact values cos(x). Top right: Errors in approximations of first derivative. Bottom left: O(h 2 ) centred approximation of d 2 (sin(x))/dx 2 along with exact values sin(x). Bottom right: Errors in approximation of second derivative. 5

6 2.3) Additional output generated by tfdas.m Scaled RMS errors for O(h) forward FDA of d/dx Level Scaled Error e e e-2 2.7e-2 2.7e e e e e-2 Scaled RMS errors for O(h) backward FDA of d/dx Level Scaled Error e e e e e e e e e-2 Scaled RMS errors for O(h^2) centred FDA of d/dx Level Scaled Error e e e e e e e e e-4 Scaled RMS errors for O(h^2) centred FDA of d^2/dx^2 Level Scaled Error e e e e e e e e e-4 2.4) Discussion First, we observe that, as you can verify by examining tfdas.m, the scaled RMS errors, e l 2 generated by the driver script are computed as follows for a given level of discretization, l: e l 2 (2 p ) l lmin ( d exact d l). () Here d exact is the exact derivative evaluated on the level-l grid, d l is the calculated approximation of the derivative, p is the order of the approximation (p = and p = 2 for the first- and second-order approximations respectively), l min is the minimum discretization level used in the convergence test, and the RMS value (or l 2 norm) of an n-component vector, v, is given by n j= v 2 (v i) 2. (2) n As should also be clear from the driver script (as well as the plots above), the driver script used sin(x) as the testing function, and l min = 7. Second, we note that for the most part the RMS values of the scaled errors are approximately constant for each of the four approximations, and generally become more constant as l increases: this provides strong evidence that the approximations are all converging at the appropriate rates (i.e. either first or second order in the mesh spacing). Third, as hinted at in the problem handout, the output from the convergence test of the O(h 2 ) approximation of the second derivative appears anomalous, and you were asked to try to come up with an explanation of the observed behaviour. Given that we haven t discussed the subtleties of finite-precision floating point arithmetic in class, I felt that this would be a relatively challenging (and not entirely fair!) task for you, and thus it is only worth one mark. To get a better sense of what is causing the deterioration of convergence for large l, it is very useful to look directly at the individual function values that are involved in the approximation of the second derivative: f (x) f(x + h) 2f(x) + f(x h) h 2 (3) for a specific value of x and for a large range of discretization scales, including l 5 6

7 To that, consider the following octave code: a2/tcfdd.m Calculations demonstrating phenomenon of "catastrophic loss of precision" that results in the deterioration of convergence in the O(h^2) FD approximation of second derivative (and, indeed, for ANY FD approximation) as h ->. xmin =.; xmax = 2.5 * pi; x =.3 * pi; fprintf( l h f(x-h) ); fprintf( f(h) f(x+h)\n\n ); for level = 7 : 3 : 43 h = (xmax - xmin) / 2^level; fprintf( 2d 4.8e 2.6e 2.6e 2.6e\n, level, h,... sin(x-h), sin(x), sin(x+h)); which produces the following output l h sin(x-h) sin(h) sin(x+h) e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e e- What one sees from the output which is quite obvious in retrospect is that as h gets smaller and smaller, the values f(x h), f(x) and f(x + h) all approach one another. So, for example, at level 43, where h is of the order 2, the first digits of the three values are the same. Now, for the sake of illustrating what is going on, let us assume that we have a computer (or calculator) that works to a maximum of four decimal digits to the right of the decimal point, and that we only perform computations than produce results in the range. through Then, a typical number that we manipulate, say 2.539, has a precision of roughly 5 that is, it has 5 significant digits. If we multiply 2 such numbers together, say (2.539)(3.427) = , then the result, , also has a precision of about 5. Thus we don t lose significant digits due to a single multiplication. However, if we consider subtracting two numbers which are very nearly equal, for example and 2.539, then the result =. now only has one significant digit: we only know the result to a precision of about. This is a simple example of the phenomenon known as catastrophic loss of precision which occurs when one subtracts floating point numbers that are nearly equal (or equivalently, when one adds floating numbers with opposite signs whose magnitudes are nearly equal). In general, if a and b have d leading digits in common, then the subtraction a b will lose d digits of precision relative to that of the operands. It is precisely this phenomenon that underlies the degrading of the convergence of the approximation (3) that is visible at levels 4 and 5 in the output of tfdas. However, if we look at the output from the above demonstration code, we note that even at level 6, the three values that appear in the finite difference formula differ at the 4th or 5th decimal digit. Since each floating point number has about 6 digits of precision, this would naively suggest that the arithmetic in (3) should still leave us with about digits of precision, so it seems somewhat surprising that we are seeing the effect at levels 4 and 5. Also, we are apparently not seeing the effect in the approximations of the first derivative. Why not? 7

8 The resolution of this conundrum comes from the further observation that as h, and for any smooth function such as sin(x), the values f(x h), f(x) and f(x + h) lie increasingly along a straight line so that f(x) f(x h) and f(x + h) f(x) also become increasingly equal. Equivalently, 2f(x) and f(x + h) + f(x h) have about twice as many leading digits in common as do any of the individual values f(x h), f(x) and f(x + h). This is illustrated by the following code Additional calculations demonstrating phenomenon of "catastrophic loss of precision" that results in deterioration of convergence in the O(h^2) FD approximation of second derivative. xmin =.; xmax = 2.5 * pi; x =.3 * pi; fprintf( l h 2 sin(x) ); fprintf( sin(x-h) + sin(x+h)\n\n ); for level = 7 : 5 h = (xmax - xmin) / 2^level; fprintf( 2d 4.8e 2.6e 2.6e\n, level, h,... 2*sin(x), sin(x-h) + sin(x+h)); which produces the output l h 2 sin(x) sin(x-h) + sin(x+h) e e e e e e e e e e e e e e e e e e e e e e e e e e e+ In particular, note that at level 5 the numbers in the last two columns have about 8 leading digits in common. Thus, the phenomenon of catastrophic loss of precision is much more pronounced for the second-derivative formula than for any of the first-derivative expressions (which explains why we did not see the deterioration of convergence in the first-derivative results), and, in fact, for finite difference approximations of higher and higher order derivatives one can naturally expect the precision loss to manifest itself for larger and larger values of h. 8

Introduction to Finite Di erence Methods

Introduction to Finite Di erence Methods Introduction to Finite Di erence Methods ME 448/548 Notes Gerald Recktenwald Portland State University Department of Mechanical Engineering gerry@pdx.edu ME 448/548: Introduction to Finite Di erence Approximation

More information

Homework 2. Matthew Jin. April 10, 2014

Homework 2. Matthew Jin. April 10, 2014 Homework Matthew Jin April 10, 014 1a) The relative error is given by ŷ y y, where ŷ represents the observed output value, and y represents the theoretical output value. In this case, the observed output

More information

PHYSICS 210 SOLUTION OF THE NONLINEAR PENDULUM EQUATION USING FDAS

PHYSICS 210 SOLUTION OF THE NONLINEAR PENDULUM EQUATION USING FDAS PHYSICS 210 SOLUTION OF THE NONLINEAR PENDULUM EQUATION USING FDAS 1. PHYSICAL & MATHEMATICAL FORMULATION O θ L r T m W 1 1.1 Derivation of the equation of motion O Consider idealized pendulum: Mass of

More information

Solutions Parabola Volume 49, Issue 2 (2013)

Solutions Parabola Volume 49, Issue 2 (2013) Parabola Volume 49, Issue (013) Solutions 1411 140 Q1411 How many three digit numbers are there which do not contain any digit more than once? What do you get if you add them all up? SOLUTION There are

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

Review: complex numbers

Review: complex numbers October 5/6, 01.5 extra problems page 1 Review: complex numbers Number system The complex number system consists of a + bi where a and b are real numbers, with various arithmetic operations. The real numbers

More information

MATH 20B MIDTERM #2 REVIEW

MATH 20B MIDTERM #2 REVIEW MATH 20B MIDTERM #2 REVIEW FORMAT OF MIDTERM #2 The format will be the same as the practice midterms. There will be six main questions worth 0 points each. These questions will be similar to problems you

More information

Honors Advanced Mathematics November 4, /2.6 summary and extra problems page 1 Recap: complex numbers

Honors Advanced Mathematics November 4, /2.6 summary and extra problems page 1 Recap: complex numbers November 4, 013.5/.6 summary and extra problems page 1 Recap: complex numbers Number system The complex number system consists of a + bi where a and b are real numbers, with various arithmetic operations.

More information

BHP BILLITON UNIVERSITY OF MELBOURNE SCHOOL MATHEMATICS COMPETITION, 2003: INTERMEDIATE DIVISION

BHP BILLITON UNIVERSITY OF MELBOURNE SCHOOL MATHEMATICS COMPETITION, 2003: INTERMEDIATE DIVISION BHP BILLITON UNIVERSITY OF MELBOURNE SCHOOL MATHEMATICS COMPETITION, 00: INTERMEDIATE DIVISION 1. A fraction processing machine takes a fraction f and produces a new fraction 1 f. If a fraction f = p is

More information

1 Backward and Forward Error

1 Backward and Forward Error Math 515 Fall, 2008 Brief Notes on Conditioning, Stability and Finite Precision Arithmetic Most books on numerical analysis, numerical linear algebra, and matrix computations have a lot of material covering

More information

Common Core Coach. Mathematics. First Edition

Common Core Coach. Mathematics. First Edition Common Core Coach Mathematics 8 First Edition Contents Domain 1 The Number System...4 Lesson 1 Understanding Rational and Irrational Numbers...6 Lesson 2 Estimating the Value of Irrational Expressions...

More information

PRACTICE TEST ANSWER KEY & SCORING GUIDELINES GRADE 8 MATHEMATICS

PRACTICE TEST ANSWER KEY & SCORING GUIDELINES GRADE 8 MATHEMATICS Ohio s State Tests PRACTICE TEST ANSWER KEY & SCORING GUIDELINES GRADE 8 MATHEMATICS Table of Contents Questions 1 25: Content Summary and Answer Key... iii Question 1: Question and Scoring Guidelines...

More information

MATH 103 Pre-Calculus Mathematics Dr. McCloskey Fall 2008 Final Exam Sample Solutions

MATH 103 Pre-Calculus Mathematics Dr. McCloskey Fall 2008 Final Exam Sample Solutions MATH 103 Pre-Calculus Mathematics Dr. McCloskey Fall 008 Final Exam Sample Solutions In these solutions, FD refers to the course textbook (PreCalculus (4th edition), by Faires and DeFranza, published by

More information

GCSE Mathematics Non Calculator Higher Tier Free Practice Set 6 1 hour 45 minutes ANSWERS. Marks shown in brackets for each question (2) A* A B C D E

GCSE Mathematics Non Calculator Higher Tier Free Practice Set 6 1 hour 45 minutes ANSWERS. Marks shown in brackets for each question (2) A* A B C D E MathsMadeEasy GCSE Mathematics Non Calculator Higher Tier Free Practice Set 6 1 hour 45 minutes ANSWERS Marks shown in brackets for each question A* A B C D E 88 75 60 45 25 15 3 Legend used in answers

More information

Solution of Algebric & Transcendental Equations

Solution of Algebric & Transcendental Equations Page15 Solution of Algebric & Transcendental Equations Contents: o Introduction o Evaluation of Polynomials by Horner s Method o Methods of solving non linear equations o Bracketing Methods o Bisection

More information

PYP Mathematics Continuum

PYP Mathematics Continuum Counting from One By Imaging to Advanced Counting (-) Y E+ 0- K N O W L E D G E Read,Write, and Count Whole numbers up to 00, forwards and backwards in s, s, 5 s, and 0 s Recall How many tens in a two-digit

More information

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA Not The Not-Formula Book for C Everything you need to know for Core that won t be in the formula book Examination Board: AQA Brief This document is intended as an aid for revision. Although it includes

More information

Assignment 6, Math 575A

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

Complex Numbers. Visualize complex functions to estimate their zeros and poles.

Complex Numbers. Visualize complex functions to estimate their zeros and poles. Lab 1 Complex Numbers Lab Objective: Visualize complex functions to estimate their zeros and poles. Polar Representation of Complex Numbers Any complex number z = x + iy can be written in polar coordinates

More information

Mathematics Revision Guide. Algebra. Grade C B

Mathematics Revision Guide. Algebra. Grade C B Mathematics Revision Guide Algebra Grade C B 1 y 5 x y 4 = y 9 Add powers a 3 a 4.. (1) y 10 y 7 = y 3 (y 5 ) 3 = y 15 Subtract powers Multiply powers x 4 x 9...(1) (q 3 ) 4...(1) Keep numbers without

More information

Rational Numbers. An Introduction to the Unit & Math 8 Review. Math 9 Mrs. Feldes

Rational Numbers. An Introduction to the Unit & Math 8 Review. Math 9 Mrs. Feldes Rational Numbers An Introduction to the Unit & Math 8 Review Math 9 Mrs. Feldes In this Unit, we will: Compare & order numbers using a variety of strategies. Strategies include: drawing pictures & number

More information

Power Series. x n. Using the ratio test. n n + 1. x n+1 n 3. = lim x. lim n + 1. = 1 < x < 1. Then r = 1 and I = ( 1, 1) ( 1) n 1 x n.

Power Series. x n. Using the ratio test. n n + 1. x n+1 n 3. = lim x. lim n + 1. = 1 < x < 1. Then r = 1 and I = ( 1, 1) ( 1) n 1 x n. .8 Power Series. n x n x n n Using the ratio test. lim x n+ n n + lim x n n + so r and I (, ). By the ratio test. n Then r and I (, ). n x < ( ) n x n < x < n lim x n+ n (n + ) x n lim xn n (n + ) x

More information

Numerical Analysis and Computing

Numerical Analysis and Computing Numerical Analysis and Computing Lecture Notes #02 Calculus Review; Computer Artihmetic and Finite Precision; and Convergence; Joe Mahaffy, mahaffy@math.sdsu.edu Department of Mathematics Dynamical Systems

More information

MATH 118, LECTURES 27 & 28: TAYLOR SERIES

MATH 118, LECTURES 27 & 28: TAYLOR SERIES MATH 8, LECTURES 7 & 8: TAYLOR SERIES Taylor Series Suppose we know that the power series a n (x c) n converges on some interval c R < x < c + R to the function f(x). That is to say, we have f(x) = a 0

More information

MATH 19B FINAL EXAM PROBABILITY REVIEW PROBLEMS SPRING, 2010

MATH 19B FINAL EXAM PROBABILITY REVIEW PROBLEMS SPRING, 2010 MATH 9B FINAL EXAM PROBABILITY REVIEW PROBLEMS SPRING, 00 This handout is meant to provide a collection of exercises that use the material from the probability and statistics portion of the course The

More information

2003 Solutions Pascal Contest (Grade 9)

2003 Solutions Pascal Contest (Grade 9) Canadian Mathematics Competition An activity of The Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario 00 Solutions Pascal Contest (Grade 9) for The CENTRE for

More information

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising

More information

International Mathematical Olympiad. Preliminary Selection Contest 2004 Hong Kong. Outline of Solutions 3 N

International Mathematical Olympiad. Preliminary Selection Contest 2004 Hong Kong. Outline of Solutions 3 N International Mathematical Olympiad Preliminary Selection Contest 004 Hong Kong Outline of Solutions Answers:. 8. 0. N 4. 49894 5. 6. 004! 40 400 7. 6 8. 7 9. 5 0. 0. 007. 8066. π + 4. 5 5. 60 6. 475 7.

More information

Section 5.8. Taylor Series

Section 5.8. Taylor Series Difference Equations to Differential Equations Section 5.8 Taylor Series In this section we will put together much of the work of Sections 5.-5.7 in the context of a discussion of Taylor series. We begin

More information

Vector Basics, with Exercises

Vector Basics, with Exercises Math 230 Spring 09 Vector Basics, with Exercises This sheet is designed to follow the GeoGebra Introduction to Vectors. It includes a summary of some of the properties of vectors, as well as homework exercises.

More information

Extra Problems: Unit 0

Extra Problems: Unit 0 Extra Problems: Unit 0 These are example problems, mostly from tests and quizzes that I have given in the past. Make sure you understand and can do all assigned textbook problems, activities, problems

More information

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri MATH 1101 haalshehri@ksu.edu.sa 1 Introduction To Number Systems First Section: Binary System Second Section: Octal Number System Third Section: Hexadecimal System 2 Binary System 3 Binary System The binary

More information

SCHOOL OF MATHEMATICS MATHEMATICS FOR PART I ENGINEERING. Self-paced Course

SCHOOL OF MATHEMATICS MATHEMATICS FOR PART I ENGINEERING. Self-paced Course SCHOOL OF MATHEMATICS MATHEMATICS FOR PART I ENGINEERING Self-paced Course MODULE ALGEBRA Module Topics Simplifying expressions and algebraic functions Rearranging formulae Indices 4 Rationalising a denominator

More information

Math Day at the Beach 2018

Math Day at the Beach 2018 Multiple Choice Write your name and school and mark your answers on the answer sheet. You have 30 minutes to work on these problems. No calculator is allowed. 1. A bag has some white balls and some red

More information

Solutions to February 2008 Problems

Solutions to February 2008 Problems Solutions to February 008 Problems Problem. An Egyptian-style pyramid has a square b b base and height h. What is the volume of the smallest sphere that contains the pyramid? (This may be a little trickier

More information

AS Mathematics MPC1. Unit: Pure Core 1. Mark scheme. June Version: 1.0 Final

AS Mathematics MPC1. Unit: Pure Core 1. Mark scheme. June Version: 1.0 Final AS Mathematics MPC1 Unit: Pure Core 1 Mark scheme June 017 Version: 1.0 Final FINAL MARK SCHEME AS MATHEMATICS MPC1 JUNE 017 Mark schemes are prepared by the Lead Assessment Writer and considered, together

More information

MATH 1010E University Mathematics Lecture Notes (week 8) Martin Li

MATH 1010E University Mathematics Lecture Notes (week 8) Martin Li MATH 1010E University Mathematics Lecture Notes (week 8) Martin Li 1 L Hospital s Rule Another useful application of mean value theorems is L Hospital s Rule. It helps us to evaluate its of indeterminate

More information

9.4 Cubic spline interpolation

9.4 Cubic spline interpolation 94 ubic spline interpolation Instead of going to higher and higher order, there is another way of creating a smooth function that interpolates data-points A cubic spline is a piecewise continuous curve

More information

CS 221 Lecture 9. Tuesday, 1 November 2011

CS 221 Lecture 9. Tuesday, 1 November 2011 CS 221 Lecture 9 Tuesday, 1 November 2011 Some slides in this lecture are from the publisher s slides for Engineering Computation: An Introduction Using MATLAB and Excel 2009 McGraw-Hill Today s Agenda

More information

q-series Michael Gri for the partition function, he developed the basic idea of the q-exponential. From

q-series Michael Gri for the partition function, he developed the basic idea of the q-exponential. From q-series Michael Gri th History and q-integers The idea of q-series has existed since at least Euler. In constructing the generating function for the partition function, he developed the basic idea of

More information

2 2xdx. Craigmount High School Mathematics Department

2 2xdx. Craigmount High School Mathematics Department Π 5 3 xdx 5 cosx 4 6 3 8 Help Your Child With Higher Maths Introduction We ve designed this booklet so that you can use it with your child throughout the session, as he/she moves through the Higher course,

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

Binary floating point

Binary floating point Binary floating point Notes for 2017-02-03 Why do we study conditioning of problems? One reason is that we may have input data contaminated by noise, resulting in a bad solution even if the intermediate

More information

Making the grade. by Chris Sangwin. Making the grade

Making the grade. by Chris Sangwin. Making the grade 1997 2009, Millennium Mathematics Project, University of Cambridge. Permission is granted to print and copy this page on paper for non commercial use. For other uses, including electronic redistribution,

More information

SHOW ALL YOUR WORK IN A NEAT AND ORGANIZED FASHION

SHOW ALL YOUR WORK IN A NEAT AND ORGANIZED FASHION Intermediate Algebra TEST 1 Spring 014 NAME: Score /100 Please print SHOW ALL YOUR WORK IN A NEAT AND ORGANIZED FASHION Course Average No Decimals No mixed numbers No complex fractions No boxed or circled

More information

2 Systems of Linear Equations

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

Notes on floating point number, numerical computations and pitfalls

Notes on floating point number, numerical computations and pitfalls Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1

More information

Can ANSYS Mechanical Handle My Required Modeling Precision?

Can ANSYS Mechanical Handle My Required Modeling Precision? Can ANSYS Mechanical Handle My Required Modeling Precision? 2/8/2017 www.telescope-optics.net Recently, PADT received the following inquiry from a scientist interested in using ANSYS for telescope application

More information

Lecture 28 The Main Sources of Error

Lecture 28 The Main Sources of Error Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations

More information

Complex Numbers. A complex number z = x + iy can be written in polar coordinates as re i where

Complex Numbers. A complex number z = x + iy can be written in polar coordinates as re i where Lab 20 Complex Numbers Lab Objective: Create visualizations of complex functions. Visually estimate their zeros and poles, and gain intuition about their behavior in the complex plane. Representations

More information

ST MARY S DSG, KLOOF GRADE: SEPTEMBER 2017 MATHEMATICS PAPER 2

ST MARY S DSG, KLOOF GRADE: SEPTEMBER 2017 MATHEMATICS PAPER 2 ST MARY S DSG, KLOOF GRADE: 12 12 SEPTEMBER 2017 MATHEMATICS PAPER 2 TIME: 3 HOURS ASSESSOR: S Drew TOTAL: 150 MARKS MODERATORS: J van Rooyen E Robertson EXAMINATION NUMBER: TEACHER: INSTRUCTIONS: 1. This

More information

ADVANCED PLACEMENT PHYSICS 1

ADVANCED PLACEMENT PHYSICS 1 ADVANCED PLACEMENT PHYSICS 1 MS. LAWLESS ALAWLESS@SOMERVILLESCHOOLS.ORG Purpose of Assignments: This assignment is broken into 8 Skills. Skills 1-6, and 8 are review of science and math literacy. Skill

More information

Finding Limits Graphically and Numerically

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

1.2 Finite Precision Arithmetic

1.2 Finite Precision Arithmetic MACM Assignment Solutions.2 Finite Precision Arithmetic.2:e Rounding Arithmetic Use four-digit rounding arithmetic to perform the following calculation. Compute the absolute error and relative error with

More information

1 More concise proof of part (a) of the monotone convergence theorem.

1 More concise proof of part (a) of the monotone convergence theorem. Math 0450 Honors intro to analysis Spring, 009 More concise proof of part (a) of the monotone convergence theorem. Theorem If (x n ) is a monotone and bounded sequence, then lim (x n ) exists. Proof. (a)

More information

Function Junction: Homework Examples from ACE

Function Junction: Homework Examples from ACE Function Junction: Homework Examples from ACE Investigation 1: The Families of Functions, ACE #5, #10 Investigation 2: Arithmetic and Geometric Sequences, ACE #4, #17 Investigation 3: Transforming Graphs,

More information

Intro to Scientific Computing: How long does it take to find a needle in a haystack?

Intro to Scientific Computing: How long does it take to find a needle in a haystack? Intro to Scientific Computing: How long does it take to find a needle in a haystack? Dr. David M. Goulet Intro Binary Sorting Suppose that you have a detector that can tell you if a needle is in a haystack,

More information

Lesson 12: More Systems

Lesson 12: More Systems Lesson 12: More Systems restart; A geometry problem Here's a nice little application of resultants to a geometrical problem. We're given two concentric circles with radii and. From a given point P at a

More information

CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association

CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association CISC - Curriculum & Instruction Steering Committee California County Superintendents Educational Services Association Primary Content Module The Winning EQUATION Algebra I - Linear Equations and Inequalities

More information

Binary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding

Binary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 2 2 4 6 8 2 4 6 8 3 3 6 9 2 5 8 2 24 27 4 4 8 2 6

More information

Save My Exams! The Home of Revision For more awesome GCSE and A level resources, visit us at 4H June 2017.

Save My Exams! The Home of Revision For more awesome GCSE and A level resources, visit us at   4H June 2017. 4H June 2017 Model Answers Level Subject Exam Board Paper Booklet IGCSE Maths Edexcel June 2017 4H Model Answers Time Allowed: Score: Percentage: 120 minutes / 100 /100 Grade Boundaries: 9 8 7 6 5 4 3

More information

MATH 116, LECTURE 13, 14 & 15: Derivatives

MATH 116, LECTURE 13, 14 & 15: Derivatives MATH 116, LECTURE 13, 14 & 15: Derivatives 1 Formal Definition of the Derivative We have seen plenty of limits so far, but very few applications. In particular, we have seen very few functions for which

More information

Homework #4 Solutions

Homework #4 Solutions Homework #4 Solutions 1. f(x) = e x + e 1+sin(x) + cos (x) f (x) = e x + cos(x) e 1+sin(x) sin (x) f (x) = e x + e 1+sin(x) (cos (x) sin(x)) cos (x) f (x) = (1 3e 1+sin(x) cos(x)) sin(x) + e 1+sin(x) (cos

More information

STEP Support Programme. Hints and Partial Solutions for Assignment 4

STEP Support Programme. Hints and Partial Solutions for Assignment 4 STEP Support Programme Hints and Partial Solutions for Assignment 4 Warm-up 1 (i) This question was asking you to prove that the angle at the centre of a circle is twice the angle at the circumference.

More information

Gauss School and Gauss Math Circle 2017 Gauss Math Tournament Grade 7-8 (Sprint Round 50 minutes)

Gauss School and Gauss Math Circle 2017 Gauss Math Tournament Grade 7-8 (Sprint Round 50 minutes) Gauss School and Gauss Math Circle 2017 Gauss Math Tournament Grade 7-8 (Sprint Round 50 minutes) 1. Compute. 2. Solve for x: 3. What is the sum of the negative integers that satisfy the inequality 2x

More information

Math Homework 1. The homework consists mostly of a selection of problems from the suggested books. 1 ± i ) 2 = 1, 2.

Math Homework 1. The homework consists mostly of a selection of problems from the suggested books. 1 ± i ) 2 = 1, 2. Math 70300 Homework 1 September 1, 006 The homework consists mostly of a selection of problems from the suggested books. 1. (a) Find the value of (1 + i) n + (1 i) n for every n N. We will use the polar

More information

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27 CS 70 Discrete Mathematics for CS Spring 007 Luca Trevisan Lecture 7 Infinity and Countability Consider a function f that maps elements of a set A (called the domain of f ) to elements of set B (called

More information

1.7 Proof Methods and Strategy

1.7 Proof Methods and Strategy 1.7 Proof Methods and Strategy Proof Strategies Finding proofs can be difficult. Usual process of proving: Replace terms by their definitions Analyze what the hypothesis and the conclusion mean Try to

More information

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1

Tu: 9/3/13 Math 471, Fall 2013, Section 001 Lecture 1 Tu: 9/3/13 Math 71, Fall 2013, Section 001 Lecture 1 1 Course intro Notes : Take attendance. Instructor introduction. Handout : Course description. Note the exam days (and don t be absent). Bookmark the

More information

Foundations of Math II Unit 5: Solving Equations

Foundations of Math II Unit 5: Solving Equations Foundations of Math II Unit 5: Solving Equations Academics High School Mathematics 5.1 Warm Up Solving Linear Equations Using Graphing, Tables, and Algebraic Properties On the graph below, graph the following

More information

UNCC 2001 Comprehensive, Solutions

UNCC 2001 Comprehensive, Solutions UNCC 2001 Comprehensive, Solutions March 5, 2001 1 Compute the sum of the roots of x 2 5x + 6 = 0 (A) (B) 7/2 (C) 4 (D) 9/2 (E) 5 (E) The sum of the roots of the quadratic ax 2 + bx + c = 0 is b/a which,

More information

Fall 2017 November 10, Written Homework 5

Fall 2017 November 10, Written Homework 5 CS1800 Discrete Structures Profs. Aslam, Gold, & Pavlu Fall 2017 November 10, 2017 Assigned: Mon Nov 13 2017 Due: Wed Nov 29 2017 Instructions: Written Homework 5 The assignment has to be uploaded to blackboard

More information

MATH 163 HOMEWORK Week 13, due Monday April 26 TOPICS. c n (x a) n then c n = f(n) (a) n!

MATH 163 HOMEWORK Week 13, due Monday April 26 TOPICS. c n (x a) n then c n = f(n) (a) n! MATH 63 HOMEWORK Week 3, due Monday April 6 TOPICS 4. Taylor series Reading:.0, pages 770-77 Taylor series. If a function f(x) has a power series representation f(x) = c n (x a) n then c n = f(n) (a) ()

More information

Question 1: Is zero a rational number? Can you write it in the form p, where p and q are integers and q 0?

Question 1: Is zero a rational number? Can you write it in the form p, where p and q are integers and q 0? Class IX - NCERT Maths Exercise (.) Question : Is zero a rational number? Can you write it in the form p, where p and q are integers and q 0? q Solution : Consider the definition of a rational number.

More information

Taylor Series. Math114. March 1, Department of Mathematics, University of Kentucky. Math114 Lecture 18 1/ 13

Taylor Series. Math114. March 1, Department of Mathematics, University of Kentucky. Math114 Lecture 18 1/ 13 Taylor Series Math114 Department of Mathematics, University of Kentucky March 1, 2017 Math114 Lecture 18 1/ 13 Given a function, can we find a power series representation? Math114 Lecture 18 2/ 13 Given

More information

Unit 1 Lesson 6: Seeing Structure in Expressions

Unit 1 Lesson 6: Seeing Structure in Expressions Unit 1 Lesson 6: Seeing Structure in Expressions Objective: Students will be able to use inductive reasoning to try to solve problems that are puzzle like in nature. CCSS: A.SSE.1.b, A.SSE.2 Example Problems

More information

Revision Topic 8: Solving Inequalities Inequalities that describe a set of integers or range of values

Revision Topic 8: Solving Inequalities Inequalities that describe a set of integers or range of values Revision Topic 8: Solving Inequalities Inequalities that describe a set of integers or range of values The inequality signs: > greater than < less than greater than or equal to less than or equal to can

More information

Counting Out πr 2. Teacher Lab Discussion. Overview. Picture, Data Table, and Graph. Part I Middle Counting Length/Area Out πrinvestigation

Counting Out πr 2. Teacher Lab Discussion. Overview. Picture, Data Table, and Graph. Part I Middle Counting Length/Area Out πrinvestigation 5 6 7 Middle Counting Length/rea Out πrinvestigation, page 1 of 7 Counting Out πr Teacher Lab Discussion Figure 1 Overview In this experiment we study the relationship between the radius of a circle and

More information

Mathematics 1 Lecture Notes Chapter 1 Algebra Review

Mathematics 1 Lecture Notes Chapter 1 Algebra Review Mathematics 1 Lecture Notes Chapter 1 Algebra Review c Trinity College 1 A note to the students from the lecturer: This course will be moving rather quickly, and it will be in your own best interests to

More information

Chapter Five Notes N P U2C5

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

Homework 2 Foundations of Computational Math 1 Fall 2018

Homework 2 Foundations of Computational Math 1 Fall 2018 Homework 2 Foundations of Computational Math 1 Fall 2018 Note that Problems 2 and 8 have coding in them. Problem 2 is a simple task while Problem 8 is very involved (and has in fact been given as a programming

More information

Mathematics Table of Contents

Mathematics Table of Contents Table of Contents Teaching Knowledge and Employability Math Math Strategies Math Symbols Multiplication Table Hints for Dividing Place Value Chart Place Value Chart: Decimals Hints for Rounding Coordinate

More information

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,

More information

Maths Pack. Distance Learning Mathematics Support Pack. For the University Certificates in Astronomy and Cosmology

Maths Pack. Distance Learning Mathematics Support Pack. For the University Certificates in Astronomy and Cosmology Maths Pack Distance Learning Mathematics Support Pack For the University Certificates in Astronomy and Cosmology These certificate courses are for your enjoyment. However, a proper study of astronomy or

More information

May 2015 Timezone 2 IB Maths Standard Exam Worked Solutions

May 2015 Timezone 2 IB Maths Standard Exam Worked Solutions May 015 Timezone IB Maths Standard Exam Worked Solutions 015, Steve Muench steve.muench@gmail.com @stevemuench Please feel free to share the link to these solutions http://bit.ly/ib-sl-maths-may-015-tz

More information

Problems for Putnam Training

Problems for Putnam Training Problems for Putnam Training 1 Number theory Problem 1.1. Prove that for each positive integer n, the number is not prime. 10 1010n + 10 10n + 10 n 1 Problem 1.2. Show that for any positive integer n,

More information

BC Exam Solutions Texas A&M High School Math Contest October 24, p(1) = b + 2 = 3 = b = 5.

BC Exam Solutions Texas A&M High School Math Contest October 24, p(1) = b + 2 = 3 = b = 5. C Exam Solutions Texas &M High School Math Contest October 4, 01 ll answers must be simplified, and If units are involved, be sure to include them. 1. p(x) = x + ax + bx + c has three roots, λ i, with

More information

THE POWERS OF THREE. J. M. WILLIAMS, JR. San Francisco, California

THE POWERS OF THREE. J. M. WILLIAMS, JR. San Francisco, California THE POWERS OF THREE J. M. WILLIAMS, JR. San Francisco, California Any number may be expressed in powers of three by addition or subtraction of the numbers those powers represent. 13 = 3 2 + 3 1 + 3 14

More information

PublicServicePrep Comprehensive Guide to Canadian Public Service Exams

PublicServicePrep Comprehensive Guide to Canadian Public Service Exams PublicServicePrep Comprehensive Guide to Canadian Public Service Exams Copyright 2009 Dekalam Hire Learning Incorporated Teaching Material Math Addition 7 + 5 7 + 5 = 12 12 The above two equations have

More information

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES

ENGINEERING MATH 1 Fall 2009 VECTOR SPACES ENGINEERING MATH 1 Fall 2009 VECTOR SPACES A vector space, more specifically, a real vector space (as opposed to a complex one or some even stranger ones) is any set that is closed under an operation of

More information

Unofficial Solutions

Unofficial Solutions Canadian Open Mathematics Challenge 2016 Unofficial Solutions COMC exams from other years, with or without the solutions included, are free to download online. Please visit http://comc.math.ca/2016/practice.html

More information

Completion Date: Monday February 11, 2008

Completion Date: Monday February 11, 2008 MATH 4 (R) Winter 8 Intermediate Calculus I Solutions to Problem Set #4 Completion Date: Monday February, 8 Department of Mathematical and Statistical Sciences University of Alberta Question. [Sec..9,

More information

The problems in this booklet are organized into strands. A problem often appears in multiple strands. The problems are suitable for most students in

The problems in this booklet are organized into strands. A problem often appears in multiple strands. The problems are suitable for most students in The problems in this booklet are organized into strands. A problem often appears in multiple strands. The problems are suitable for most students in Grade 11 or higher. Problem E What s Your Angle? A

More information

Pre-Algebra Notes Unit Two: Solving Equations

Pre-Algebra Notes Unit Two: Solving Equations Pre-Algebra Notes Unit Two: Solving Equations Properties of Real Numbers Syllabus Objective: (.1) The student will evaluate expressions using properties of addition and multiplication, and the distributive

More information

Grade 6 Math Circles October 9 & Visual Vectors

Grade 6 Math Circles October 9 & Visual Vectors Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles October 9 & 10 2018 Visual Vectors Introduction What is a vector? How does it differ

More information

1. Pace yourself. Make sure you write something on every problem to get partial credit. 2. If you need more space, use the back of the previous page.

1. Pace yourself. Make sure you write something on every problem to get partial credit. 2. If you need more space, use the back of the previous page. ***THIS TIME I DECIDED TO WRITE A LOT OF EXTRA PROBLEMS TO GIVE MORE PRACTICE. The actual midterm will have about 6 problems. If you want to practice something with approximately the same length as the

More information

Regent College. Maths Department. Core Mathematics 4. Vectors

Regent College. Maths Department. Core Mathematics 4. Vectors Regent College Maths Department Core Mathematics 4 Vectors Page 1 Vectors By the end of this unit you should be able to find: a unit vector in the direction of a. the distance between two points (x 1,

More information

LEVERS AND BARYCENTRIC COORDINATES (PART 2)

LEVERS AND BARYCENTRIC COORDINATES (PART 2) LEVERS AND BARYCENTRIC COORDINATES (PART 2) LAMC INTERMEDIATE - 4/20/14 This handout (Part 2) continues the work we started last week when we discussed levers. This week we will focus on Barycentric coordinates

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

Unit 4 Example Review. 1. Question: a. [A] b. [B] c. [C] d. [D]

Unit 4 Example Review. 1. Question: a. [A] b. [B] c. [C] d. [D] Unit 4 Example Review 1. Question: Answer: When the line is wrapped around the circle, the length of the line will be equal to the length of the arc that is formed by the wrap starting from the point (1,0)

More information