Root Finding and Optimization

Size: px
Start display at page:

Download "Root Finding and Optimization"

Transcription

1 Root Finding and Optimization Ramses van Zon SciNet, University o Toronto Scientiic Computing Lecture 11 February 11, 2014

2 Root Finding It is not uncommon in scientiic computing to want solve an equation numerically. I there is one unknown and one equation only, we can always write the equation as (x) = 0 I x satisies this equation, it is called a root. I there s a set o equations, one can write: 1 (x 1, x 2, x 3,... ) = 0 2 (x 1, x 2, x 3,... ) = 0 3 (x 1, x 2, x 3,... ) = 0... The one-dimensional case is considerably easier to solve: First.

3 1D root inding What s so nice about 1D? x Algorithms always start rom an initial guess and (usually) a bounding interval [a, b] in which the root is to be ound. I (a) and (b) have opposite signs, and is continuous, there must be a root inside the interval: the root is bracketed. Consecutive reinement o the interval until a b < ε guarranteed to ind the root.

4 Bracketing Must ind bounding interval irst. Strategies: Plot the unction. Make a conservative guess or [a, b] then slice up the interval, checking or sign change o. Make a wild guess and expand the interval until exhibits a sign change. Troublemakers No sign change Easily missed Singularity

5 Suppose we ve bracketed a root, what s next? Classic root inding algorithms Bisection Secant/False Position Ridders /Brent Newton-Raphson (requires derivatives) All o these zero in on the root, but have dierent convergence and stability characteristics. Note: For polynomial : specialized routines (Muller, Laguerre) For eigenvalue problems: specialized routines (linear algebra)

6 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 b 1

7 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 midpoint b 1

8 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 midpoint b 1

9 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 b 2 b 1

10 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 b 2 b 1

11 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 a 2 b 2 b 1

12 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 a 2 b 3 b 2 b 1

13 Bisection method Split the interval. Compute (midpoint). Get new root bracket. a 1 a 3 b 3 b 2 b 1

14 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 1

15 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 1

16 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 1

17 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 1

18 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 2 b 1

19 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 2 b 1

20 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 b 2 b 1

21 False Position Method Linearly interpolate. Solve or next x. Get new root bracket. a 1 a 2 b 2 b 1

22 Other non-derivate methods Secant: Like alse position, but keep most-recent point. Ridders method: uses an exponential it. Brent s method: uses an inverse quadratic it.

23 Newton-Raphson method Guess x. From unction and derivate, approximate root. Repeat. x 1

24 Newton-Raphson method Guess x. From unction and derivate, approximate root. Repeat. x 1

25 Newton-Raphson method Guess x. From unction and derivate, approximate root. Repeat. x x (x)/ (x) x 2 x 1

26 Newton-Raphson method Guess x. From unction and derivate, approximate root. Repeat. x x (x)/ (x) x 2 x 1

27 Newton-Raphson method Guess x. From unction and derivate, approximate root. Repeat. x x (x)/ (x) x 2 x 1

28 Newton-Raphson method Guess x. From unction and derivate, approximate root. Repeat. x x (x)/ (x) x 3 x 2 x 1

29 Convergence and Stability method convergence stability Bisection ɛ n+1 = 1 2 ɛ n Stable Secant ɛ n+1 = cɛ 1.6 n No bracket guarrantee False position ɛ n+1 = 1 2 ɛ n cɛn 1.6 Stable Ridders ɛ n+2 = cɛ 2 n Stable Brent ɛ n+1 = 1 2 ɛ n cɛ 2 n Stable Newton-Raphson ɛ n+1 = cɛ 2 n Can be unstable

30 GNU Scientiic Library (GSL) Is a C library containing many useul scientiic routines: Root inding Minimization Sorting Linear algebra, Eigen-systems Fast Fourier transorms Integration, dierentiation, interpolation, approximation Random numbers Statistics, histograms, itting Monte Carlo integration, simulated annealing ODEs Polynomials, permutations Special unctions Vectors, matrices

31 GSL root inding example #include <iostream> #include <gsl/gsl roots.h> struct Params { double v, w, a, b, c; }; double exampleunction(double x, void * param) { Params* p = (Params*)param; return p->a*cos(sin(p->v+p->w*x))+p->b*x-p->c*x*x; } int main() { double x lo = -4.0; double x hi = 5.0; Params args = {0.3, 2/3.0, 2.0, 1/1.3, 1/30.0}; gsl root solver* solver; gsl unction wrapper; solver=gsl root solver alloc(gsl root solver brent); wrapper.unction = exampleunction; wrapper.params = &args; gsl root solver set(solver, &wrapper, x lo, x hi);

32 GSL root inding example } std::cout << " iter [ lower, upper] root err\n"; int status = 1; or (int iter=0; status and iter < 100; ++iter) { gsl root solver iterate(solver); double x rt = gsl root solver root(solver); double x lo = gsl root solver x lower(solver); double x hi = gsl root solver x upper(solver); std::cout << iter << << x lo << << x hi << << x rt << << x hi - x lo << "\n"; status = gsl root test interval(x lo,x hi,0,0.001); } gsl root solver ree(solver); return status;

