Topic 4a Introduction to Root Finding & Bracketing Methods

Similar documents
x 1 b 1 Consider the midpoint x 0 = 1 2

Numerical Integration

A Crash Course in (2 2) Matrices

The Substring Search Problem

Markscheme May 2017 Calculus Higher level Paper 3

you of a spring. The potential energy for a spring is given by the parabola U( x)

Problem 1. Part b. Part a. Wayne Witzke ProblemSet #1 PHY 361. Calculate x, the expected value of x, defined by

Physics 2B Chapter 22 Notes - Magnetic Field Spring 2018

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department Physics 8.07: Electromagnetism II September 15, 2012 Prof. Alan Guth PROBLEM SET 2

Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version

Internet Appendix for A Bayesian Approach to Real Options: The Case of Distinguishing Between Temporary and Permanent Shocks

FE FORMULATIONS FOR PLASTICITY

ASTR415: Problem Set #6

Method for Approximating Irrational Numbers

3.1 Random variables

HOW TO TEACH THE FUNDAMENTALS OF INFORMATION SCIENCE, CODING, DECODING AND NUMBER SYSTEMS?

MAGNETIC FIELD AROUND TWO SEPARATED MAGNETIZING COILS

Computational Methods of Solid Mechanics. Project report

Non-Linear Dynamics Homework Solutions Week 2

Physics 521. Math Review SCIENTIFIC NOTATION SIGNIFICANT FIGURES. Rules for Significant Figures

F-IF Logistic Growth Model, Abstract Version

Conjugate Gradient Methods. Michael Bader. Summer term 2012

Research Design - - Topic 17 Multiple Regression & Multiple Correlation: Two Predictors 2009 R.C. Gardner, Ph.D.

Δt The textbook chooses to say that the average velocity is

Random Variables and Probability Distribution Random Variable

of the contestants play as Falco, and 1 6

Light Time Delay and Apparent Position

7.2. Coulomb s Law. The Electric Force

CBE Transport Phenomena I Final Exam. December 19, 2013

To Feel a Force Chapter 7 Static equilibrium - torque and friction

A Two-Dimensional Bisection Envelope Algorithm for Fixed Points

A Relativistic Electron in a Coulomb Potential

Goodness-of-fit for composite hypotheses.

MULTILAYER PERCEPTRONS

CALCULUS II Vectors. Paul Dawkins

1 Similarity Analysis

Physics 161 Fall 2011 Extra Credit 2 Investigating Black Holes - Solutions The Following is Worth 50 Points!!!

Solutions to Problem Set 8

15.081J/6.251J Introduction to Mathematical Programming. Lecture 6: The Simplex Method II

Particle Systems. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Exploration of the three-person duel

LINEAR AND NONLINEAR ANALYSES OF A WIND-TUNNEL BALANCE

Contact impedance of grounded and capacitive electrodes

5.61 Physical Chemistry Lecture #23 page 1 MANY ELECTRON ATOMS

