Chapter 4: Root Finding

Similar documents
Review of Taylor Series. Read Section 1.2

Lecture 2 Solution of Nonlinear Equations ( Root Finding Problems )

: Numerical Analysis Topic 2: Solution of Nonlinear Equations Lectures 5-11:

NUMERICAL DIFFERENTIATION

Chapter Newton s Method

Newton s Method for One - Dimensional Optimization - Theory

APPENDIX A Some Linear Algebra

CISE301: Numerical Methods Topic 2: Solution of Nonlinear Equations

Chapter 12. Ordinary Differential Equation Boundary Value (BV) Problems

Summary with Examples for Root finding Methods -Bisection -Newton Raphson -Secant

Formal solvers of the RT equation

Nice plotting of proteins II

Bezier curves. Michael S. Floater. August 25, These notes provide an introduction to Bezier curves. i=0

( ) [ ( k) ( k) ( x) ( ) ( ) ( ) [ ] ξ [ ] [ ] [ ] ( )( ) i ( ) ( )( ) 2! ( ) = ( ) 3 Interpolation. Polynomial Approximation.

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:

Learning Theory: Lecture Notes

2 Finite difference basics

Lecture 10 Support Vector Machines II

Additional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty

Numerical Solution of Ordinary Differential Equations

Lecture 13 APPROXIMATION OF SECOMD ORDER DERIVATIVES

CHAPTER 4d. ROOTS OF EQUATIONS

Lecture Notes on Linear Regression

2. PROBLEM STATEMENT AND SOLUTION STRATEGIES. L q. Suppose that we have a structure with known geometry (b, h, and L) and material properties (EA).

A Hybrid Variational Iteration Method for Blasius Equation

Errors for Linear Systems

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Lecture 21: Numerical methods for pricing American type derivatives

Lecture 5.8 Flux Vector Splitting

DUE: WEDS FEB 21ST 2018

The Geometry of Logit and Probit

Lecture 12: Discrete Laplacian

APPROXIMATE PRICES OF BASKET AND ASIAN OPTIONS DUPONT OLIVIER. Premia 14

EEE 241: Linear Systems

6. Stochastic processes (2)

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

6. Stochastic processes (2)

Calculation of time complexity (3%)

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur

Module 14: THE INTEGRAL Exploring Calculus

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

Implicit Integration Henyey Method

Problem Set 9 Solutions

MMA and GCMMA two methods for nonlinear optimization

Bézier curves. Michael S. Floater. September 10, These notes provide an introduction to Bézier curves. i=0

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

Numerical Algorithms for Visual Computing 2008/09 Example Solutions for Assignment 4. Problem 1 (Shift invariance of the Laplace operator)

8.1 Arc Length. What is the length of a curve? How can we approximate it? We could do it following the pattern we ve used before

Differentiating Gaussian Processes

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

A MODIFIED METHOD FOR SOLVING SYSTEM OF NONLINEAR EQUATIONS

The Fourier Transform

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

Lecture 5 Decoding Binary BCH Codes

Application of B-Spline to Numerical Solution of a System of Singularly Perturbed Problems

Georgia Tech PHYS 6124 Mathematical Methods of Physics I

Complex Numbers Alpha, Round 1 Test #123

ALGORITHM FOR THE CALCULATION OF THE TWO VARIABLES CUBIC SPLINE FUNCTION

Expectation propagation

polynomial interpolation a x

Single Variable Optimization

Beyond Zudilin s Conjectured q-analog of Schmidt s problem

Numerical Methods Solution of Nonlinear Equations

Continuous Time Markov Chains

IV. Performance Optimization

Report on Image warping

Modelli Clamfim Equazioni differenziali 7 ottobre 2013

Supplement: Proofs and Technical Details for The Solution Path of the Generalized Lasso

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

Outlet temperature of a WGS reactor (Stage I) for the conversion of CO, applied for the abatement of CO to a fixed value.

Calculus of Variations Basics

Grover s Algorithm + Quantum Zeno Effect + Vaidman

One-sided finite-difference approximations suitable for use with Richardson extrapolation

Numerical Heat and Mass Transfer

Chapter - 2. Distribution System Power Flow Analysis

ME 501A Seminar in Engineering Analysis Page 1

Haar wavelet collocation method to solve problems arising in induction motor

Some modelling aspects for the Matlab implementation of MMA

is the calculated value of the dependent variable at point i. The best parameters have values that minimize the squares of the errors

Generalized Linear Methods

ρ some λ THE INVERSE POWER METHOD (or INVERSE ITERATION) , for , or (more usually) to

On the set of natural numbers

Société de Calcul Mathématique SA

Lecture 2: Numerical Methods for Differentiations and Integrations

Linear, affine, and convex sets and hulls In the sequel, unless otherwise specified, X will denote a real vector space.

Optimization. September 4, 2018

General viscosity iterative method for a sequence of quasi-nonexpansive mappings

The Finite Element Method: A Short Introduction

Department of Quantitative Methods & Information Systems. Time Series and Their Components QMIS 320. Chapter 6

Section 3.6 Complex Zeros

Some Comments on Accelerating Convergence of Iterative Sequences Using Direct Inversion of the Iterative Subspace (DIIS)

Modelli Clamfim Equazioni differenziali 22 settembre 2016

The Study of Teaching-learning-based Optimization Algorithm

σ τ τ τ σ τ τ τ σ Review Chapter Four States of Stress Part Three Review Review

Numerical Solution of One-Dimensional Heat and Wave Equation by Non-Polynomial Quintic Spline

8 : Learning in Fully Observed Markov Networks. 1 Why We Need to Learn Undirected Graphical Models. 2 Structural Learning for Completely Observed MRF

Global Sensitivity. Tuesday 20 th February, 2018

Prof. Dr. I. Nasser Phys 630, T Aug-15 One_dimensional_Ising_Model

Transcription:

Chapter 4: Root Fndng Startng values Closed nterval methods (roots are search wthn an nterval o Bsecton Open methods (no nterval o Fxed Pont o Newton-Raphson o Secant Method Repeated roots Zeros of Hgher-Dmensonal Functons MATLAB routnes

4. Introducton Roots are solutons for solvng f( x = 0. We can dstngush: Closed methods o convergence guaranteed Open methods o Dvergence may occur o f convergence occurs, t s usually faster (rate s hgher To approxmate a root, the startng value s mportant: f possble, frst draw a graph feval(f,x,,xn: evaluates functon f n the ponts x,,xn,.e. f(x,,f(xn Ex. feval('sn',0.3 sn(0.3 or feval('mycode',0.,0.3 mycode(0.,0.3

4. Startng Values Userfn.m functon [value] = userfn(x,par,par value = x - par * sn(x.^par; Code x=-.0:0.0:.0; y=feval('userfn',x,,; plot(x,y; grd on; zoom on; zoom n: clck on graph zoom out: shft & clck 4 3 0 - - -3-4 - -.5 - -0.5 0 0.5.5 3

4.4 Bsecton Assumpton: nterval [a, b] contans one root In ths method, the nterval s splt n two: f the functon changes sgn (+ to or to +, then the functon s evaluated n the mddle the locaton of the root should le n the subnterval n whch the product changes sgn The absolute error s halved n each teraton: length nterval after n teratons: f ε s a gven tolerance, then b a n b a ln ε n > ln 4

4.3 Fxed Pont Rewrte equaton f( x = 0 n x= gx ( Ths can usually be done s several ways: for nstance ( ( x= sn( x g(x= *sn(x.^ x= sn ( x/ g(x=sqrt(asn(x/ Scheme: xn+ = gx ( n n = 0,,... f( x = x sn( x Startng value: x 0 (how to choose? When to stop? o f( xn 0 f xn+ gx ( n : xn+ xn <ε (ε small o maxmum number of teratons (to prevent nfnte loop Method only works f g'( x < g(x= *sn(x.^ fnds root 0 g(x= sqrt(abs(asn(x/ fnds root close to 0.5 5

4.3 Fxed Pont: convergence a Convergent:0 g ' < b Convergent: < g ' 0 c Dvergent: g ' > d Dvergent: g ' < 6

4.3 Fxed Pont: convergence Defnton fxed pont: gx ( = x If ( g s a contnuous functon on the closed nterval [a,b] ( g:[ ab, ] [ ab, ] ( g s dfferentable wth g'( x k < for all xî ( ab,, then the sequence { xn = gx ( n} converges to the fxed pont x for every x0 Î [ ab, ]. Proof: xn - x = gx ( n -gx ( by defnton of xn and x = g'( c xn -x Mean value theorem k x -x g' bounded by k n k xn- -x repeat prevous 3 steps n k x 0 -x Because 0< k <, we get lm x - x lm k n x - x =. n+. 0 0 n n Mean value theorem: f fî Cab [, ] and dfferentable, then there exsts a pont cî ( ab, such that f '( c = ( f( b - f( a / ( b- a f( b - f( a = f '( c( b- a 7

4.5 Newton-Raphson Taylor approxmaton: ( ( ( n ( ( ( '' (3 ( ' f x f x 3 f x n + = + + + + + + n f x f x f x h h h h R! 3! n! ' f ( x+ = f ( x + f ( x h+ O( h Suppose f( x + = 0 & Oh ( = 0, then ' 0 = f x + f x h, h= ( x x ( ( + Solvng for h: ( x+ x = f( x f '( x Iteraton scheme Newton-Raphson: x + = x f( x f '( x 8

4.5 Newton-Raphson - Graphcal f x ' ( x = = x + ' f( x 0 x x + f( x f ( x 9

4.5 Secant Method Approxmate the dervatve f '( x numercal: ( ( def. '( lm f x +δ f x = f x δ 0 δ f( x f( x fnte dfference: f '( x x x [forward dfference] Newton Raphson: x+ = x f( x f '( x x x forward dfference: f '( x f( x f( x x x Secant Method: x+ = x f( x f( x f( x no dervatve needed now, two startng values: x0, x varatons: x x o book: x+ = x f( x f( x f( x o backwards/central dfferences now: =,,... 0

4.6 Repeated roots Suppose: px ( = ( x λ qx ( wth q( λ 0 n [so λ s a root of order n] Dervatve: n p'( x = n( x λ q( x + ( x λ q'( x n n p'( λ = n( λ λ q( λ + ( λ λ q'( λ = 0 n Concluson: methods based on / p'( x unusable for searchng roots (nd order Taylor approxmaton: ( ( ( 3 f( x + 0 and Oh ( 0 '' ' ( ( ( f x h + f x h + f x = ah + bh + c = 0 ABC-formula: h ( ± + ( x '' ' f 3 + = + + + f x f x f x h h O( h! ( + ( + ( x+ f x+ < f x+ + = ( x+ otherwse b ± b 4ac f '( x ± f '( x 4 f ''( x f( x = = a f ''( x ( ( + ( ( x+ = x + h ; x+ = x + h ; x f ( (

4.7 Zeros of Hgher-Dmensonal Functons Suppose z x = y and f( z f( xy, = f( xy,, then ( ( ( f z+ = f z + f z h+ O( h f f f f δx δy f( z =, x y = f f δx δy hx T h= = ( hx : hy h y h = hx + hy Solvng for h: ( ( 0 = f z + f z h h= [ f( z ] f( z Newton-Raphson: z+ = z [ f( z] f( z [compare to x + = x ( f '( x f x ]

4.8 MATLAB Routnes for Fndng Roots roots(c: fndng roots of a polynomal wth coeffcents c polynomal coeffcents startng wth the coeffcent of hghest order a coeffcent of 0 ndcates an ntermedate powers that are not present polynomal of order n wth n+ coeffcents fzero(fun,x0,optons: very powerful, choses the best algorthm tself Ex. fzero('func',0.4,optmset('dsp','ter' or fzero(@(x x-*sn(x.^,0.4,optmset('dsp','ter' 3