33 GSL root inding example } std::cout << " iter [ lower, upper] root err\n"; int status = 1; or (int iter=0; status and iter < 100; ++iter) { gsl root solver iterate(solver); double x rt = gsl root solver root(solver); double x lo = gsl root solver x lower(solver); double x hi = gsl root solver x upper(solver); std::cout << iter << << x lo << << x hi << << x rt << << x hi - x lo << "\n"; status = gsl root test interval(x lo,x hi,0,0.001); } gsl root solver ree(solver); return status; Compilation and likage: $ g++ -c -O2 -I GSLINCDIR gslrx.cc -o gslrx.o $ g++ gslrx.o -o gslrx -L GSLLIBDIR -lgsl -lgslcblas (speciy directories i installed in non-standard locations)

34 Multidimensional Root Finding ( x) = 0 or 1 (x 1, x 2, x 3,..., x D ) = 0 2 (x 1, x 2, x 3,..., x D ) = 0. D (x 1, x 2, x 3,..., x D ) = 0 Cannot bracket a root with a inite number o points. Roots o each equation deine a D 1 hypersurace. Looking or possible intersections o hypersuraces.

35 Newton-Raphson or Multidimensional Root Finding Given a good initial guess, Newton-Raphson can work in arbitrary dimensions: ( x 0 + δ x) = 0 ( x0 ) + x δ x = 0 ( x 0 ) = x δ x ( x 0 ) = J δ x δ x = J 1 ( x 0 ) Requires inverting a D D matrix, or at least, solving a linear set o equations: see lecture on linear algebra.

36 Convergence and Stability As in 1D, Newton-Raphson can be unstable. Need some sae guard that our iteration steps do not spin out o control. Several ways, e.g. make sure that ( x) 2 gets smaller in each time step. This can potentially still ail, but usually does the trick.

37 Optimization

38 Optimization Optimization=Minimization=Maximization There s a unction (x 1, x 2,,..., x D ). Want to know or which set o x 1, x 2,... the unction is at its minimum. Maximizing is minimizing. Dierent rom solving / x i = 0 because o integration properties. Once more, D = 1 is substantially dierent rom higher dimensional cases. There s no guarantee that we ind the global minimum, methods return local minimums.

39 1D Minimization Strategy x Local minimum: smallest unction value in its neighbourhood. Global minimum: smallest such unction value or all x. Generalize bracketing to minimization. a, b, c bracket a minimum o i (a) > (b) < (c) Once a minimum is bracketed, we can successively reine the brackets.

40 Minimization Methods or 1D Golden Section Method Choose the larger o the intervals [a, b] and [b, c]. Place a new point d a raction w into the larger interval. New triplet is succession o points bracketing the minimum. Optimal choice or w = 1 2 (3 5) x Brent s Method Uses a quadratic interpolation using the three points, to ind a new point. All o these are in the GSL library.

41 Finding the global minimum There s no guarantee that we ind the global minimum, methods return local minima. I we re not sure: Essentially try again rom a dierent starting points, and check which o the ound minima is the lowest. Some methods, especially those using random numbers like simulated annealing, have ways o escaping local minima.

42 Multidimensional Minimization No bracketing method available Not as dire as multi-dimensional root inding: down is down, so as local as the unction is bounded rom below, you re likely to ind at least a local minimum. Common strategy Most methods are built upon 1D methods. Start rom a trial point P Perorm one dimensional minimizations in D independent directions Hope or the best. Test or convergence.

43 Finding independent directions Just choosing D directions will lead to staircase scenario. It might get to the minimum eventually, but requires a lot o small 1d minimizations to do so.

44 Finding independent directions Non-gradient based direction sets Use previous 1D minimization to guide the choice o direction sets. Powell s Methods Gradient based direction sets This one uses the derivatives to determine in which D directions to go next. Steepest Descent It may seem like a good idea just to go in the direction o the gradient: steepest descent. But you would have to take many straight turns. Conjugate Gradient. Essentially, you re solving the system as i it is quadratic. Better. All o these are in the GSL library.

45 Simulated Annealing All o these methods have trouble with unctions that have (many) local minima. Let s look or inspiration in Nature. Why? Nature is a very good minimizer. For instance, when temperature drops below 0 o C, water molecules ind a new low energy coniguration, which any o our previous minimization methods would have a tough time inding: D = O(10 23 ). The mechanism behind this is that while the temperature drops, the molecules are constantly moving in and out o local mimima, thus exploring much more o conigurational space.

