Root-Finding Algorithm Bisection method Suppose we want to solve the equation f(x) = 0. Given two points a and b such that f(a) and f(b) have opposite.

Slides:



Advertisements
Similar presentations
ERROR-DETECTING AND ERROR- CORRECTING CODES ․ A simple scheme for detecting errors is to append a parity check digit to each block of message. Even parity:
Advertisements

布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
指導教授:陳淑媛 學生:李宗叡 李卿輔.  利用下列三種方法 (Edge Detection 、 Local Binary Pattern 、 Structured Local Edge Pattern) 來判斷是否為場景變換,以方便使用者來 找出所要的片段。
: Determine it 星等:★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10520: Determine it 解題者:林祺光 解題日期: 2006 年 5 月 22 日 題意:給兩個值 a 1,n 和 n a i,j.
亂數產生器安全性評估 之統計測試 SEC HW7 姓名:翁玉芬 學號:
Lecture 8 Median and Order Statistics. Median and Order Statistics2 Order Statistics 問題敘述 在 n 個元素中,找出其中第 i 小的元素。 i = 1 ,即為找最小值。 i = n ,即為找最大值。 i = 或 ,即為找中位數。
Review of Chapter 3 - 已學過的 rules( 回顧 )- 朝陽科技大學 資訊管理系 李麗華 教授.
: OPENING DOORS ? 題組: Problem Set Archive with Online Judge 題號: 10606: OPENING DOORS 解題者:侯沛彣 解題日期: 2006 年 6 月 11 日 題意: - 某間學校有 N 個學生,每個學生都有自己的衣物櫃.
STAT0_sampling Random Sampling  母體: Finite population & Infinity population  由一大小為 N 的有限母體中抽出一樣本數為 n 的樣 本,若每一樣本被抽出的機率是一樣的,這樣本稱 為隨機樣本 (random sample)
Second Term 05/061 Roots of Equations Bracketing Methods.
1. 假設以下的敘述為一未提供 “ 捷徑計算 ” 能力的程式段,試用程 式設計的技巧,使此敘述經此改 寫的動作後,具有與 “ 捷徑計算 ” 之 處理方法相同之處理模式。 if and then E1 else E2 endif.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
Monte Carlo Simulation Part.2 Metropolis Algorithm Dept. Phys. Tunghai Univ. Numerical Methods C. T. Shih.
Integrated single vendor single buyer model with stochastic demand and variable lead time 指導教授:林燦煌 博士 指導教授:林燦煌 博士 研 究 生:黃笙源 研 究 生:黃笙源 M. Ben-Daya, M. Hariga.
7.1 背景介紹 7.2 多解析度擴展 7.3 一維小波轉換 7.4 快速小波轉換 7.5 二維小波轉換 7.6 小波封包
Roots of Equations Bracketing Methods.
選舉制度、政府結構與政 黨體系 Cox (1997) Electoral institutions, cleavage strucuters, and the number of parties.
Monte Carlo Simulation Part.1 Dept. Phys., Tunghai Univ. Numerical Methods, C. T. Shih.
CH 15- 元件可靠度之驗證  驗證方法  指數模式之可靠度驗證  韋式模式之可靠度驗證  對數常態模式之可靠度驗證  失效數為零時之可靠度估算  各種失效模式之應用.
: Problem A : MiniMice ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11411: Problem A : MiniMice 解題者:李重儀 解題日期: 2008 年 9 月 3 日 題意:簡單的說,題目中每一隻老鼠有一個編號.
: Ahoy, Pirates! ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11402: Ahoy, Pirates! 解題者:李重儀 解題日期: 2008 年 8 月 26 日 題意:有一個海盜島有 N 個海盜,他們的編號 (id)
: Count DePrimes ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11408: Count DePrimes 解題者:李育賢 解題日期: 2008 年 9 月 2 日 題意: 題目會給你二個數字 a,b( 2 ≦ a ≦ 5,000,000,a.
: Multisets and Sequences ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11023: Multisets and Sequences 解題者:葉貫中 解題日期: 2007 年 4 月 24 日 題意:在這個題目中,我們要定義.
- Calculus & It’s Application- Chapter 2 Introduction to Limits 朝陽科技大學 資訊管理系 李麗華 教授.
7.4 Lookback Options 指導教授:戴天時 報告者:陳博宇. 章節結構 Floating Strike Lookback Black-Scholes-Merton Equation Reduction of Dimension Computation.
1 Finite Continued Fractions 田錦燕 94/11/03 95/8/9( 最後更新 )
: A-Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10930: A-Sequence 解題者:陳盈村 解題日期: 2008 年 5 月 30 日 題意: A-Sequence 需符合以下的條件, 1 ≤ a.
1 Numerical Methods 數值方法. 2 What is Numerical Methods?
Chapter 3 Entropy : An Additional Balance Equation
2015/6/ : Simple division ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10407: Simple division 解題者:侯沛彣、柯名澤 解題日期: 2006 年 5 月 16 日 題意: 給一個不為零的整數數列,請找出除以每個數字後能.
845: Gas Station Numbers ★★★ 題組: Problem Set Archive with Online Judge 題號: 845: Gas Station Numbers. 解題者:張維珊 解題日期: 2006 年 2 月 題意: 將輸入的數字,經過重新排列組合或旋轉數字,得到比原先的數字大,
: Expressions ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10157: Expressions 解題者:張庭愿 解題日期: 2009 年 8 月 16 日 題意:所有的括號必須成對,且必須先出現過左 括號後才能出現右括號,如果有.
1 Short Vectors of Planar Lattices Via Continued Fraction Friedrich Eisenbrand Information Processing Letters, 田錦燕 95/05/5.
: Sum-up the Primes ★★★★☆ 題組: Problem A 題號: 10419: Sum-up the Primes 解題者:林一帆 解題日期: 2006 年 5 月 15 日 題意: 評斷一個給予的數字是否是由給予個數 的質數所組成的.
連續隨機變數 連續變數:時間、分數、重量、……
Dr. Marco A. Arocha Aug,  “Roots” problems occur when some function f can be written in terms of one or more dependent variables x, where the.
NUMERICAL METHODS WITH C++ PROGRAMMING
第五章IIR數位濾波器設計 濾波器的功能乃對於數位信號進行處理﹐ 以滿足系統的需求規格。其作法為設計一 個系統的轉移函數﹐或者差分方程式﹐使 其頻率響應落在規格的範圍內。本章探討 的是其中一種方法﹐稱為Infinite impulse register(IIR)。 IIR架構說明。 各種不同頻帶(Band)濾波器的設計方法。
: How many 0's? ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11038: How many 0’s? 解題者:楊鵬宇 解題日期: 2007 年 5 月 15 日 題意:寫下題目給的 m 與 n(m
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. 肆 資料分析與表達.
Fin500J: Mathematical Foundations in Finance Topic 3: Numerical Methods for Solving Non-linear Equations Philip H. Dybvig Reference: Numerical Methods.
- + Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p)
Section 5.5 – The Real Zeros of a Rational Function
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Solving Non-Linear Equations (Root Finding)
Continuity ( Section 1.8) Alex Karassev. Definition A function f is continuous at a number a if Thus, we can use direct substitution to compute the limit.
Numerical Methods for Engineering MECN 3500
Problem of the Day No calculator! What is the instantaneous rate of change at x = 2 of f(x) = x2 - 2 ? x - 1 A) -2 C) 1/2 E) 6 B) 1/6 D) 2.
Numerical Methods.
1.4 Continuity  f is continuous at a if 1. is defined. 2. exists. 3.
2.5 The proofs of theorems 證明方法 p → q 與 p  q 之應用 Definition 2.8 Let n be an integer. We call n even if n is divisible by 2 - that is, if there exists.
Solving Non-Linear Equations (Root Finding)
Numerical Methods Solution of Equation.
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
Discrete Mathematics Chapter 6 Advanced Counting Techniques.
Recursive Methods for Finding Roots of Functions Bisection & Newton’s Method.
1 Bracketing Methods. Finding the Roots of the Equation f(x)=0  Graphical method  Plot of the function and observe where it crosses the x- axis  Bracketing.
Numerical Calculation Part 1: Equations &Roots Dr.Entesar Ganash (Bisection's Method)
MATH342: Numerical Analysis Sunjae Kim.
Important Values for Continuous functions
Intermediate Value Theorem
Intermediate Value Theorem
Continuity Alex Karassev.
Intermediate Value Theorem
Copyright © Cengage Learning. All rights reserved.
Solutions for Nonlinear Equations
Presentation transcript:

Root-Finding Algorithm Bisection method Suppose we want to solve the equation f(x) = 0. Given two points a and b such that f(a) and f(b) have opposite signs, we know by the intermediate value theorem that f must have at least one root in the interval [a, b] as long as f is continuous

Root-Finding Algorithm The bisection method divides the interval in two by computing c = (a+b) / 2. There are now two possibilities: either f(a) and f(c) have opposite signs, or f(c) and f(b) have opposite signs. The bisection algorithm is then applied to the sub-interval where the sign change occurs, meaning that the bisection algorithm is inherently recursive.

Root-Finding Algorithm The bisection method is less efficient than Newton's method but it is much less prone to odd behavior.

Root-Finding Algorithm 'Bisection Method ‘ Start loop Do While (abs(xR - xL)) > epsilon xM = (xR + xL) / 2 'Calculate midpoint of domain 'Find f(xM) If ((f(xL) * f(xM)) > 0) Then 'Throw away left half xL = xM Else 'Throw away right half xR = xM End If Loop

Root-Finding Algorithm 假設函數 f 在 [a,b] 之間連續,且 f(a) 與 f(b) 異號時,二分法可依指定的精確度求 f(x) = 0 的一個近似解。

Root-Finding Algorithm 由於 (a+b)/2 有可能造成所得結果落在 [a,b] 區間外 (見以下範例),故應採用 a + (b-a)/2 較佳。 以 3-digit chopping 為例: a = b = (a+b)/2 = ( ) / 2 = 1.96 / 2 = a+(b-a)/2 = /2 = = 0.984

Root-Finding Algorithm Newton's method Suppose f : [a, b] → R is a differentiable function defined on the interval [a, b] with values in the real numbers R.

Root-Finding Algorithm

Secant method The secant method is defined by the recurrence relation As can be seen from the recurrence relation, the secant method requires two initial values, x0 and x1, which should ideally be chosen to lie close to the root.

Root-Finding Algorithm

The secant method does not require that the root remain bracketed like the bisection method does, and hence it does not always converge. The false position method uses the same formula as the secant method. However, it does not apply the formula on x n−1 and x n, like the secant method, but on x n and on the last iterate x k such that f(x k ) and f(x n ) have a different sign. This means that the false position method always converges.

Root-Finding Algorithm False position method Like the bisection method, the false position method starts two points a 0 and b 0 such that f(a 0 ) and f(b 0 ) are of opposite signs, which implies by the intermediate value theorem that the function f has a root in the interval [a 0, b 0 ]. The method proceeds by producing a sequence of shrinking intervals [a k, b k ] that all contain a root of f.

Root-Finding Algorithm At iteration number k, the number is computed. As explained below, c k is the root of the secant line through (a k, f(a k )) and (b k, f(b k )).

Root-Finding Algorithm If f(a k ) and f(c k ) have the same sign, then we set a k+1 = c k and b k+1 = b k, otherwise we set a k+1 = a k and b k+1 = c k. This process is repeated until the root is approximated sufficiently well.

Root-Finding Algorithm