Boundary Layers and Singular Perturbation Lectures 16 and 17 Boundary Layers and Singular Perturbation. x% 0 Ω0æ + Kx% 1 Ω0æ + ` : 0. (9.

6 PROBABILITY GENERATING FUNCTIONS

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

Reading Assignment. Problem Description for Homework #9. Read Chapters 29 and 30.

Berkeley Math Circle AIME Preparation March 5, 2013

MEI Structured Mathematics. Module Summary Sheets. Numerical Methods (Version B reference to new book)

Easy. P4.2 Since the car is moving with constant speed and in a straight line, the. resultant force on it must be regardless of whether it is moving

EEO 401 Digital Signal Processing Prof. Mark Fowler

Physics 2112 Unit 14

What to Expect on the Placement Exam

C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22

Absolute Specifications: A typical absolute specification of a lowpass filter is shown in figure 1 where:

MAC Module 12 Eigenvalues and Eigenvectors

Introduction to Vectors and Frames

PHYS 1441 Section 002. Lecture #3

18.06 Problem Set 4 Solution

Physics 2020, Spring 2005 Lab 5 page 1 of 8. Lab 5. Magnetism

I. CONSTRUCTION OF THE GREEN S FUNCTION

Solution to HW 3, Ma 1a Fall 2016

QIP Course 10: Quantum Factorization Algorithm (Part 3)

Multiple Experts with Binary Features

Section 8.2 Polar Coordinates

PROBLEM SET #1 SOLUTIONS by Robert A. DiStasio Jr.

Temporal-Difference Learning

Chapter Eight Notes N P U1C8S4-6

Multi-Objective Optimization Algorithms for Finite Element Model Updating

Numerical Modeling in Biomedical Systems

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations

Current Balance Warm Up

When two numbers are written as the product of their prime factors, they are in factored form.

1D2G - Numerical solution of the neutron diffusion equation

Vanishing lines in generalized Adams spectral sequences are generic

Math Notes on Kepler s first law 1. r(t) kp(t)

A Power Method for Computing Square Roots of Complex Matrices

An Exact Solution of Navier Stokes Equation

Nuclear and Particle Physics - Lecture 20 The shell model

Information Retrieval (Relevance Feedback & Query Expansion)

Uniform Circular Motion

COORDINATE TRANSFORMATIONS - THE JACOBIAN DETERMINANT

Chapter 5 Linear Equations: Basic Theory and Practice

3.6 Applied Optimization

CSCE 478/878 Lecture 4: Experimental Design and Analysis. Stephen Scott. 3 Building a tree on the training set Introduction. Outline.

2 x 8 2 x 2 SKILLS Determine whether the given value is a solution of the. equation. (a) x 2 (b) x 4. (a) x 2 (b) x 4 (a) x 4 (b) x 8

Transfer Matrix Method

10/04/18. P [P(x)] 1 negl(n).

Explosive Contagion in Networks (Supplementary Information)

The Laws of Motion ( ) N SOLUTIONS TO PROBLEMS ! F = ( 6.00) 2 + ( 15.0) 2 N = 16.2 N. Section 4.4. Newton s Second Law The Particle Under a Net Force

radians). Figure 2.1 Figure 2.2 (a) quadrant I angle (b) quadrant II angle is in standard position Terminal side Terminal side Terminal side

Hopefully Helpful Hints for Gauss s Law

Vectors, Vector Calculus, and Coordinate Systems

Galilean Transformation vs E&M y. Historical Perspective. Chapter 2 Lecture 2 PHYS Special Relativity. Sep. 1, y K K O.

Centripetal Force OBJECTIVE INTRODUCTION APPARATUS THEORY

Motithang Higher Secondary School Thimphu Thromde Mid Term Examination 2016 Subject: Mathematics Full Marks: 100

Implementation of RCWA

Physics 181. Assignment 4

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

Transcription:

/8/18 Couse Instucto D. Raymond C. Rumpf Office: A 337 Phone: (915) 747 6958 E Mail: cumpf@utep.edu Topic 4a Intoduction to Root Finding & Backeting Methods EE 4386/531 Computational Methods in EE Outline Intoduction Backeting Methods The Bisection Method False Position Method Multiple Roots 1

/8/18 Intoduction 3 What is Root Finding? What values of does f() =? et f a b c We can figue this out algebaically b b 4ac a But what if f e This cannot be solved analytically. We need to use a numeical method. 4

/8/18 Root Finding Methods Backeting Methods Finding a single oot that falls within a known ange. Vey obust Must know something ahead of time. Open Methods Tial and eo iteative methods Do not need bounds, only an initial guess. Moe efficient than backeting methods Can be unstable and not find a solution Roots of Polynomials Algoithm specific to polynomials Physics of you poblem must be fit to a polynomial Able to find all oots. Requies initial bounds U Requies an initial guess 1 Requies multiple points, y,, y,,, y 1 1 N N 5 Genealizing Root Finding Algoithms Root finding algoithms find all values of such that f() =. What if we wish to find all values of such that f() = a? Genealization f a f a et g f a Now pefom standad oot finding on g(). 6 3

/8/18 Peliminay Root ocation The basic oot finding algoithms all equie that a oot be oughly located. The oot finding algoithm only efines the ough location. This means we must detemine at least appoimate locations of the oots. This infomation can come fom one of seveal things. 1. Something is known about the physics of the poblem being solved that gives you infomation about whee the oots should be.. If nothing else is known, plot the function to identify the location of the oots and feed each of those ough locations into a ootfinding algoithm. You may have to geneate a numbe of plots and play with ais scaling to find the oots. Slide 7 Need fo Optimized Algoithms In many cicumstances, a single computation of f() may take hous, days, o weeks! In these cases it is highly desied to minimize the total numbe of computations of f(). It is often woth the investment of a few hous to wite an awesome code that uns in an hou than waiting days o weeks fo the answe to come fom a simple code you wote in a few minutes. 8 4

/8/18 The Bisection Method 9 Step 1 Pick a lowe and uppe bound, and U that is known to contain a single oot between them. 1..8.6.4 f(). -. Root we wish to find. f() -.4 -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 1 5

/8/18 Step Calculate the midpoint between and U as the fist guess fo the oot. 1..8.6.4 f(). -. Fist guess U f() -.4 -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 11 Step 3 Calculate the function at the midpoint. f f() U 1 6

/8/18 Step 4 Adjust the bounds. f() U 13 Step 5 Calculate the midpoint. 1..8.6 Second guess U f().4 f(). -. -.4 -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 14 7

/8/18 Step 6 Calculate the function at the midpoint. 1..8.6.4 f(). -. U f() -.4 -.6 -.8 f.5.75 3. 3.5 3.5 3.75 4. 15 Step 7 Adjust the bounds. 1..8.6.4 f(). -. -.4 -.6 U f() -.8.5.75 3. 3.5 3.5 3.75 4. 16 8

/8/18 Step 8 Calculate a midpoint. 1..8.6.4 f(). U f() -. -.4 -.6 -.8.5.75 3. 3.5 3.5 3.75 4. U 17 Step 9 Calculate the function at the midpoint. 1..8.6.4 f(). U f() -. -.4 -.6 f -.8.5.75 3. 3.5 3.5 3.75 4. 18 9

/8/18 Step 1 Adjust the bounds. 1..8.6.4 f(). -. -.4 -.6 U f() -.8.5.75 3. 3.5 3.5 3.75 4. 19 Step 11 Calculate a midpoint. 1..8.6.4 f(). U f() -. -.4 -.6 -.8.5.75 3. 3.5 3.5 3.75 4. U 1

/8/18 Step 1 Calculate the function as the midpoint. 1. U.8.6.4 f(). f f() -. -.4 -.6 -.8.5.75 3. 3.5 3.5 3.75 4. 1 Step 13 and Beyond And so on Iteation 1 Iteation 1 1.5.5 f() f() -.5 -.5.5 3 3.5 4 Iteation 3.5 3 3.5 4 Iteation 4 1 1.5.5 f() f() -.5 -.5.5 3 3.5 4 Iteation 5.5 3 3.5 4 Iteation 6 1 1.5.5 f() f() -.5 -.5.5 3 3.5 4 Iteation 7.5 3 3.5 4 Iteation 8 1 1.5.5 f() f() -.5 -.5.5 3 3.5 4.5 3 3.5 4 11

/8/18 Adjusting the Bounds (1 of ) Be caeful about signs when adjusting the bounds. f() 1..8.6.4. -. -.4 -.6 -.8 Move uppe bound.5.75 3. 3.5 3.5 3.75 4. Hee the function is positive and we move the uppe bound. f().8.6.4. -. -.4 -.6 -.8-1. - Move uppe bound.5.75 3. 3.5 3.5 3.75 4. Hee the function is negative and we still move the uppe bound. 3 Adjusting the Bounds ( of ) If f f If f f then thee is a sign change between and. This means the oot is close to than U. Move U to. then the sign change must be between U and. This means the oot is close to U than. Move to. If f f then we ae done because we have the oot eactly. % Adjust the Bounds if f*f< U = ; fu = f; elseif f*f> = ; f = f; else beak; end %oot towad f %oot towad fu 4 1

/8/18 When is the Algoithm Finished? i. Calculate the amount has moved fom one iteation to the net. old old ii. At the end of each iteation, check if is less than some theshold. toleance Rule of thumb: If you want some numbe of digits of pecision, ensue is at least an ode of magnitude less than the desied pecision. WARNING! Do not set you convegence condition to U <toleance because this will fail when the same bounday is being adjusted each iteation. 5 Block Diagam of Bisection Method Stat Choose and. Evaluate f() at endpoints. f f f f U U Calculate midpoint. U Move lowe bound. f f Evaluate f() at midpoint. f f f f Done! Calculate. U Move uppe bound. f f U U Calculate change. old no tol yes Done! 6 13

/8/18 Algoithm fo Bisection Method 1. Choose lowe and uppe bounds, and U so that they suound a oot.. Evaluate the function at the endpoints, f( ) and f( U ). 3. Calculate midpoint. U 4. Iteate until conveged a) Evaluate the function at the midpoint f( ). b) Adjust the bounds. If f f, then U If f f, then If f, then DONE! c) Update the midpoint. U d) Detemine if conveged i. Calculate step size old ii. Algoithm is conveged if < toleance. 7 Notes on Bisection Method Most obust oot finde east efficient oot finde Guaanteed to find a oot as long as the bounds span a cossing Sometimes good to check sign change of bounds No sign change o even numbe of oots. Sign change odd numbe of oots. 8 14

/8/18 False Position Method 9 Moe Intelligent Midpoint False-Position Method U f f f f U U U f U U f Bisection Method U Since f f H, it is a good assumption that the oot is close to than it is to H. 3 15

/8/18 Step 1 Pick a lowe and uppe bound, and U that is known to contain a single oot. 1..8.6.4 f(). -. Root we wish to find. f() -.4 -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 31 Step Calculate a bette estimate of the position of the oot using a linea appoimation. 1..8.6.4 f(). -. Bette estimate f() -.4 -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 3 16

/8/18 Step 3 Calculate the function at the estimate fo. 1..8.6.4 f(). f() -. -.4 -.6 f U -.8.5.75 3. 3.5 3.5 3.75 4. 33 Step 4 Adjust the bounds. 1..8.6.4 f(). -. -.4 f() -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 34 17

/8/18 Step 5 Estimate the position of the oot by linea appoimation. 1..8 Second guess.6.4 f(). f() -. -.4 -.6 U -.8.5.75 3. 3.5 3.5 3.75 4. 35 Deivation of Estimate (1 of 3) The equation of a line given a point (, y ) and slope m is y y m Assuming the function connecting the bounds is close to linea, the slope is appoimately m f f U U 36 18

/8/18 Deivation of Estimate ( of 3) et s choose the lowe bound to be the point in ou line equation. y f U f f y f U m We now estimate the position of the oot by setting y = and solving fo. f U f f U f U f U f 37 Deivation of Estimate (3 of 3) et s choose the uppe bound to be the point in ou line equation. f U U f y f U U y f U U We now estimate the position of the oot by setting y = and solving fo. f U f f U U U f U U U f U f m 38 19

/8/18 Intepetation of Estimate (1 of ) We have two possible equations to estimate the position of the oot. f U f U f f U U U f U f et s aveage these equations. f f U U U U f U f f U f f f U U f f U U 39 Intepetation of Estimate ( of ) U U f f U f U f Typical bisection method equation A coection tem to give a bette estimate. 4

/8/18 Block Diagam of False Position Method Stat Choose and. Evaluate f() at endpoints. f f f f U U Calculate midpoint. U Move lowe bound. f f Evaluate f() at midpoint. f f f f Done! Calculate. f f f f U U U U Move uppe bound. f f U U Calculate change. old This is the only diffeence fom bisection method. no tol yes Done! 41 When False Position Fails The false position method can fail o ehibit etemely slow convegence when the function is highly nonlinea between the bounds. This happens because the estimated oot is a vey poo guess. Slide 4 1

/8/18 Notes on False Position Method Vey simila to bisection method Calculates a moe intelligent midpoint. Conveges much faste fo nea linea functions. Conveges slowe fo functions with abupt cuves 43 Multiple Roots 44

/8/18 Recognizing Numbe of Roots Single Root Sign changes on eithe side of oot. f f Slope at oot is not zeo. f Tiple Root Sign changes on eithe side of oot. f f Slope at oot is zeo. f Cuvatue changes on eithe side of oot. f f Double Root Sign is same on eithe side of oot. f f Slope at oot is zeo. f Cuvatue is same on eithe side of oot. f f Quaduple Root Sign is same on eithe side of oot. f f Slope at oot is zeo. f Cuvatue is same on eithe side of oot. f f Cuvatue is boad and flat. 45 Poblem with Multiple Roots Backeting methods equie a sign change on eithe side of the oot. This means they only wok fo odd multiple oots. double oot tiple oot WI NOT WORK Slide 46 3

/8/18 A Useful Popety We can define an auiliay function u() that will have the same oots as f() but will always change sign on eithe side of any multiple oot. f single oot u f f double oot tiple oot Slide 47 The Fi If f() has even multiple oots, pefom oot finding on the auiliay function u() instead. Slide 48 4