46 Simulated Annealing Ok, so how does that help us? D dimensional space becomes a coniguration space. becomes an energy unction or the system. We assign the system a temperature T. We assign the system a dynamics that is such that the equilibrium distribution o conigurations is P( x) e ( x)/t E.g. use the Monte Carlo method rom last week s lecture! Evolve this system with given dynamics, but rom time to time, we reduce the temperature T. As T 0 the system will get trapped in a minimum. I we anneal slow enough, there s a good chance it s the global minimum.

47 Simulated Annealing x

48 Simulated Annealing x

49 Simulated Annealing x

50 Simulated Annealing x

51 Simulated Annealing x

52 Simulated Annealing Final notes Typically does not converge as ast as the deterministic ones. But applicable in many hard cases (travelling salesman). GSL has it too.

(One Dimension) Problem: for a function f(x), find x 0 such that f(x 0 ) = 0. f(x)

(One Dimension) Problem: for a function f(x), find x 0 such that f(x 0 ) = 0. f(x) Solving Nonlinear Equations & Optimization One Dimension Problem: or a unction, ind 0 such that 0 = 0. 0 One Root: The Bisection Method This one s guaranteed to converge at least to a singularity, i not

More information

Today. Introduction to optimization Definition and motivation 1-dimensional methods. Multi-dimensional methods. General strategies, value-only methods

Today. Introduction to optimization Definition and motivation 1-dimensional methods. Multi-dimensional methods. General strategies, value-only methods Optimization Last time Root inding: deinition, motivation Algorithms: Bisection, alse position, secant, Newton-Raphson Convergence & tradeos Eample applications o Newton s method Root inding in > 1 dimension

More information

Lecture 8 Optimization

Lecture 8 Optimization 4/9/015 Lecture 8 Optimization EE 4386/5301 Computational Methods in EE Spring 015 Optimization 1 Outline Introduction 1D Optimization Parabolic interpolation Golden section search Newton s method Multidimensional

More information

Finding roots. Lecture 4

Finding roots. Lecture 4 Finding roots Lecture 4 Finding roots: Find such that 0 or given. Bisection method: The intermediate value theorem states the obvious: i a continuous unction changes sign within a given interval, it has

More information

Lecture 7: Minimization or maximization of functions (Recipes Chapter 10)

Lecture 7: Minimization or maximization of functions (Recipes Chapter 10) Lecture 7: Minimization or maximization of functions (Recipes Chapter 10) Actively studied subject for several reasons: Commonly encountered problem: e.g. Hamilton s and Lagrange s principles, economics

More information

Lecture 35 Minimization and maximization of functions. Powell s method in multidimensions Conjugate gradient method. Annealing methods.

Lecture 35 Minimization and maximization of functions. Powell s method in multidimensions Conjugate gradient method. Annealing methods. Lecture 35 Minimization and maximization of functions Powell s method in multidimensions Conjugate gradient method. Annealing methods. We know how to minimize functions in one dimension. If we start at

More information

Roots of equations, minimization, numerical integration

Roots of equations, minimization, numerical integration Roots of equations, minimization, numerical integration Alexander Khanov PHYS6260: Experimental Methods is HEP Oklahoma State University November 1, 2017 Roots of equations Find the roots solve equation

More information

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

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

More information

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Taylor s Theorem Can often approximate a function by a polynomial The error in the approximation

More information

Numerical Methods I Solving Nonlinear Equations

Numerical Methods I Solving Nonlinear Equations Numerical Methods I Solving Nonlinear Equations Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 October 16th, 2014 A. Donev (Courant Institute)

More information

Root Finding and Optimization

Root Finding and Optimization Root Finding and Optimization Root finding, solving equations, and optimization are very closely related subjects, which occur often in practical applications. Root finding : f (x) = 0 Solve for x Equation

More information

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers To sample a function in a statistically controlled manner (i.e. for Monte Carlo integration)

More information

Nonlinear Equations. Not guaranteed to have any real solutions, but generally do for astrophysical problems.

Nonlinear Equations. Not guaranteed to have any real solutions, but generally do for astrophysical problems. Nonlinear Equations Often (most of the time??) the relevant system of equations is not linear in the unknowns. Then, cannot decompose as Ax = b. Oh well. Instead write as: (1) f(x) = 0 function of one

More information

Scientific Computing. Roots of Equations

Scientific Computing. Roots of Equations ECE257 Numerical Methods and Scientific Computing Roots of Equations Today s s class: Roots of Equations Polynomials Polynomials A polynomial is of the form: ( x) = a 0 + a 1 x + a 2 x 2 +L+ a n x n f

More information

Quasi-Newton Methods

Quasi-Newton Methods Newton s Method Pros and Cons Quasi-Newton Methods MA 348 Kurt Bryan Newton s method has some very nice properties: It s extremely fast, at least once it gets near the minimum, and with the simple modifications

More information

Lecture 34 Minimization and maximization of functions

Lecture 34 Minimization and maximization of functions Lecture 34 Minimization and maximization of functions Introduction Golden section search Parabolic interpolation Search with first derivatives Downhill simplex method Introduction In a nutshell, you are

More information

Newton-Raphson. Relies on the Taylor expansion f(x + δ) = f(x) + δ f (x) + ½ δ 2 f (x) +..

Newton-Raphson. Relies on the Taylor expansion f(x + δ) = f(x) + δ f (x) + ½ δ 2 f (x) +.. 2008 Lecture 7 starts here Newton-Raphson When the derivative of f(x) is known, and when f(x) is well behaved, the celebrated (and ancient) Newton- Raphson method gives the fastest convergence of all (

More information

Roots of Equations. ITCS 4133/5133: Introduction to Numerical Methods 1 Roots of Equations

Roots of Equations. ITCS 4133/5133: Introduction to Numerical Methods 1 Roots of Equations Roots of Equations Direct Search, Bisection Methods Regula Falsi, Secant Methods Newton-Raphson Method Zeros of Polynomials (Horner s, Muller s methods) EigenValue Analysis ITCS 4133/5133: Introduction

More information

Topic 4b. Open Methods for Root Finding

Topic 4b. Open Methods for Root Finding Course Instructor Dr. Ramond C. Rump Oice: A 337 Phone: (915) 747 6958 E Mail: rcrump@utep.edu Topic 4b Open Methods or Root Finding EE 4386/5301 Computational Methods in EE Outline Open Methods or Root

More information

ECE 595, Section 10 Numerical Simulations Lecture 7: Optimization and Eigenvalues. Prof. Peter Bermel January 23, 2013

ECE 595, Section 10 Numerical Simulations Lecture 7: Optimization and Eigenvalues. Prof. Peter Bermel January 23, 2013 ECE 595, Section 10 Numerical Simulations Lecture 7: Optimization and Eigenvalues Prof. Peter Bermel January 23, 2013 Outline Recap from Friday Optimization Methods Brent s Method Golden Section Search

More information

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that Chapter 4 Nonlinear equations 4.1 Root finding Consider the problem of solving any nonlinear relation g(x) = h(x) in the real variable x. We rephrase this problem as one of finding the zero (root) of a

More information

Example - Newton-Raphson Method

Example - Newton-Raphson Method Eample - Newton-Raphson Method We now consider the following eample: minimize f( 3 3 + -- 4 4 Since f ( 3 2 + 3 3 and f ( 6 + 9 2 we form the following iteration: + n 3 ( n 3 3( n 2 ------------------------------------

More information

Exploring the energy landscape

Exploring the energy landscape Exploring the energy landscape ChE210D Today's lecture: what are general features of the potential energy surface and how can we locate and characterize minima on it Derivatives of the potential energy

More information

Root Finding Methods

Root Finding Methods Root Finding Methods Let's take a simple problem ax 2 +bx+c=0 Can calculate roots using the quadratic equation or just by factoring Easy and does not need any numerical methods How about solving for the

More information

Lab on Taylor Polynomials. This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor.

Lab on Taylor Polynomials. This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor. Lab on Taylor Polynomials This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor. In this Lab we will approimate complicated unctions by simple unctions. The

More information

Practical Numerical Methods in Physics and Astronomy. Lecture 5 Optimisation and Search Techniques

Practical Numerical Methods in Physics and Astronomy. Lecture 5 Optimisation and Search Techniques Practical Numerical Methods in Physics and Astronomy Lecture 5 Optimisation and Search Techniques Pat Scott Department of Physics, McGill University January 30, 2013 Slides available from http://www.physics.mcgill.ca/

More information

CHAPTER 4 ROOTS OF EQUATIONS

CHAPTER 4 ROOTS OF EQUATIONS CHAPTER 4 ROOTS OF EQUATIONS Chapter 3 : TOPIC COVERS (ROOTS OF EQUATIONS) Definition of Root of Equations Bracketing Method Graphical Method Bisection Method False Position Method Open Method One-Point

More information

Computational Methods. Solving Equations

Computational Methods. Solving Equations Computational Methods Solving Equations Manfred Huber 2010 1 Solving Equations Solving scalar equations is an elemental task that arises in a wide range of applications Corresponds to finding parameters

More information

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0. 3.1 Introduction Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x 3 +1.5x 1.5 =0, tan x x =0. Practical existence test for roots: by intermediate value theorem, f C[a, b] & f(a)f(b)

More information

Numerical optimization

Numerical optimization THE UNIVERSITY OF WESTERN ONTARIO LONDON ONTARIO Paul Klein Office: SSC 408 Phone: 661-111 ext. 857 Email: paul.klein@uwo.ca URL: www.ssc.uwo.ca/economics/faculty/klein/ Numerical optimization In these

More information

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane. Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 3 Lecture 3 3.1 General remarks March 4, 2018 This

More information

by Martin Mendez, UASLP Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

by Martin Mendez, UASLP Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 by Martin Mendez, 1 Roots of Equations Part Why? b m b a + b + c = 0 = aa 4ac But a 5 4 3 + b + c + d + e + f = 0 sin + = 0 =? =? by Martin Mendez, Nonlinear Equation Solvers Bracketing Graphical

More information

8. INTRODUCTION TO STATISTICAL THERMODYNAMICS

8. INTRODUCTION TO STATISTICAL THERMODYNAMICS n * D n d Fluid z z z FIGURE 8-1. A SYSTEM IS IN EQUILIBRIUM EVEN IF THERE ARE VARIATIONS IN THE NUMBER OF MOLECULES IN A SMALL VOLUME, SO LONG AS THE PROPERTIES ARE UNIFORM ON A MACROSCOPIC SCALE 8. INTRODUCTION

More information

Roberto s Notes on Differential Calculus Chapter 8: Graphical analysis Section 1. Extreme points

Roberto s Notes on Differential Calculus Chapter 8: Graphical analysis Section 1. Extreme points Roberto s Notes on Dierential Calculus Chapter 8: Graphical analysis Section 1 Extreme points What you need to know already: How to solve basic algebraic and trigonometric equations. All basic techniques

More information

Contents. Preface to the Third Edition (2007) Preface to the Second Edition (1992) Preface to the First Edition (1985) License and Legal Information

Contents. Preface to the Third Edition (2007) Preface to the Second Edition (1992) Preface to the First Edition (1985) License and Legal Information Contents Preface to the Third Edition (2007) Preface to the Second Edition (1992) Preface to the First Edition (1985) License and Legal Information xi xiv xvii xix 1 Preliminaries 1 1.0 Introduction.............................

More information

Chapter 4. Unconstrained optimization

Chapter 4. Unconstrained optimization Chapter 4. Unconstrained optimization Version: 28-10-2012 Material: (for details see) Chapter 11 in [FKS] (pp.251-276) A reference e.g. L.11.2 refers to the corresponding Lemma in the book [FKS] PDF-file

More information

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes) AMSC/CMSC 460 Computational Methods, Fall 2007 UNIT 5: Nonlinear Equations Dianne P. O Leary c 2001, 2002, 2007 Solving Nonlinear Equations and Optimization Problems Read Chapter 8. Skip Section 8.1.1.

More information

8 Numerical methods for unconstrained problems

8 Numerical methods for unconstrained problems 8 Numerical methods for unconstrained problems Optimization is one of the important fields in numerical computation, beside solving differential equations and linear systems. We can see that these fields

More information

Optimization Methods via Simulation

Optimization Methods via Simulation Optimization Methods via Simulation Optimization problems are very important in science, engineering, industry,. Examples: Traveling salesman problem Circuit-board design Car-Parrinello ab initio MD Protein

More information

Extreme Values of Functions

Extreme Values of Functions Extreme Values o Functions When we are using mathematics to model the physical world in which we live, we oten express observed physical quantities in terms o variables. Then, unctions are used to describe

More information

Optimization. Totally not complete this is...don't use it yet...

Optimization. Totally not complete this is...don't use it yet... Optimization Totally not complete this is...don't use it yet... Bisection? Doing a root method is akin to doing a optimization method, but bi-section would not be an effective method - can detect sign

More information

Scattered Data Approximation of Noisy Data via Iterated Moving Least Squares

Scattered Data Approximation of Noisy Data via Iterated Moving Least Squares Scattered Data Approximation o Noisy Data via Iterated Moving Least Squares Gregory E. Fasshauer and Jack G. Zhang Abstract. In this paper we ocus on two methods or multivariate approximation problems

More information

22 Path Optimisation Methods

22 Path Optimisation Methods 22 Path Optimisation Methods 204 22 Path Optimisation Methods Many interesting chemical and physical processes involve transitions from one state to another. Typical examples are migration paths for defects

More information

Introduction to Scientific Computing

Introduction to Scientific Computing Introduction to Scientific Computing Benson Muite benson.muite@ut.ee http://kodu.ut.ee/ benson https://courses.cs.ut.ee/2018/isc/spring 26 March 2018 [Public Domain,https://commons.wikimedia.org/wiki/File1

More information

GENG2140, S2, 2012 Week 7: Curve fitting

GENG2140, S2, 2012 Week 7: Curve fitting GENG2140, S2, 2012 Week 7: Curve fitting Curve fitting is the process of constructing a curve, or mathematical function, f(x) that has the best fit to a series of data points Involves fitting lines and

More information

Math Review and Lessons in Calculus

Math Review and Lessons in Calculus Math Review and Lessons in Calculus Agenda Rules o Eponents Functions Inverses Limits Calculus Rules o Eponents 0 Zero Eponent Rule a * b ab Product Rule * 3 5 a / b a-b Quotient Rule 5 / 3 -a / a Negative

More information

Optimization. Next: Curve Fitting Up: Numerical Analysis for Chemical Previous: Linear Algebraic and Equations. Subsections

Optimization. Next: Curve Fitting Up: Numerical Analysis for Chemical Previous: Linear Algebraic and Equations. Subsections Next: Curve Fitting Up: Numerical Analysis for Chemical Previous: Linear Algebraic and Equations Subsections One-dimensional Unconstrained Optimization Golden-Section Search Quadratic Interpolation Newton's

More information

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

Report due date. Please note: report has to be handed in by Monday, May 16 noon.

Report due date. Please note: report has to be handed in by Monday, May 16 noon. Lecture 23 18.86 Report due date Please note: report has to be handed in by Monday, May 16 noon. Course evaluation: Please submit your feedback (you should have gotten an email) From the weak form to finite

More information

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu

More information

Applied Mathematics Letters. Combined bracketing methods for solving nonlinear equations

Applied Mathematics Letters. Combined bracketing methods for solving nonlinear equations Applied Mathematics Letters 5 (01) 1755 1760 Contents lists available at SciVerse ScienceDirect Applied Mathematics Letters journal homepage: www.elsevier.com/locate/aml Combined bracketing methods for

More information

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods Numerical Methods - Lecture 1 Numerical Methods Lecture. Analysis o errors in numerical methods Numerical Methods - Lecture Why represent numbers in loating point ormat? Eample 1. How a number 56.78 can

More information

Nonlinear Equations. Chapter The Bisection Method

Nonlinear Equations. Chapter The Bisection Method Chapter 6 Nonlinear Equations Given a nonlinear function f(), a value r such that f(r) = 0, is called a root or a zero of f() For eample, for f() = e 016064, Fig?? gives the set of points satisfying y

More information

Controlling the Heat Flux Distribution by Changing the Thickness of Heated Wall

Controlling the Heat Flux Distribution by Changing the Thickness of Heated Wall J. Basic. Appl. Sci. Res., 2(7)7270-7275, 2012 2012, TextRoad Publication ISSN 2090-4304 Journal o Basic and Applied Scientiic Research www.textroad.com Controlling the Heat Flux Distribution by Changing

More information

CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares

CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares Robert Bridson October 29, 2008 1 Hessian Problems in Newton Last time we fixed one of plain Newton s problems by introducing line search

More information

Design and Optimization of Energy Systems Prof. C. Balaji Department of Mechanical Engineering Indian Institute of Technology, Madras

Design and Optimization of Energy Systems Prof. C. Balaji Department of Mechanical Engineering Indian Institute of Technology, Madras Design and Optimization of Energy Systems Prof. C. Balaji Department of Mechanical Engineering Indian Institute of Technology, Madras Lecture - 09 Newton-Raphson Method Contd We will continue with our

More information

(C) The rationals and the reals as linearly ordered sets. Contents. 1 The characterizing results

(C) The rationals and the reals as linearly ordered sets. Contents. 1 The characterizing results (C) The rationals and the reals as linearly ordered sets We know that both Q and R are something special. When we think about about either o these we usually view it as a ield, or at least some kind o

More information

PARTIAL DIFFERENTIAL EQUATIONS

PARTIAL DIFFERENTIAL EQUATIONS MATHEMATICAL METHODS PARTIAL DIFFERENTIAL EQUATIONS I YEAR B.Tech By Mr. Y. Prabhaker Reddy Asst. Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad. SYLLABUS OF MATHEMATICAL

More information

Bindel, 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.

Bindel, 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 information

Project: Vibration of Diatomic Molecules

Project: Vibration of Diatomic Molecules Project: Vibration of Diatomic Molecules Objective: Find the vibration energies and the corresponding vibrational wavefunctions of diatomic molecules H 2 and I 2 using the Morse potential. equired Numerical

More information

Constrained optimization. Unconstrained optimization. One-dimensional. Multi-dimensional. Newton with equality constraints. Active-set method.

Constrained optimization. Unconstrained optimization. One-dimensional. Multi-dimensional. Newton with equality constraints. Active-set method. Optimization Unconstrained optimization One-dimensional Multi-dimensional Newton s method Basic Newton Gauss- Newton Quasi- Newton Descent methods Gradient descent Conjugate gradient Constrained optimization

More information

The Steepest Descent Algorithm for Unconstrained Optimization

The Steepest Descent Algorithm for Unconstrained Optimization The Steepest Descent Algorithm for Unconstrained Optimization Robert M. Freund February, 2014 c 2014 Massachusetts Institute of Technology. All rights reserved. 1 1 Steepest Descent Algorithm The problem

More information

Statistics 580 Optimization Methods

Statistics 580 Optimization Methods Statistics 580 Optimization Methods Introduction Let fx be a given real-valued function on R p. The general optimization problem is to find an x ɛ R p at which fx attain a maximum or a minimum. It is of

More information

On High-Rate Cryptographic Compression Functions

On High-Rate Cryptographic Compression Functions On High-Rate Cryptographic Compression Functions Richard Ostertág and Martin Stanek Department o Computer Science Faculty o Mathematics, Physics and Inormatics Comenius University Mlynská dolina, 842 48

More information

CISE-301: Numerical Methods Topic 1:

CISE-301: Numerical Methods Topic 1: CISE-3: Numerical Methods Topic : Introduction to Numerical Methods and Taylor Series Lectures -4: KFUPM Term 9 Section 8 CISE3_Topic KFUPM - T9 - Section 8 Lecture Introduction to Numerical Methods What

More information

Nonlinear Optimization

Nonlinear Optimization Nonlinear Optimization (Com S 477/577 Notes) Yan-Bin Jia Nov 7, 2017 1 Introduction Given a single function f that depends on one or more independent variable, we want to find the values of those variables

More information

Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods

Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods So welcome to the next lecture of the 2 nd unit of this

More information

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45 Two hours MATH20602 To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER NUMERICAL ANALYSIS 1 29 May 2015 9:45 11:45 Answer THREE of the FOUR questions. If more

More information

Numerical Methods. Roots of Equations

Numerical Methods. Roots of Equations Roots of Equations by Norhayati Rosli & Nadirah Mohd Nasir Faculty of Industrial Sciences & Technology norhayati@ump.edu.my, nadirah@ump.edu.my Description AIMS This chapter is aimed to compute the root(s)

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter 5 Nonlinear Equations Copyright c 2001 Reproduction permitted only for noncommercial, educational

More information

Curve Sketching. The process of curve sketching can be performed in the following steps:

Curve Sketching. The process of curve sketching can be performed in the following steps: Curve Sketching So ar you have learned how to ind st and nd derivatives o unctions and use these derivatives to determine where a unction is:. Increasing/decreasing. Relative extrema 3. Concavity 4. Points

More information

Single Variable Minimization

Single Variable Minimization AA222: MDO 37 Sunday 1 st April, 2012 at 19:48 Chapter 2 Single Variable Minimization 2.1 Motivation Most practical optimization problems involve many variables, so the study of single variable minimization

More information

Review for Exam 2 Ben Wang and Mark Styczynski

Review for Exam 2 Ben Wang and Mark Styczynski Review for Exam Ben Wang and Mark Styczynski This is a rough approximation of what we went over in the review session. This is actually more detailed in portions than what we went over. Also, please note

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

More information

Numerical Analysis Fall. Roots: Open Methods

Numerical Analysis Fall. Roots: Open Methods Numerical Analysis 2015 Fall Roots: Open Methods Open Methods Open methods differ from bracketing methods, in that they require only a single starting value or two starting values that do not necessarily

More information

MATH 350: Introduction to Computational Mathematics

MATH 350: Introduction to Computational Mathematics MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu

More information

Lecture 8. Root finding II

Lecture 8. Root finding II 1 Introduction Lecture 8 Root finding II In the previous lecture we considered the bisection root-bracketing algorithm. It requires only that the function be continuous and that we have a root bracketed

More information

Line Search Techniques

Line Search Techniques Multidisciplinary Design Optimization 33 Chapter 2 Line Search Techniques 2.1 Introduction Most practical optimization problems involve many variables, so the study of single variable minimization may

More information

Consider the function f(x, y). Recall that we can approximate f(x, y) with a linear function in x and y:

Consider the function f(x, y). Recall that we can approximate f(x, y) with a linear function in x and y: Taylor s Formula Consider the unction (x, y). Recall that we can approximate (x, y) with a linear unction in x and y: (x, y) (a, b)+ x (a, b)(x a)+ y (a, b)(y b) Notice that again this is just a linear

More information

APPENDIX 1 ERROR ESTIMATION

APPENDIX 1 ERROR ESTIMATION 1 APPENDIX 1 ERROR ESTIMATION Measurements are always subject to some uncertainties no matter how modern and expensive equipment is used or how careully the measurements are perormed These uncertainties

More information

Numerical Optimization

Numerical Optimization Numerical Optimization Unit 2: Multivariable optimization problems Che-Rung Lee Scribe: February 28, 2011 (UNIT 2) Numerical Optimization February 28, 2011 1 / 17 Partial derivative of a two variable function

More information

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Multidimensional Unconstrained Optimization Suppose we have a function f() of more than one

More information

Solving Non-Linear Equations (Root Finding)

Solving Non-Linear Equations (Root Finding) Solving Non-Linear Equations (Root Finding) Root finding Methods What are root finding methods? Methods for determining a solution of an equation. Essentially finding a root of a function, that is, a zero

More information

Problem Set. Problems on Unordered Summation. Math 5323, Fall Februray 15, 2001 ANSWERS

Problem Set. Problems on Unordered Summation. Math 5323, Fall Februray 15, 2001 ANSWERS Problem Set Problems on Unordered Summation Math 5323, Fall 2001 Februray 15, 2001 ANSWERS i 1 Unordered Sums o Real Terms In calculus and real analysis, one deines the convergence o an ininite series

More information

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation Course Notes for EE7C (Spring 018): Convex Optimization and Approximation Instructor: Moritz Hardt Email: hardt+ee7c@berkeley.edu Graduate Instructor: Max Simchowitz Email: msimchow+ee7c@berkeley.edu October

More information

Notes on Some Methods for Solving Linear Systems

Notes on Some Methods for Solving Linear Systems Notes on Some Methods for Solving Linear Systems Dianne P. O Leary, 1983 and 1999 and 2007 September 25, 2007 When the matrix A is symmetric and positive definite, we have a whole new class of algorithms

More information

Program : M.A./M.Sc. (Mathematics) M.A./M.Sc. (Final) Paper Code:MT-08 Numerical Analysis Section A (Very Short Answers Questions)

Program : M.A./M.Sc. (Mathematics) M.A./M.Sc. (Final) Paper Code:MT-08 Numerical Analysis Section A (Very Short Answers Questions) Program : M../M.Sc. (Mathematics) M../M.Sc. (Final) Paper Code:MT-08 Numerical nalysis Section (Very Short nswers Questions) 1. Write two examples of transcendental equations. (i) x 3 + sin x = 0 (ii)

More information

Chapter 6: Derivative-Based. optimization 1

Chapter 6: Derivative-Based. optimization 1 Chapter 6: Derivative-Based Optimization Introduction (6. Descent Methods (6. he Method of Steepest Descent (6.3 Newton s Methods (NM (6.4 Step Size Determination (6.5 Nonlinear Least-Squares Problems

More information

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations Methods for Systems of Methods for Systems of Outline Scientific Computing: An Introductory Survey Chapter 5 1 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

Applied Numerical Analysis

Applied Numerical Analysis Applied Numerical Analysis Using MATLAB Second Edition Laurene V. Fausett Texas A&M University-Commerce PEARSON Prentice Hall Upper Saddle River, NJ 07458 Contents Preface xi 1 Foundations 1 1.1 Introductory

More information

Unconstrained optimization I Gradient-type methods

Unconstrained optimization I Gradient-type methods Unconstrained optimization I Gradient-type methods Antonio Frangioni Department of Computer Science University of Pisa www.di.unipi.it/~frangio frangio@di.unipi.it Computational Mathematics for Learning

More information

Numerical Solution of Ordinary Differential Equations in Fluctuationlessness Theorem Perspective

Numerical Solution of Ordinary Differential Equations in Fluctuationlessness Theorem Perspective Numerical Solution o Ordinary Dierential Equations in Fluctuationlessness Theorem Perspective NEJLA ALTAY Bahçeşehir University Faculty o Arts and Sciences Beşiktaş, İstanbul TÜRKİYE TURKEY METİN DEMİRALP

More information

18-660: Numerical Methods for Engineering Design and Optimization

18-660: Numerical Methods for Engineering Design and Optimization 8-66: Numerical Methods or Engineering Design and Optimization Xin Li Department o ECE Carnegie Mellon University Pittsburgh, PA 53 Slide Overview Linear Regression Ordinary least-squares regression Minima

More information

MATHEMATICAL METHODS INTERPOLATION

MATHEMATICAL METHODS INTERPOLATION MATHEMATICAL METHODS INTERPOLATION I YEAR BTech By Mr Y Prabhaker Reddy Asst Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad SYLLABUS OF MATHEMATICAL METHODS (as per JNTU

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 5 Nonlinear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

Numerical Methods. Root Finding

Numerical Methods. Root Finding Numerical Methods Solving Non Linear 1-Dimensional Equations Root Finding Given a real valued function f of one variable (say ), the idea is to find an such that: f() 0 1 Root Finding Eamples Find real

More information

NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable

NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable Dr. Niket Kaisare Department of Chemical Engineering IIT Madras NPTEL Course: MATLAB Programming for Numerical Computations

More information

Numerical Methods for Engineers

Numerical Methods for Engineers Numerical Methods for Engineers SEVENTH EDITION Steven C Chopra Berger Chair in Computing and Engineering Tufts University Raymond P. Canal Professor Emeritus of Civil Engineering of Michiaan University

More information

Syllabus Objective: 2.9 The student will sketch the graph of a polynomial, radical, or rational function.

Syllabus Objective: 2.9 The student will sketch the graph of a polynomial, radical, or rational function. Precalculus Notes: Unit Polynomial Functions Syllabus Objective:.9 The student will sketch the graph o a polynomial, radical, or rational unction. Polynomial Function: a unction that can be written in

More information

Analysis Methods in Atmospheric and Oceanic Science

Analysis Methods in Atmospheric and Oceanic Science Analysis Methods in Atmospheric and Oceanic Science Copyright 2016 University of Maryland. 1 AOSC 652 Root Finding & Function Minimization Week 7, Day 2 12 Oct 2016 2 Method #3: Newton-Raphson Root is

More information